Commit Graph

5068 Commits

Author SHA1 Message Date
Lars Persson
3c7f9aa34a SCI : data field is only supported if building for SCI32
svn-id: r54379
2010-11-19 13:56:11 +00:00
Filippos Karapetis
5d53673e93 SCI: Also send system strings to kString(). This makes LSL7 continue into the actual game! :D
svn-id: r54377
2010-11-19 13:23:20 +00:00
Lars Persson
c7cf764890 SCI: Only handle seg_type_string if ENABLE_SCI32 is defined
svn-id: r54376
2010-11-19 13:03:31 +00:00
Lars Skovlund
5ecac66c6a Some subfunctions changed positions in SCI3 kString. WIP.
And with this, LSL7 starts up. Yeah, baby!

svn-id: r54374
2010-11-19 12:52:17 +00:00
Lars Skovlund
84d4a4a89f Implement a couple of NULL checks in kArray
svn-id: r54373
2010-11-19 12:49:46 +00:00
Lars Skovlund
1a6597ebc2 SCI3: Implement new opcode 0x4c.
svn-id: r54370
2010-11-19 12:47:47 +00:00
Lars Skovlund
fbf5a453c7 SCI: Implement the GetConfig call for LSL7
svn-id: r54369
2010-11-19 12:46:36 +00:00
Filippos Karapetis
c19e8377f9 SCI: Added pointer arithmetic support for SCI2 strings
svn-id: r54365
2010-11-19 10:28:43 +00:00
Filippos Karapetis
6ec8ec416b SCI: Added support for script -> string copying (used by late SCI2.1 and SCI3 games)
svn-id: r54364
2010-11-19 10:27:22 +00:00
Filippos Karapetis
763ddd2203 SCI: Fixed comment
svn-id: r54362
2010-11-19 08:19:14 +00:00
Filippos Karapetis
3b07056a47 SCI: Moved the Object class in a separate file
svn-id: r54361
2010-11-19 08:18:24 +00:00
Filippos Karapetis
c87ef6f307 SCI: Added KQ4 Atari ST version from bug report #3110941
svn-id: r54360
2010-11-19 07:43:47 +00:00
Max Horn
a0df86955f ALL: Push down deps on stream.h from .h to .cpp files
svn-id: r54358
2010-11-19 01:37:04 +00:00
Filippos Karapetis
34272e2529 SCI: Added a stub for a new subop in kString, and disabled trackOriginAndFindWorkaround() for SCI3 games for now
svn-id: r54352
2010-11-18 22:46:29 +00:00
Filippos Karapetis
4609f11137 SCI: Added species selector functionality for SCI3
svn-id: r54351
2010-11-18 22:27:56 +00:00
Filippos Karapetis
9e418e6eaf SCI: Removed SCI3 hacks in kClone/kDisposeClone
svn-id: r54350
2010-11-18 22:26:58 +00:00
Johannes Schickel
94d3d82f59 SCI: Slight formatting fix and use \t instead of a tab character in debugN.
svn-id: r54349
2010-11-18 21:45:31 +00:00
Lars Skovlund
c325d815d2 SCI: Fix debugger disassembly of property accesses in SCI3
svn-id: r54348
2010-11-18 21:41:13 +00:00
Lars Skovlund
f0fea21639 SCI3: Fix new opcode 0x4e
svn-id: r54347
2010-11-18 21:38:00 +00:00
Filippos Karapetis
49468fdfff SCI3: Added another previously unused opcode (0x27 / 0x4e)
svn-id: r54341
2010-11-18 19:20:30 +00:00
Filippos Karapetis
c2bdba2ea6 SCI2: Treat SCI2 raw arrays (type 3) as strings in kArray
SCI2 strings inherit from arrays, plus kArray and kString are almost the
same, so this is all possible. This is needed, as SCI scripts copy 
strings on arrays and then process them as such (e.g. in RAMA and LSL7)
However, we really need to merge SCI2 array types with the SCI2 string
types, and ultimately merge the code with the SCI1 array and string types.

svn-id: r54340
2010-11-18 19:18:11 +00:00
Lars Skovlund
487feb3843 Get rid of a const_cast.
svn-id: r54333
2010-11-18 17:38:56 +00:00
Johannes Schickel
b593b15c50 SCI: Slight formatting fix.
svn-id: r54330
2010-11-18 17:25:09 +00:00
Lars Skovlund
0001a6b74d SCI3: implement setInfoSelector() for SCI3, fixes infinite recursion
svn-id: r54328
2010-11-18 17:13:01 +00:00
Lars Skovlund
c5252071db SCI3: Add proper support for the calle instruction
svn-id: r54327
2010-11-18 17:04:00 +00:00
Lars Skovlund
1621e7d5c0 Fix operator precedence problem
svn-id: r54324
2010-11-18 16:58:25 +00:00
Filippos Karapetis
34c18f20d8 SCI: Added hacks in kClone/kDisposeClone for SCI3
svn-id: r54307
2010-11-17 21:49:19 +00:00
Filippos Karapetis
bd844a8c92 SCI: Call lookupArray() after allocateArray() when duplicating arrays
This ensures that the pointer to the element that lookupArray() returned
won't be invalidated in case the array is reallocated because of
allocateArray() - same issue as in kClone()

svn-id: r54306
2010-11-17 21:47:05 +00:00
Filippos Karapetis
ddbda3eb15 SCI: Code formatting
svn-id: r54305
2010-11-17 20:50:24 +00:00
Filippos Karapetis
ba6de1bcdf SCI: Added sanity checks for SCI3 scripts bigger than 64KB
- Extended the "verify_scripts" console command for SCI3 scripts
- Added a check for such large scripts when scripts are loaded, with
an error for now, till a mechanism to support such scripts with a
16-bit addressing scheme is in place (e.g. overlaying, or splitting
scripts). Either way, such scripts should span over more than one segment

svn-id: r54304
2010-11-17 20:46:59 +00:00
Lars Skovlund
8a6efcac65 SCI3: Implement opcode to retrieve the info selector.
svn-id: r54303
2010-11-17 20:43:51 +00:00
Lars Skovlund
e551f3bf33 SCI3: Handle script exports correctly
svn-id: r54302
2010-11-17 20:37:13 +00:00
Lars Skovlund
5ab823b16a SCI3: relocate operand of the lofsa opcode
svn-id: r54301
2010-11-17 20:29:10 +00:00
Filippos Karapetis
61e02f0570 SCI: Fixed the speed in the intro of PQ2, version 1.002.011 (bug #3102071)
In version 1.002.011, global 3, used for timing, is incorrectly initialized
to 0, whereas it should be 6 (like in other versions). Initializing it to
the correct value fixes the speed in the intro. This has been based on the
patch for that version by NewRisingSun(NRS) / Belzorash

svn-id: r54298
2010-11-17 18:46:29 +00:00
Lars Skovlund
e086ef0096 Adapt SCI property instructions (pToa etc.) to SCI3
svn-id: r54296
2010-11-17 17:21:02 +00:00
Filippos Karapetis
430df91076 SCI1.1 and newer games always ignore move count. The "version" command works now in SCI3
svn-id: r54295
2010-11-17 15:02:58 +00:00
Filippos Karapetis
e55a55a277 SCI: Remove key modifier (e.g. num lock) status for keyboard function keys. This fixes function key input (e.g. F3) when num lock is on
svn-id: r54294
2010-11-17 14:48:28 +00:00
Filippos Karapetis
47e137fd8e SCI: lofsa/lofss functionality for SCI3
- Updated detectLofsType() for SCI3
- Cleaned up op_lofsa and op_lofss and updated them for SCI3

svn-id: r54293
2010-11-17 14:28:32 +00:00
Filippos Karapetis
c003032b4c SCI: Allow SCI3 game scripts to run
SCI3 scripts do start up now, however they stop quite early, as there is still
missing functionality which prevents them from running fully. This will be useful
for debugging, though

svn-id: r54292
2010-11-17 14:08:13 +00:00
Filippos Karapetis
bb9b7c24f9 SCI: Added some SCI3 selector related information
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in
SCI3 scripts, as it's no longer used in SCI3
- Added information about which of the selectors are missing in SCI3. There are
some more which are missing, but aren't used in SCI2-SCI3 anyway
- Some styling

svn-id: r54291
2010-11-17 14:03:14 +00:00
Max Horn
3d7f7b49fe SCI: Make class table size OB1 workaround slightly more readable
svn-id: r54290
2010-11-17 13:01:58 +00:00
Filippos Karapetis
58e4d9a97a SCI: Fixed the return values of Object::relocateSci3()
svn-id: r54289
2010-11-17 12:33:55 +00:00
Max Horn
5a554e3dbe SCI: Change 'colour' to 'color'
All other instances already were spelled 'color' in the SCI
engine (and also most other parts of ScummVM)

svn-id: r54285
2010-11-17 12:13:03 +00:00
Filippos Karapetis
a702ad5123 SCI3: added a SCI3 implementation of findGameObject(), based on a patch by lskovlun
svn-id: r54284
2010-11-17 11:17:38 +00:00
Filippos Karapetis
b707d6e7dc SCI: More work on SCI3, based on a patch by lskovlun
- Added SCI3 equivalents for access to object selectors
- Added SCI3 implementation of object relocation
- Added SCI3 implementation of Script::initialiseClasses()

svn-id: r54283
2010-11-17 11:15:52 +00:00
Filippos Karapetis
59ad5085bc SCI: Some more work on SCI3, based on a patch by lskovlun
- Added a SCI3 implementation of Script::load()
- Added a SCI3 implementation of Script::initialiseClasses()
- Removed some duplicate code

svn-id: r54282
2010-11-17 09:28:04 +00:00
Filippos Karapetis
e4c967a301 SCI: Added the SCI3 equivalent of initialiseObjects(), from a patch by lskovlun
svn-id: r54281
2010-11-17 09:10:43 +00:00
Filippos Karapetis
f44b084deb SCI: Some restructuring. Added some SCI3 placeholders/stubs
svn-id: r54280
2010-11-17 08:53:02 +00:00
Filippos Karapetis
0470e47145 SCI: The heap was a separate resource in SCI1.1 - SCI2.1 games only. It was later
merged into the script files again in SCI3

svn-id: r54279
2010-11-17 08:30:08 +00:00
Filippos Karapetis
553d571c50 SCI: Specify that -1 means "all maps" when listing base36-encoded resources
svn-id: r54278
2010-11-17 08:18:56 +00:00