diff options
author | Vincent Hamm | 2002-04-19 18:05:26 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-04-19 18:05:26 +0000 |
commit | ed6b863e7cc2830432d14c84d8721ba90149cf31 (patch) | |
tree | 2667945f5fcc8a957d4da0665d05b03c7e668f6c | |
parent | f5a8c89eb3ba6cc579bf8654844ac8836ceaaa46 (diff) | |
download | scummvm-rg350-ed6b863e7cc2830432d14c84d8721ba90149cf31.tar.gz scummvm-rg350-ed6b863e7cc2830432d14c84d8721ba90149cf31.tar.bz2 scummvm-rg350-ed6b863e7cc2830432d14c84d8721ba90149cf31.zip |
Fixed a roomOps that was creating a lots of bugs in indy and Zak
svn-id: r4016
-rw-r--r-- | script.cpp | 2 | ||||
-rw-r--r-- | script_v1.cpp | 28 |
2 files changed, 12 insertions, 18 deletions
diff --git a/script.cpp b/script.cpp index 069d8ccb40..cc0e27b038 100644 --- a/script.cpp +++ b/script.cpp @@ -272,7 +272,7 @@ void Scumm::executeScript() _opcode = fetchScriptByte(); _scriptPointerStart = _scriptPointer; vm.slot[_currentScript].didexec = 1; - //debug(1, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]); + debug(1, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]); op = getOpcode(_opcode); (this->*op) (); } diff --git a/script_v1.cpp b/script_v1.cpp index 636d3cf77a..50322fb45e 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -1320,10 +1320,13 @@ void Scumm::o5_getActorY() void Scumm::o5_getAnimCounter() { + Actor *a; getResultPos(); - setResult(derefActorSafe - (getVarOrDirectByte(0x80), - "o5_getActorAnimCounter")->cost.animCounter1); + a=derefActorSafe(getVarOrDirectByte(0x80),"o5_getActorAnimCounter"); + if(a) // FIXME + setResult(a->cost.animCounter1); + else + setResult(0); } void Scumm::o5_getClosestObjActor() @@ -1890,16 +1893,8 @@ void Scumm::o5_roomOps() int a = 0, b = 0, c, d, e; if (_features & GF_OLD256) { - a = getVarOrDirectByte(0x80); - b = getVarOrDirectByte(0x40); - if (_gameId == GID_INDY3_256 && (a == 0 || a ==16) && b == 0) { /* FIXME */ - // Set screen height - c = fetchScriptByte(); - d = fetchScriptByte(); - e = fetchScriptByte(); - initScreens(0, a, 320, c); - return; - } + a = getVarOrDirectWord(0x80); + b = getVarOrDirectWord(0x40); } _opcode = fetchScriptByte(); @@ -1976,10 +1971,9 @@ void Scumm::o5_roomOps() e = getVarOrDirectByte(0x40); setScaleItem(e - 1, b, a, d, c); case 8: /* room scale? */ - - a = getVarOrDirectByte(0x80); - b = getVarOrDirectByte(0x40); - c = getVarOrDirectByte(0x20); +// a = getVarOrDirectByte(0x80); +// b = getVarOrDirectByte(0x40); +// c = getVarOrDirectByte(0x20); darkenPalette(b, c, a, a, a); break; case 9: /* ? */ |