SCI: Change Script::getObject() to accept a reg_t
This is needed for upcoming changes to the Script class
This commit is contained in:
parent
425926ed7e
commit
577d7e41c9
4 changed files with 11 additions and 11 deletions
|
@ -243,16 +243,16 @@ const byte *Script::getSci3ObjectsPointer() {
|
|||
return ptr;
|
||||
}
|
||||
|
||||
Object *Script::getObject(uint16 offset) {
|
||||
if (_objects.contains(offset))
|
||||
return &_objects[offset];
|
||||
Object *Script::getObject(reg_t pos) {
|
||||
if (_objects.contains(pos.offset))
|
||||
return &_objects[pos.offset];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
const Object *Script::getObject(uint16 offset) const {
|
||||
if (_objects.contains(offset))
|
||||
return &_objects[offset];
|
||||
const Object *Script::getObject(reg_t pos) const {
|
||||
if (_objects.contains(pos.offset))
|
||||
return &_objects[pos.offset];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -746,7 +746,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.offset);
|
||||
const Object *obj = getObject(addr);
|
||||
if (obj) {
|
||||
// Note all local variables, if we have a local variable environment
|
||||
if (_localsSegment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue