diff options
author | Sven Hesse | 2009-06-19 09:43:01 +0000 |
---|---|---|
committer | Sven Hesse | 2009-06-19 09:43:01 +0000 |
commit | 0ae767ae8c4502d308fcba6a892c959c7eccab59 (patch) | |
tree | be249eac4e99802519563804f9458faaea52ddeb | |
parent | 476eaf39b5d522c4f69582841db75c7b99c8d165 (diff) | |
download | scummvm-rg350-0ae767ae8c4502d308fcba6a892c959c7eccab59.tar.gz scummvm-rg350-0ae767ae8c4502d308fcba6a892c959c7eccab59.tar.bz2 scummvm-rg350-0ae767ae8c4502d308fcba6a892c959c7eccab59.zip |
Fixing The Last Dynasty again after the opcode dispatcher changes
svn-id: r41664
-rw-r--r-- | engines/gob/inter.cpp | 6 | ||||
-rw-r--r-- | engines/gob/inter.h | 1 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 4 | ||||
-rw-r--r-- | engines/gob/inter_v5.cpp | 40 |
4 files changed, 10 insertions, 41 deletions
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index dacba86add..8988d0b825 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -114,11 +114,7 @@ void Inter::executeOpcodeGob(int i, OpGobParams ¶ms) { return; } - int16 val; - - _vm->_global->_inter_execPtr -= 2; - val = load16(); - _vm->_global->_inter_execPtr += val << 1; + _vm->_global->_inter_execPtr += params.paramCount << 1; warning("unimplemented opcodeGob: %d [0x%X]", i, i); } diff --git a/engines/gob/inter.h b/engines/gob/inter.h index a1f22fa930..852a99f9db 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -61,6 +61,7 @@ struct OpFuncParams { }; struct OpGobParams { int16 extraData; + int16 paramCount; VariableReference retVarPtr; Goblin::Gob_Object *objDesc; }; diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 078d644dd6..e7f3bd198d 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1259,7 +1259,9 @@ bool Inter_v2::o2_goblinFunc(OpFuncParams ¶ms) { int16 cmd; cmd = load16(); - _vm->_global->_inter_execPtr += 2; + + gobParams.paramCount = load16(); + gobParams.extraData = cmd; if (cmd != 101) executeOpcodeGob(cmd, gobParams); diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp index 0d089af1ae..70ae183e1d 100644 --- a/engines/gob/inter_v5.cpp +++ b/engines/gob/inter_v5.cpp @@ -235,14 +235,12 @@ bool Inter_v5::o5_istrlen(OpFuncParams ¶ms) { } void Inter_v5::o5_spaceShooter(OpGobParams ¶ms) { - int16 paramCount = load16(); - warning("Dynasty Stub: Space shooter: %d, %d, %s", - params.extraData, paramCount, _vm->_game->_curTotFile); + params.extraData, params.paramCount, _vm->_game->_curTotFile); - if (paramCount < 4) { + if (params.paramCount < 4) { warning("Space shooter variable counter < 4"); - _vm->_global->_inter_execPtr += paramCount * 2; + _vm->_global->_inter_execPtr += params.paramCount * 2; return; } @@ -256,18 +254,16 @@ void Inter_v5::o5_spaceShooter(OpGobParams ¶ms) { WRITE_VARO_UINT32(var1, 2); WRITE_VARO_UINT32(var2, 0); } else { - if (paramCount < 5) { + if (params.paramCount < 5) { warning("Space shooter variable counter < 5"); return; } - _vm->_global->_inter_execPtr += (paramCount - 4) * 2; + _vm->_global->_inter_execPtr += (params.paramCount - 4) * 2; } } void Inter_v5::o5_getSystemCDSpeed(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 100); // Fudging 100% Video::FontDesc *font; @@ -280,8 +276,6 @@ void Inter_v5::o5_getSystemCDSpeed(OpGobParams ¶ms) { } void Inter_v5::o5_getSystemRAM(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 100); // Fudging 100% Video::FontDesc *font; @@ -294,8 +288,6 @@ void Inter_v5::o5_getSystemRAM(OpGobParams ¶ms) { } void Inter_v5::o5_getSystemCPUSpeed(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 100); // Fudging 100% Video::FontDesc *font; @@ -308,8 +300,6 @@ void Inter_v5::o5_getSystemCPUSpeed(OpGobParams ¶ms) { } void Inter_v5::o5_getSystemDrawSpeed(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 100); // Fudging 100% Video::FontDesc *font; @@ -322,8 +312,6 @@ void Inter_v5::o5_getSystemDrawSpeed(OpGobParams ¶ms) { } void Inter_v5::o5_totalSystemSpecs(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 100); // Fudging 100% Video::FontDesc *font; @@ -338,8 +326,6 @@ void Inter_v5::o5_totalSystemSpecs(OpGobParams ¶ms) { void Inter_v5::o5_saveSystemSpecs(OpGobParams ¶ms) { warning("Dynasty Stub: Saving system specifications"); - _vm->_global->_inter_execPtr += 2; - /* FILE *f = fopen("SAVE\\SPEED.INF", w); fwrite(&_cdSpeed, sizeof(_cdSpeed), 1, f); @@ -354,8 +340,6 @@ void Inter_v5::o5_saveSystemSpecs(OpGobParams ¶ms) { void Inter_v5::o5_loadSystemSpecs(OpGobParams ¶ms) { warning("Dynasty Stub: Loading system specifications"); - _vm->_global->_inter_execPtr += 2; - /* FILE *f = fopen("SAVE\\SPEED.INF", r); fread(&_cdSpeed, sizeof(_cdSpeed), 1, f); @@ -392,16 +376,12 @@ void Inter_v5::o5_loadSystemSpecs(OpGobParams ¶ms) { void Inter_v5::o5_gob92(OpGobParams ¶ms) { warning("Dynasty Stub: GobFunc 92"); - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 0 /* (uint32) ((int32) ((int8) _gob92_1)) */); } void Inter_v5::o5_gob95(OpGobParams ¶ms) { warning("Dynasty Stub: GobFunc 95"); - _vm->_global->_inter_execPtr += 2; - WRITE_VAR_UINT32(load16(), 0 /* (uint32) ((int32) ((int16) speedThrottle4)) */); WRITE_VAR_UINT32(load16(), 0 /* (uint32) ((int32) ((int8) speedThrottle3)) */); WRITE_VAR_UINT32(load16(), 0 /* (uint32) ((int32) ((int8) speedThrottle2)) */); @@ -412,8 +392,6 @@ void Inter_v5::o5_gob96(OpGobParams ¶ms) { int16 speedThrottle4, speedThrottle1; byte speedThrottle3, speedThrottle2; - _vm->_global->_inter_execPtr += 2; - speedThrottle4 = READ_VAR_UINT16(load16()); speedThrottle3 = READ_VAR_UINT8(load16()); speedThrottle2 = READ_VAR_UINT8(load16()); @@ -427,19 +405,13 @@ void Inter_v5::o5_gob96(OpGobParams ¶ms) { void Inter_v5::o5_gob97(OpGobParams ¶ms) { _gob_97_98_val = 1; - - _vm->_global->_inter_execPtr += 2; } void Inter_v5::o5_gob98(OpGobParams ¶ms) { _gob_97_98_val = 0; - - _vm->_global->_inter_execPtr += 2; } void Inter_v5::o5_gob100(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - uint16 var1 = READ_VAR_UINT16(load16()); uint16 var2 = READ_VAR_UINT16(load16()); uint16 var3 = READ_VAR_UINT16(load16()); @@ -452,8 +424,6 @@ void Inter_v5::o5_gob100(OpGobParams ¶ms) { } void Inter_v5::o5_gob200(OpGobParams ¶ms) { - _vm->_global->_inter_execPtr += 2; - uint16 var1 = load16(); // index into the spritesArray uint16 var2 = load16(); uint16 var3 = load16(); |