aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/seg_manager.cpp
AgeCommit message (Collapse)Author
2010-02-03SCI: Move more stuff aroundMax Horn
svn-id: r47836
2010-02-03SCI: Get rid of EngineState::stack_segmentMax Horn
svn-id: r47833
2010-01-28Added some more information on the errors thrown by lookupString() and ↵Filippos Karapetis
freeString() - Torin full currently crashes in lookupString, called from kString (strcpy) svn-id: r47659
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-01SCI: Fix segfault in dual-language KQ5.Walter van Niftrik
svn-id: r46864
2009-12-31Overload the = operator for SciArray which fixes the setType errors in GK1. ↵Matthew Hoops
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-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-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
2009-11-04- Changed the segment manager to be a static part of the engine, and stopped ↵Filippos Karapetis
deleting and recreating it when restoring games - Merged game_exit(), script_free_vm_memory() and script_free_engine() - Cleanup svn-id: r45666
2009-10-20- Fixed the pathfinding issue for LSL5 room 640, where Patti walks ↵Filippos Karapetis
off-screen (we still need a proper way of detecting this, though...) - Made warnings where invalid pointers are dereferenced more precise svn-id: r45257
2009-10-14SCI: Rename some vars (cleaning up what seems to have been caused by a blind ↵Max Horn
global search & replace) svn-id: r45060
2009-10-13SCI: Merge SegManager::alloc_Hunk into SegManager::allocateHunkEntryMax Horn
svn-id: r45041
2009-10-12SCI: Fix warnings, cleanupMax Horn
svn-id: r44978
2009-10-11More work on the Object classFilippos Karapetis
svn-id: r44921
2009-10-10Started rewriting the Object struct into a classFilippos Karapetis
svn-id: r44878
2009-10-08SCI: Removed obsolete stringfrags codeMax Horn
svn-id: r44803
2009-10-08SCI: Removed SegManager::getDescriptionMax Horn
svn-id: r44795
2009-10-07SCI: Turn lookup_node & lookup_list into SegManager::lookupNode & ↵Max Horn
SegManager::lookupList svn-id: r44769
2009-10-04SCI: Add SegManager::findObjectByName() method, make parse_reg_t() local to ↵Max Horn
console.cpp, and switch other code using it to use findObjectByName() instead. svn-id: r44628
2009-10-03SCI: Fix sign issue in stringfragsWillem Jan Palenstijn
svn-id: r44572
2009-09-27SCI: Adjust isValidOffset to match changes from r44396,Willem Jan Palenstijn
and make maxSize report the valid space starting at offset. svn-id: r44421
2009-09-27SCI: clear strcpy's dest string if src is invalid.Willem Jan Palenstijn
This fixes moving the plank at the start of KQ6 in Text mode. svn-id: r44397
2009-09-27SCI: change segment offsets in reg segments to be in half reg_t.Willem Jan Palenstijn
This makes offsets in raw and reg segments consistent, which fixes string addressing in savegame dialogs. svn-id: r44396
2009-09-27SCI: Add utility functions for copying data between raw/non-raw segmentsWillem Jan Palenstijn
svn-id: r44387
2009-09-23- Moved the SCI version in a global variableFilippos Karapetis
- Changed all the SCI version checks to use getSciVersion() - Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine) The fallback detector should work correctly now svn-id: r44269
2009-09-22- Merged scriptObjInit0() and scriptObjInit11()Filippos Karapetis
- Replaced some cases where getSciVersion() is used with _resMan->sciVersion(), as getSciVersion() will fail with the fallback detector (as the engine is not initialized). Object property accessors still crash currently, when used with the fallback detector svn-id: r44261
2009-09-22SCI: Add some FIXMEs, and print warning if accessing a raw segment as ↵Max Horn
non-raw or vice versa svn-id: r44245
2009-09-22SCI: Add new type SegmentRef which ultimately will allow us to distinguish ↵Max Horn
between raw and 'reg_t' memory blocks in client code svn-id: r44244
2009-09-22SCI: SegmentObj's now set their type in constructor; replace central ↵Max Horn
SegmentObj::createSegmentObj call in SegManager::allocSegment by several explicit 'new' statements; some extra cleanup svn-id: r44242
2009-09-21SCI: Replace IntMapper Script::_objIndices and Common::Array ↵Max Horn
Script::_objects by a HashMap -- goodbye, class IntMapper svn-id: r44240
2009-09-21SCI: Rename Object::flags and pos to _flags and _pos; tweak scriptObjInit0 ↵Max Horn
and scriptObjInit11 to be more similar svn-id: r44234
2009-09-17SCI: Add a global getSciVersion() function and make use of itMax Horn
svn-id: r44170
2009-09-17Changed the way object selectors are accessed, by removing the relevant ↵Filippos Karapetis
defines and adding appropriate methods to the Object structure svn-id: r44138
2009-09-17SCI: Change SegmentId from int to uint16; consistently use segment 0 to ↵Max Horn
indicate an invalid segment svn-id: r44131
2009-09-17SCI: Rename MemObject -> SegmentObjMax Horn
svn-id: r44130
2009-09-17SCI: More cleanupMax Horn
svn-id: r44129
2009-09-16SCI: Turn some SegManager methods into Script methodsMax Horn
svn-id: r44127
2009-09-16SCI: Rename Script class members, change Script from struct to classMax Horn
svn-id: r44126
2009-09-14SCI: Misc cleanupMax Horn
svn-id: r44093
2009-09-14SCI: Rename SegManager::kernelDeref*() methods to SegManager::deref*()Max Horn
svn-id: r44083
2009-09-14SCI: kernelDeref*() functions are now seSegmentManager methodsMax Horn
svn-id: r44082
2009-09-12Removed the INST_LOOKUP_CLASS defineFilippos Karapetis
svn-id: r44043
2009-09-12- Made obj_get and obj_get_name methods of SegManager (getObject and ↵Filippos Karapetis
getObjectName, respectively) - Renamed alloc_List -> allocateList, alloc_Node->allocateNode, alloc_hunk_entry->allocateHunkEntry, free_hunk_entry->freeHunkEntry, for consistency svn-id: r44039
2009-09-07Fixed a regression from commit #43999 (segment ID 1 is valid)Filippos Karapetis
svn-id: r44000
2009-09-07SCI: Replace GET_SEGMENT_ANY and GET_OBJECT_SEGMENT macros by new segman methodsMax Horn
svn-id: r43999
2009-09-06SCI: Rename SegManager::exports_wide to _exportsAreWide and changed it to a ↵Max Horn
bool, and rename setExportWidth() to setExportAreWide() svn-id: r43988
2009-09-06SCI: Script::obj_indices is now protectedMax Horn
Add new methods init, allocateObject and getObject to class Script, and use them instead of directly accessing Script::obj_indices. Replace RAW_GET_CLASS_INDEX with Script::getObject() svn-id: r43987
2009-09-06SCI: Replace "IntMapper *id_seg_map" in SegManager with a ↵Max Horn
Common::HashMap<int,int> This simplifies the code considerably. Also changed the savegame format accordingly, which required me to bump the format version to 10. Old saves should still load fine. svn-id: r43986
2009-09-06SCI: cleanupMax Horn
svn-id: r43982