mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
SCI: Inline Script::offsetIsObject()
This commit is contained in:
parent
94a80395ef
commit
0a1d1cb29b
@ -1292,10 +1292,6 @@ Common::Array<reg_t> Script::listObjectReferences() const {
|
||||
return tmp;
|
||||
}
|
||||
|
||||
bool Script::offsetIsObject(uint32 offset) const {
|
||||
return _buf->getUint16SEAt(offset + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER;
|
||||
}
|
||||
|
||||
void Script::applySaidWorkarounds() {
|
||||
// WORKAROUND: SQ3 version 1.018 has a messy vocab problem.
|
||||
// Sierra added the vocab entry "scout" to this version at group id 0x953
|
||||
|
@ -125,7 +125,11 @@ public:
|
||||
void syncLocalsBlock(SegManager *segMan);
|
||||
ObjMap &getObjectMap() { return _objects; }
|
||||
const ObjMap &getObjectMap() const { return _objects; }
|
||||
bool offsetIsObject(uint32 offset) const;
|
||||
|
||||
// speed optimization: inline due to frequent calling
|
||||
bool offsetIsObject(uint32 offset) const {
|
||||
return _buf->getUint16SEAt(offset + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER;
|
||||
}
|
||||
|
||||
public:
|
||||
Script();
|
||||
|
Loading…
x
Reference in New Issue
Block a user