Filippos Karapetis
32807512d9
SCI: Cleanup
...
svn-id: r51687
2010-08-03 12:41:36 +00:00
Filippos Karapetis
9add81aaf2
SCI: Dropped support for the very old saved game versions 9 - 11. Rationale: a lot has changed since then, we're still not stable, and this helps clean up the code, thus we're still in a position to drop support for old saved games
...
svn-id: r50738
2010-07-07 20:12:41 +00:00
Max Horn
4f606cc10d
SCI: Clarify docs of GC related SegmentObj methods
...
svn-id: r50440
2010-06-28 12:28:29 +00:00
Max Horn
6c0205b104
SCI: Fix DEBUG_GC mode and permanently enable it
...
svn-id: r50430
2010-06-28 11:23:00 +00:00
Max Horn
31b2902714
SCI: Revise GC interface: use Common::Array<reg_t> instead of callbacks
...
This means a little bit more overhead but makes the code much more readable
and understandable.
svn-id: r50429
2010-06-28 11:22:41 +00:00
Filippos Karapetis
bb992b0b93
SCI: Moved all the script-related code inside script.cpp/.h, and all script opcode-related code inside vm.cpp/.h
...
svn-id: r50396
2010-06-27 20:38:43 +00:00
Filippos Karapetis
7a14846bdd
Removed the misleading getHeap() function (only valid for SCI0-SCI1), plus removed some unused defines
...
svn-id: r50358
2010-06-26 23:48:27 +00:00
Filippos Karapetis
e2026f4a26
Zero out the memory pointer of a hunk when freeing it
...
svn-id: r50351
2010-06-26 22:48:47 +00:00
Filippos Karapetis
c28fa2cf19
Reverted the code which handles objects without a base object when loading, for now. This possibly indicates an issue related to the garbage collector
...
svn-id: r50142
2010-06-22 15:03:19 +00:00
Filippos Karapetis
db70d66e4a
Strict mode: Changed several warnings due to logic bugs into errors. If an error pops up from these ones, please add the game where it occurred and the steps to reproduce the error before turning it into a warning
...
svn-id: r49973
2010-06-17 23:50:28 +00:00
Filippos Karapetis
e64eb71ce8
Properly reconstruct the running stack when restoring (a regression from commits #49376 and #49525 ), some formatting
...
svn-id: r49689
2010-06-15 09:11:26 +00:00
Lars Skovlund
9a1db3f770
Add support for SCI32 segment types to seg_table and vr debug commands
...
svn-id: r49686
2010-06-15 08:21:39 +00:00
Filippos Karapetis
1fde7f1abc
Removed the code used for tracking script code block relocations in SCI0-SCI1 games, as we don't actually relocate these blocks, and it was used solely for verification of the exports table. The issue that this warning was created for should no longer occur
...
svn-id: r49669
2010-06-14 20:45:00 +00:00
Filippos Karapetis
4f3bb60cd5
Really silence the warning with _bufSize
...
svn-id: r49652
2010-06-14 13:53:15 +00:00
Filippos Karapetis
cd77cb96fc
Some cleanup of the script locals code
...
svn-id: r49649
2010-06-14 12:44:57 +00:00
Filippos Karapetis
f1af6bad6d
Fixed compilation
...
svn-id: r49407
2010-06-03 10:26:51 +00:00
Filippos Karapetis
86b452d36c
Moved several object-related defines inside vm.h into segment.h, where the Object class resides. Also, removed several unused defines
...
svn-id: r49406
2010-06-03 10:16:21 +00:00
Filippos Karapetis
3f4302214c
The save/load object init code is now unified with the regular object init code
...
svn-id: r49346
2010-05-31 11:25:59 +00:00
Filippos Karapetis
50cd1d1da4
Limited access to the script export table and synonyms block
...
svn-id: r49338
2010-05-30 23:31:33 +00:00
Filippos Karapetis
a0ee93ece5
SCI: Script exports and synonyms are now initialized when a script is loaded. Removed a sanity check inside script_instantiate_sci0 for a bug which no longer exists
...
svn-id: r49336
2010-05-30 21:49:07 +00:00
Filippos Karapetis
dc4d61f718
- Merged the SCI0 scriptRelocate() and SCI11 heapRelocate() functions inside relocate(). scriptRelocate checked one more relocation entry, which seems wrong, so we're now checking for the correct number of relocations in all SCI versions
...
- Re-added the error when script + heap exceed 64KB (better than an assert) - this should theoretically never happen, and it never has for the games tested
- Removed the relocated sanity check - again, it shouldn't occur (else something else is wrong)
svn-id: r49332
2010-05-30 20:06:50 +00:00
Filippos Karapetis
016862ac3a
Moved setScriptSize() inside Script::init(), and removed a FIXME - the SCI1.1 word-align is done inside Script::init()
...
svn-id: r49330
2010-05-30 18:45:07 +00:00
Filippos Karapetis
5cdb13b3e8
Made load_script() a member of the Script class
...
svn-id: r49328
2010-05-30 16:38:08 +00:00
Filippos Karapetis
c32e88fe0b
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
...
svn-id: r49327
2010-05-30 16:14:31 +00:00
Max Horn
4ecacdad16
SCI: Merge Script::relocateBlock and Object::relocate
...
The shared code now resides in a new static function named
relocateBlock, which is invoked by the two methods.
svn-id: r49316
2010-05-29 23:09:00 +00:00
Max Horn
42d6ed880b
SCI: Make Script::_exportTable const (yay :-)
...
svn-id: r49315
2010-05-29 21:42:42 +00:00
Martin Kiewitz
453d13dc2d
SCI: fixing -propDict- selector on instances to contain -propDict- of the corresponding class - fixes sq4cd/room 381 talk-clicking on robot - thx to waltervn & wjp
...
svn-id: r49263
2010-05-27 17:41:20 +00:00
Max Horn
db475d1501
SCI: More const related changes; remove unnecessary casts which hide const issues
...
svn-id: r49248
2010-05-26 18:11:17 +00:00
Max Horn
0197e9f6a1
SCI: Making various object and script related things const
...
svn-id: r49246
2010-05-26 16:30:10 +00:00
Filippos Karapetis
af8a82aa13
Fixed compilation
...
svn-id: r49242
2010-05-26 14:31:51 +00:00
Filippos Karapetis
bfaba64c6a
Made find_unique_script_block() a member of the Script class
...
svn-id: r49241
2010-05-26 14:25:51 +00:00
Filippos Karapetis
1c0bbb10cb
More work on controlling access to members of the Object class:
...
- Moved the code for initializing the object class, species and base object inside the Object class
- Made propertyOffsetToId() a method of the Object class
- Made relocateObject() a method of the Object class
- The Object getVariable() method now returns a reference to the requested variable
Only SegManager::reconstructScripts() is left needing direct access to the members of the Object class
svn-id: r49228
2010-05-26 08:27:24 +00:00
Filippos Karapetis
174a043aa7
Removed the exportsAreWide variable from the segment manager and save games, and moved validateExportFunc() in the Script class, thus resolving a TODO
...
svn-id: r49093
2010-05-19 08:50:24 +00:00
Matthew Hoops
3dda73d9a2
Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
...
svn-id: r49070
2010-05-18 04:17:58 +00:00
Filippos Karapetis
6d38cf8b8f
Made locateVarSelector() a method of the Object class
...
svn-id: r49031
2010-05-14 15:23:42 +00:00
Matthew Hoops
7147f8577e
Search through arrays for outgoing references to fix possible garbage collector problems; minor cleanup.
...
svn-id: r47989
2010-02-08 15:51:00 +00:00
Max Horn
bec3a0d539
cleanup
...
svn-id: r47835
2010-02-03 01:33:48 +00:00
Matthew Hoops
da46fc9b35
Add support for saving/loading Arrays/Strings in SCI32. It's possible to save a game in GK1 now via the console, but not load (yet).
...
svn-id: r47696
2010-01-30 02:03:59 +00:00
Walter van Niftrik
473d8b7c2f
SCI: Add string support for odd-offset pointers into reg_t-based segments.
...
svn-id: r47572
2010-01-26 19:51:08 +00:00
Johannes Schickel
aed02365ec
Strip trailing spaces/tabs.
...
svn-id: r47541
2010-01-25 01:39:44 +00:00
Walter van Niftrik
10da245619
SCI: Cleanup
...
svn-id: r47506
2010-01-24 17:52:27 +00:00
Matthew Hoops
5fbbd5b8d9
Zero the array before using it. You can go talk to Grace now, DrMcCoy.
...
svn-id: r47017
2010-01-05 04:00:13 +00:00
Walter van Niftrik
205f7437ea
SCI: Fix segfault in dual-language KQ5.
...
svn-id: r46864
2010-01-01 23:48:22 +00:00
Matthew Hoops
7d131627fe
Overload the = operator for SciArray which fixes the setType errors in GK1. Some other cleanup too. GK1 can now access the restore menu and get a bit further in the game (until a segfault in the Decompressor code).
...
svn-id: r46789
2009-12-31 05:11:58 +00:00
Matthew Hoops
5382aa1ab0
SCI32:
...
- Set signature for Array/String
- Add the kernel table differences for the GK2 demo
- Implement kMessage changes in SCI32
- Use an empty string as the default path for all games now (and modify kValidPath to accept that only as valid)
- Add dereferencing for Arrays
svn-id: r46756
2009-12-30 16:00:56 +00:00
Matthew Hoops
65dcc0b2a3
SCI32:
...
- Fix dup for kArray/kString
- Implement kFileIO::rename (SCI1.1)
- Implement part of the SCI32 additions to kFileIO
- Implement the GetSaveDir part of kSave (SCI2.1)
- Torin (SCI2.1!) now shows signs of life -- it will create the torin.prf file with correct data!
svn-id: r46521
2009-12-24 02:43:07 +00:00
Matthew Hoops
4be2788ffd
Some SCI32 (minor) String bug fixes and cleanup.
...
svn-id: r46492
2009-12-23 05:10:16 +00:00
Matthew Hoops
ef79d7f017
SCI32:
...
- Fully implement kArray and kIsHiRes and mostly implement kString (printf and atoi subfunctions still missing).
- Add a dummy SciGui class for SCI32 to bypass the views. Gabriel Knight 1 will now play the Sierra logo music and the main menu music.
- Some other minor SCI32 changes.
svn-id: r46462
2009-12-21 14:32:54 +00:00
Filippos Karapetis
6d030126d7
More work on the Object class
...
svn-id: r44921
2009-10-11 13:46:58 +00:00
Filippos Karapetis
d6f5d93dbf
Started rewriting the Object struct into a class
...
svn-id: r44878
2009-10-10 15:58:51 +00:00