aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/segment.cpp
AgeCommit message (Collapse)Author
2010-06-28SCI: Move a few remaining Script methods to engine/script.cppMax Horn
svn-id: r50441
2010-06-28SCI: Fix DEBUG_GC mode and permanently enable itMax Horn
svn-id: r50430
2010-06-28SCI: Revise GC interface: use Common::Array<reg_t> instead of callbacksMax Horn
This means a little bit more overhead but makes the code much more readable and understandable. svn-id: r50429
2010-06-27SCI: Moved all the script-related code inside script.cpp/.h, and all script ↵Filippos Karapetis
opcode-related code inside vm.cpp/.h svn-id: r50396
2010-06-27CleanupFilippos Karapetis
svn-id: r50359
2010-06-26Removed the misleading getHeap() function (only valid for SCI0-SCI1), plus ↵Filippos Karapetis
removed some unused defines svn-id: r50358
2010-06-25SCI: Introduce SciGameId enumMax Horn
svn-id: r50273
2010-06-25SCI: Restrict some 'error' exceptions to the places they occur; cleanupMax Horn
svn-id: r50271
2010-06-24Changed an error in LocalVariables::dereference() back to a warning, as it ↵Filippos Karapetis
occurs in 2 places during the intro of LB2 (called from kMemory(peek)) svn-id: r50202
2010-06-22Reverted the code which handles objects without a base object when loading, ↵Filippos Karapetis
for now. This possibly indicates an issue related to the garbage collector svn-id: r50142
2010-06-17Strict mode: Changed several warnings due to logic bugs into errors. If an ↵Filippos Karapetis
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-15Add support for SCI32 segment types to seg_table and vr debug commandsLars Skovlund
svn-id: r49686
2010-06-14Removed the code used for tracking script code block relocations in ↵Filippos Karapetis
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-14Really silence the warning with _bufSizeFilippos Karapetis
svn-id: r49652
2010-06-14Silenced warningFilippos Karapetis
svn-id: r49651
2010-06-14Fixed a bug with commit #49640Filippos Karapetis
svn-id: r49650
2010-06-14Some cleanup of the script locals codeFilippos Karapetis
svn-id: r49649
2010-06-13The offset of script local variables is now calculated when the script is ↵Filippos Karapetis
loaded, thus we no longer need to save it. Merged scriptInitialiseLocals() with scriptInitialiseLocalsZero() svn-id: r49640
2010-06-03Moved several object-related defines inside vm.h into segment.h, where the ↵Filippos Karapetis
Object class resides. Also, removed several unused defines svn-id: r49406
2010-06-02Fixed regression from commit #49332 (merging of the SCI0 and SCI11 relocate ↵Filippos Karapetis
functions, where the SCI0 equivalent had a +1 count): it seems that we should skip over zero exports, however the total number of valid exports remains the same. Fixes KQ5 and QFG2. This also fixes the relocation calculation of script 71 in SQ3, so remove the comment that the script has broken relocation entries svn-id: r49394
2010-05-31Wrote the initialization code for the exports and synonyms table to make ↵Filippos Karapetis
more sense and fixed a bug with the initialization of the synonyms pointer, introduced with rev #49336 svn-id: r49360
2010-05-31The save/load object init code is now unified with the regular object init codeFilippos Karapetis
svn-id: r49346
2010-05-30Limited access to the script export table and synonyms blockFilippos Karapetis
svn-id: r49338
2010-05-30SCI: Merge setLockers(1) call into Script::initMax Horn
svn-id: r49337
2010-05-30SCI: Script exports and synonyms are now initialized when a script is ↵Filippos Karapetis
loaded. Removed a sanity check inside script_instantiate_sci0 for a bug which no longer exists svn-id: r49336
2010-05-30- Merged the SCI0 scriptRelocate() and SCI11 heapRelocate() functions inside ↵Filippos Karapetis
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-30Moved setScriptSize() inside Script::init(), and removed a FIXME - the ↵Filippos Karapetis
SCI1.1 word-align is done inside Script::init() svn-id: r49330
2010-05-30Unified the script loading code, and marked an issue with the SCI11 heap ↵Filippos Karapetis
addresses svn-id: r49329
2010-05-30Made load_script() a member of the Script classFilippos Karapetis
svn-id: r49328
2010-05-30Clarify reasoning behind hack in Script::scriptRelocate()Lars Skovlund
svn-id: r49320
2010-05-29SCI: Merge Script::relocateBlock and Object::relocateMax Horn
The shared code now resides in a new static function named relocateBlock, which is invoked by the two methods. svn-id: r49316
2010-05-29SCI: Make Script::_exportTable const (yay :-)Max Horn
svn-id: r49315
2010-05-26SCI: More const related changes; remove unnecessary casts which hide const ↵Max Horn
issues svn-id: r49248
2010-05-26SCI: Making various object and script related things constMax Horn
svn-id: r49246
2010-05-26Made find_unique_script_block() a member of the Script classFilippos Karapetis
svn-id: r49241
2010-05-26More work on controlling access to members of the Object class:Filippos Karapetis
- 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-19Removed the exportsAreWide variable from the segment manager and save games, ↵Filippos Karapetis
and moved validateExportFunc() in the Script class, thus resolving a TODO svn-id: r49093
2010-05-18Add initial support for KQ6 Mac. Wrapper functions for read/writing to ↵Matthew Hoops
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-14Made locateVarSelector() a method of the Object classFilippos Karapetis
svn-id: r49031
2010-02-08Search through arrays for outgoing references to fix possible garbage ↵Matthew Hoops
collector problems; minor cleanup. svn-id: r47989
2010-02-03SCI: Move more stuff aroundMax Horn
svn-id: r47836
2010-01-30SCI: Remove extra '\n's in debugC messagesWillem Jan Palenstijn
svn-id: r47707
2010-01-26SCI: Add string support for odd-offset pointers into reg_t-based segments.Walter van Niftrik
svn-id: r47572
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2010-01-24SCI: CleanupWalter van Niftrik
svn-id: r47506
2009-12-30SCI32:Matthew Hoops
- 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-29SCI: returning back raw == 0, when script trying to access invalid memoryMartin Kiewitz
svn-id: r46720
2009-12-29SCI: dont crash when scripts are trying to access invalid memory (fixes ↵Martin Kiewitz
intro of lb2cd) svn-id: r46718
2009-12-23Some SCI32 (minor) String bug fixes and cleanup.Matthew Hoops
svn-id: r46492
2009-12-21SCI32:Matthew Hoops
- 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