aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/seg_manager.h
AgeCommit message (Collapse)Author
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-13SCI: Merge SegManager::alloc_Hunk into SegManager::allocateHunkEntryMax Horn
svn-id: r45041
2009-10-08SCI: Turn reconstruct_scripts into SegManager::reconstructScriptsMax Horn
svn-id: r44806
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-09-27SCI: Add utility functions for copying data between raw/non-raw segmentsWillem Jan Palenstijn
svn-id: r44387
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 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-17SCI: Add a global getSciVersion() function and make use of itMax Horn
svn-id: r44170
2009-09-17SCI: Rename engine/memobj.* to engine/segment.*Max Horn
svn-id: r44155
2009-09-17Made script_lookup_export() a method of SegManagerFilippos Karapetis
svn-id: r44140
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: cleanupMax Horn
svn-id: r44128
2009-09-16SCI: Turn some SegManager methods into Script methodsMax Horn
svn-id: r44127
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-12Made is_object() a method of the segment managerFilippos Karapetis
svn-id: r44042
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-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: 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
2009-09-06SCI: Cleanup for some SegManager internalsMax Horn
- rename segGet and getSegment to getScriptSegment; the two can be distinguished by the parameter count. - rename type SCRIPT_GET to ScriptLoadType to conform with our code formatting conventions - rename get_class_address to getClassAddress - some cleanup svn-id: r43981
2009-09-04Moved some functions inside the SegManager class, and renamed alloc_clone() ↵Filippos Karapetis
to allocateClone() svn-id: r43935
2009-09-02Some renaming:Filippos Karapetis
getresourceManager -> getResourceManger resourceManager -> resMan segmentManager ->segMan svn-id: r43908
2009-08-25- Simplified the parameters of some functionsFilippos Karapetis
- Replaced some EngineState parameters - The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions - Plugged 2 leaks in the fallback detector - Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency svn-id: r43722
2009-08-24SCI: Read class table from vocab resource instead of scanning. This fixesWalter van Niftrik
several "invalid selector" VM crashes caused by duplicate classes. svn-id: r43680
2009-08-23- Added more mappings from Sierra's internal IDs to our own ones. Hopefully, ↵Filippos Karapetis
all SCI0-SCI11 games can now be detected correctly from the fallback detector - Simplified some checks for old script types svn-id: r43678
2009-08-18- Added game ID detection to the fallback detector. We still need to map ↵Filippos Karapetis
some of Sierra's internal IDs to our own ones - The class table is now created in the segment manager constructor svn-id: r43504
2009-08-17- Simplified some functions to accept only the parts of the EngineState they ↵Filippos Karapetis
need as parameters, instead of the whole EngineState - Moved the class table in the Segment manager - it's the only class using it directly - Removed the sci11 flag from save games (we already know this, we don't need to store it) - Moved script_get_segment() and get_class_address() inside the segment manager class - Removed the script_locate_by_segment wrapper - Simplified script_lookup_export() a lot by removing some paranoia checks - Added some WIP code for automatically determining the game id in the fallback detector (still not working) - General cleanup svn-id: r43458
2009-07-28SCI: Avoid using perror (it's not portable)Max Horn
svn-id: r42866
2009-06-18PatchMax Horn
svn-id: r41647
2009-06-04SCI: Moved MemObject code into a separate source fileMax Horn
svn-id: r41166
2009-05-18SCI: Removed the unused member SegManager::gc_mark_bits; changed some int ↵Max Horn
params to SegmentId svn-id: r40685
2009-05-18SCI: Replaced SegManager::getHeap() by Script::getHeap()Max Horn
svn-id: r40683
2009-05-15SCI: Got rid of SEG_ID/SCRIPT_IDMax Horn
svn-id: r40599
2009-05-15SCI: Added SegManager::getScriptIfLoaded() methodMax Horn
svn-id: r40598
2009-05-15SCI: Turned several script related SegManager methods into Script methodsMax Horn
svn-id: r40597
2009-05-14SCI: cleanupMax Horn
svn-id: r40581
2009-05-12SCI: Changed object / script local vars storage to use a Common::ArrayMax Horn
svn-id: r40515
2009-05-11SCI: Simplified the Table class, by making it use an Common::Array ↵Max Horn
internally. Increased savegame version, breaking compatibility to the previous one -- sorry for that, but some of my previous changes accidentally messed up the table syncing, resulting in messed up savegames anyway; these breakages should be fixed with this commit svn-id: r40453
2009-05-10SCI: Changed object list in Script instances to use Common:::ArrayMax Horn
svn-id: r40431
2009-05-08SCI: Got rid of last traces of class SegInterfaceMax Horn
svn-id: r40377