aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/script.cpp14
-rw-r--r--engines/sci/engine/script.h4
-rw-r--r--engines/sci/engine/seg_manager.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 0266414b26..c99bc4fe47 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -377,7 +377,7 @@ uint16 Kernel::findRegType(reg_t reg) {
if (reg.offset <= (*(Script *)mobj).getBufSize() &&
reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET &&
RAW_IS_OBJECT((*(Script *)mobj).getBuf(reg.offset)) ) {
- result |= ((Script *)mobj)->getObject(reg) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE;
+ result |= ((Script *)mobj)->getObject(reg.offset) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE;
} else
result |= SIG_TYPE_REFERENCE;
break;
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 7714983120..0ed9598b41 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -223,16 +223,16 @@ const byte *Script::getSci3ObjectsPointer() {
return ptr;
}
-Object *Script::getObject(reg_t pos) {
- if (_objects.contains(pos.offset))
- return &_objects[pos.offset];
+Object *Script::getObject(uint16 offset) {
+ if (_objects.contains(offset))
+ return &_objects[offset];
else
return 0;
}
-const Object *Script::getObject(reg_t pos) const {
- if (_objects.contains(pos.offset))
- return &_objects[pos.offset];
+const Object *Script::getObject(uint16 offset) const {
+ if (_objects.contains(offset))
+ return &_objects[offset];
else
return 0;
}
@@ -726,7 +726,7 @@ Common::Array<reg_t> Script::listAllDeallocatable(SegmentId segId) const {
Common::Array<reg_t> Script::listAllOutgoingReferences(reg_t addr) const {
Common::Array<reg_t> tmp;
if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(_buf + addr.offset)) {
- const Object *obj = getObject(addr);
+ const Object *obj = getObject(addr.offset);
if (obj) {
// Note all local variables, if we have a local variable environment
if (_localsSegment)
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 4d23ffbba8..df7f42cc0d 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -118,8 +118,8 @@ public:
virtual void saveLoadWithSerializer(Common::Serializer &ser);
- Object *getObject(reg_t pos);
- const Object *getObject(reg_t pos) const;
+ Object *getObject(uint16 offset);
+ const Object *getObject(uint16 offset) const;
/**
* Initializes an object within the segment manager
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 8f85577fb8..20a8240641 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -228,7 +228,7 @@ Object *SegManager::getObject(reg_t pos) const {
Script *scr = (Script *)mobj;
if (pos.offset <= scr->getBufSize() && pos.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET
&& RAW_IS_OBJECT(scr->getBuf(pos.offset))) {
- obj = scr->getObject(pos);
+ obj = scr->getObject(pos.offset);
}
}
}