aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/scriptdebug.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-08-17 05:55:21 +0000
committerFilippos Karapetis2009-08-17 05:55:21 +0000
commitc38f58598bfc35aa6c1a413e6f1369d5f09ca819 (patch)
tree08a6f03f0b7a1a364d4180e84ff97b1c0b26000c /engines/sci/engine/scriptdebug.cpp
parent0d4fc8169879e0ec476b45fa58601d69e6e0db3c (diff)
downloadscummvm-rg350-c38f58598bfc35aa6c1a413e6f1369d5f09ca819.tar.gz
scummvm-rg350-c38f58598bfc35aa6c1a413e6f1369d5f09ca819.tar.bz2
scummvm-rg350-c38f58598bfc35aa6c1a413e6f1369d5f09ca819.zip
- Simplified some functions to accept only the parts of the EngineState they 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
Diffstat (limited to 'engines/sci/engine/scriptdebug.cpp')
-rw-r--r--engines/sci/engine/scriptdebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 0341ecb73d..fd7219bc85 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -37,9 +37,10 @@ extern const char *selector_name(EngineState *s, int selector);
ScriptState scriptState;
int propertyOffsetToId(EngineState *s, int prop_ofs, reg_t objp) {
- Object *obj = obj_get(s, objp);
+ Object *obj = obj_get(s->seg_manager, s->_version, objp);
byte *selectoroffset;
int selectors;
+ SciVersion version = s->_version; // for the selector defines
if (!obj) {
warning("Applied propertyOffsetToId on non-object at %04x:%04x", PRINT_REG(objp));
@@ -52,7 +53,7 @@ int propertyOffsetToId(EngineState *s, int prop_ofs, reg_t objp) {
selectoroffset = ((byte *)(obj->base_obj)) + SCRIPT_SELECTOR_OFFSET + selectors * 2;
else {
if (!(obj->_variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS)) {
- obj = obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
+ obj = obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
selectoroffset = (byte *)obj->base_vars;
} else
selectoroffset = (byte *)obj->base_vars;
@@ -268,7 +269,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod
selector = sb[- stackframe].offset;
- name = obj_get_name(s, called_obj_addr);
+ name = obj_get_name(s->seg_manager, s->_version, called_obj_addr);
if (!name)
name = "<invalid>";