aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kscripts.cpp
AgeCommit message (Collapse)Author
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: Move some selector related function into a new file selector.cppMax Horn
svn-id: r44171
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: 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-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-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-06SCI: Rename resManager -> resMan; segManager -> segManMax Horn
svn-id: r43980
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-09-02SCI: funct_nr is not used in 99% of all opcodes -- hide it in those (to be ↵Max Horn
removed eventually) svn-id: r43905
2009-09-01- Moved the Sierra game ID conversion code inside game.cpp, so that any ↵Filippos Karapetis
game-specific workarounds are tested against ScummVM IDs - Added detection for the EcoQuest 1 demo in the fallback detector - Partially reverted my previous "fix" for EcoQuest 1 CD, and turned it into a script-specific hack for that game, for now - Added handling of kDisposeScript calls made with 2 parameters, e.g. in KQ5CD and others (still untested, haven't found a test case) svn-id: r43887
2009-09-01Fixed the crash at the beginning of EcoQuest 1 CDFilippos Karapetis
svn-id: r43875
2009-08-25- Replaced more cases of EngineState parametersFilippos Karapetis
- Made some version comparisons for old SCI0 versions easier to read - Removed the GET_SEL32SV macro svn-id: r43729
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-20remove \n's from error() callsJoost Peters
svn-id: r43571
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-11Moved the kernel and the vocabulary outside of the engine state (they're ↵Filippos Karapetis
static data, which never changes during a game) svn-id: r42398
2009-06-07SCI: Moved resource36 handling into resource manager.Walter van Niftrik
svn-id: r41349
2009-06-07Replaced KP_ALT, SKPV_OR_ALT and UKPV_OR_ALTFilippos Karapetis
svn-id: r41340
2009-06-07Replaced/removed KP_UINT, KP_SINT, SKPV and UKPV as well as the ↵Filippos Karapetis
VIEW_PRIORITY and PRIORITY_BAND_FIRST wrappers svn-id: r41338
2009-06-06Store long-term pointers to object variables in a new ObjVarRef struct.Willem Jan Palenstijn
Storing them as reg_t* could cause the pointers to become invalid when they pointed into CloneTable since CloneTable can be re-allocated. svn-id: r41220
2009-06-04SCI: Support for 16-bit DPCM.Walter van Niftrik
svn-id: r41164
2009-06-01Split the kernel functions away from the vocabulary functions (WIP, ↵Filippos Karapetis
saving/loading is broken) svn-id: r41101
2009-06-01Replaced kernel_oops with error(), and added an enum to clarify the cases ↵Filippos Karapetis
where invoke_selector should stop svn-id: r41095
2009-05-31- Further objectification of the SCI vocabulary functionsFilippos Karapetis
- Rewrote the sci_opcodes enum so that it's easier to read - Made the engine error out if data is sent to an invalid selector (which is a fatal condition) svn-id: r41069
2009-05-31The error() and warning() functions add ! and newline automatically. (I didn'tTorbjörn Andersson
look at debug() and debugC(), since I'm really bored with this now. :-) svn-id: r41061
2009-05-30Started objectifying the vocabulary functions (WIP)Filippos Karapetis
svn-id: r41051
2009-05-30- Removed debug_mode from the engine stateFilippos Karapetis
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function - Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND - Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables svn-id: r41033
2009-05-21Removed the PREG, PSTK, IS_NULL_REG and REG_EQ definesFilippos Karapetis
svn-id: r40767
2009-05-19SCI: Added some stubs for LSL6CD (lores).Walter van Niftrik
svn-id: r40719
2009-05-19SCI: Cleanup/paranoia checksMax Horn
svn-id: r40711
2009-05-18SCI: Got rid of EngineState::execution_stack_pos; overally, the resulting ↵Max Horn
code should be even stricter in detecting invalid VM stack access (and some bugs when loading saves might be fixed now...) svn-id: r40694
2009-05-18Changed errors to be fatal, as most of them are fatal conditions. Some of ↵Filippos Karapetis
them have been changed to warnings for now, as they occur in certain games (e.g. SQ4 floppy, SQ4 CD and KQ5 CD) svn-id: r40675
2009-05-15- Moved all the files out of /sci/scicore and into /sciFilippos Karapetis
- Moved /scicore/sciconsole.h into /engine, and renamed /engine/scriptconsole.cpp to /engine/sciconsole.cpp svn-id: r40608
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-14- Replaced SCI_VERSION_FTU_LOFS_ABSOLUTE with the GF_SCI1_LOFSABSOLUTE game flagFilippos Karapetis
- Moved the version defines outside of versions.h svn-id: r40559
2009-05-12SCI: Changed object / script local vars storage to use a Common::ArrayMax Horn
svn-id: r40515
2009-05-12SCI: Removed sci_memory.h/.cppMax Horn
svn-id: r40514
2009-05-03SCI: Continue transition from MemObject to MemObjectNEWMax Horn
svn-id: r40274
2009-04-28SCI: Renamed execution_stack -> _executionStack and turned it into a ↵Max Horn
Common::Array svn-id: r40182
2009-04-24SCI: Renamed gfxw_widget_t and subtypes to GfxWidget etc.Max Horn
svn-id: r40104
2009-02-28SCI: Use the ResourceType enum instead of integers where it makes senseJordi Vilalta Prat
svn-id: r38988
2009-02-28resource_t struct replaced with stub Resource class for future objectifying. ↵Greg Frieger
Also the crash when exiting SCI1 games was fixed svn-id: r38982
2009-02-28Turned ResourceManager into a class, along with all related functionsGreg Frieger
svn-id: r38978