mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 00:42:24 +00:00
SCI: Updated Script::getObjectMap()
It now returns a reference to the object list instead of copying it
This commit is contained in:
parent
3e98c56377
commit
5969c6bd2e
@ -87,7 +87,7 @@ public:
|
||||
SegmentId getLocalsSegment() const { return _localsSegment; }
|
||||
reg_t *getLocalsBegin() { return _localsBlock ? _localsBlock->_locals.begin() : NULL; }
|
||||
void syncLocalsBlock(SegManager *segMan);
|
||||
ObjMap getObjectMap() const { return _objects; }
|
||||
ObjMap &getObjectMap() { return _objects; }
|
||||
|
||||
public:
|
||||
Script();
|
||||
|
@ -269,7 +269,7 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) {
|
||||
|
||||
if (mobj->getType() == SEG_TYPE_SCRIPT) {
|
||||
// It's a script, scan all objects in it
|
||||
const Script *scr = (const Script *)mobj;
|
||||
Script *scr = (Script *)mobj;
|
||||
ObjMap objects = scr->getObjectMap();
|
||||
for (ObjMap::const_iterator it = objects.begin(); it != objects.end(); ++it) {
|
||||
objpos.offset = it->_value.getPos().offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user