diff options
author | Travis Howell | 2006-10-16 09:44:47 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-16 09:44:47 +0000 |
commit | a965e8140c166940f691b85d62c69272a6efefe2 (patch) | |
tree | edd30dc4dcedea8371a34de7ba1fe3bf0014d7c8 | |
parent | 45400860f0d7cc54a6dd36e533f74951dc617a77 (diff) | |
download | scummvm-rg350-a965e8140c166940f691b85d62c69272a6efefe2.tar.gz scummvm-rg350-a965e8140c166940f691b85d62c69272a6efefe2.tar.bz2 scummvm-rg350-a965e8140c166940f691b85d62c69272a6efefe2.zip |
Add more opcode differences for WW
svn-id: r24348
-rw-r--r-- | engines/agos/agos.cpp | 4 | ||||
-rw-r--r-- | engines/agos/agos.h | 4 | ||||
-rw-r--r-- | engines/agos/debug.h | 8 | ||||
-rw-r--r-- | engines/agos/script.cpp | 24 |
4 files changed, 22 insertions, 18 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 46ff3e21cd..855eed5af2 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -1984,7 +1984,7 @@ Item *AGOSEngine::findInByClass(Item *i, int16 m) { return NULL; } -Item *AGOSEngine::findMaster(int16 pe, int16 a, int16 n) { +Item *AGOSEngine::findMaster(int16 a, int16 n) { uint j; for (j = 1; j < _itemArraySize; j++) { @@ -1996,7 +1996,7 @@ Item *AGOSEngine::findMaster(int16 pe, int16 a, int16 n) { return NULL; } -Item *AGOSEngine::nextMaster(int16 pe, Item *i, int16 a, int16 n) { +Item *AGOSEngine::nextMaster(Item *i, int16 a, int16 n) { uint j; uint first = itemPtrToID(i) + 1; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index ca35d71e26..7433324465 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1046,8 +1046,8 @@ public: void o_unfreezeZones(); Item *findInByClass(Item *i, int16 m); - Item *findMaster(int16 pe, int16 a, int16 n); - Item *nextMaster(int16 pe, Item *item, int16 a, int16 n); + Item *findMaster(int16 a, int16 n); + Item *nextMaster(Item *item, int16 a, int16 n); int16 levelOf(Item *item); int wordMatch(Item *item, int16 a, int16 n); diff --git a/engines/agos/debug.h b/engines/agos/debug.h index ae54b57771..d98d507afd 100644 --- a/engines/agos/debug.h +++ b/engines/agos/debug.h @@ -503,8 +503,8 @@ static const char *const elvira2_opcodeNameTable[256] = { /* 92 */ "IB|GET_CHILDREN", NULL, - NULL, - NULL, + "BB|FIND_MASTER", + "IBB|NEXT_MASTER", /* 96 */ "WB|PICTURE", "W|LOAD_ZONE", @@ -736,8 +736,8 @@ static const char *const waxworks_opcodeNameTable[256] = { /* 92 */ "IB|GET_CHILDREN", NULL, - NULL, - NULL, + "BB|FIND_MASTER", + "IBB|NEXT_MASTER", /* 96 */ "WB|PICTURE", "W|LOAD_ZONE", diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index b7c05cd0e5..361bca01e9 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -360,6 +360,8 @@ void AGOSEngine::setupElvira2Opcodes(OpcodeProc *op) { op[75] = &AGOSEngine::oe1_pcName; op[83] = &AGOSEngine::o1_rescan; op[89] = &AGOSEngine::oe2_loadUserGame; + op[94] = &AGOSEngine::oe1_findMaster; + op[95] = &AGOSEngine::oe1_nextMaster; op[98] = &AGOSEngine::o1_animate; op[99] = &AGOSEngine::o1_stopAnimate; op[123] = &AGOSEngine::oe1_setTime; @@ -424,6 +426,8 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { op[83] = &AGOSEngine::o1_rescan; op[85] = &AGOSEngine::oww_whereTo; op[89] = &AGOSEngine::oe2_loadUserGame; + op[94] = &AGOSEngine::oe1_findMaster; + op[95] = &AGOSEngine::oe1_nextMaster; op[98] = &AGOSEngine::o1_animate; op[99] = &AGOSEngine::o1_stopAnimate; op[105] = &AGOSEngine::oww_menu; @@ -1884,9 +1888,9 @@ void AGOSEngine::oe1_whatO() { int a = getVarOrWord(); if (a == 1) - _subjectItem = findMaster(levelOf(me()), _scriptAdj1,_scriptNoun1); + _subjectItem = findMaster(_scriptAdj1,_scriptNoun1); else - _objectItem = findMaster(levelOf(me()), _scriptAdj2, _scriptNoun2); + _objectItem = findMaster(_scriptAdj2, _scriptNoun2); } void AGOSEngine::oe1_weigh() { @@ -2047,32 +2051,32 @@ void AGOSEngine::oe1_clearUserItem() { void AGOSEngine::oe1_findMaster() { // 219: find master int16 ad, no; - int16 d = getVarOrWord(); + int16 d = getVarOrByte(); ad = (d == 1) ? _scriptAdj1 : _scriptAdj2; no = (d == 1) ? _scriptNoun1 : _scriptNoun2; - d = getVarOrWord(); + d = getVarOrByte(); if (d == 1) - _subjectItem = findMaster(levelOf(me()), ad, no); + _subjectItem = findMaster(ad, no); else - _objectItem = findMaster(levelOf(me()), ad, no); + _objectItem = findMaster(ad, no); } void AGOSEngine::oe1_nextMaster() { // 220: next master int16 ad, no; Item *item = getNextItemPtr(); - int16 d = getVarOrWord(); + int16 d = getVarOrByte(); ad = (d == 1) ? _scriptAdj1 : _scriptAdj2; no = (d == 1) ? _scriptNoun1 : _scriptNoun2; - d = getVarOrWord(); + d = getVarOrByte(); if (d == 1) - _subjectItem = nextMaster(levelOf(me()), item, ad, no); + _subjectItem = nextMaster(item, ad, no); else - _objectItem = nextMaster(levelOf(me()), item, ad, no); + _objectItem = nextMaster(item, ad, no); } void AGOSEngine::oe1_menu() { |