mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 04:16:34 +00:00
SCUMM: fix o_setObjectName()
The parameter can either be a FG or BG object depending on the opcode.
This commit is contained in:
parent
b31157cee3
commit
b0201a8df2
@ -756,9 +756,16 @@ void ScummEngine_v0::o_pickupObject() {
|
||||
}
|
||||
|
||||
void ScummEngine_v0::o_setObjectName() {
|
||||
int obj = fetchScriptByte();
|
||||
if (!obj)
|
||||
int obj;
|
||||
int objId = fetchScriptByte();
|
||||
if (!objId) {
|
||||
obj = _cmdObject;
|
||||
} else {
|
||||
if (_opcode & 0x80)
|
||||
obj = OBJECT_V0(objId, kObjectV0TypeBG);
|
||||
else
|
||||
obj = OBJECT_V0(objId, kObjectV0TypeFG);
|
||||
}
|
||||
setObjectName(obj);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user