From c4fc0cee96ed4e287385fdb75d6c81f0d4a552dc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:17 +0100 Subject: AGOS: Make GPL headers consistent in themselves. --- engines/agos/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/agos/debug.cpp') diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index 841ac6bb1a..9dd6db911f 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3 From b53487fe388668e22a81f3de83755e76003c48f6 Mon Sep 17 00:00:00 2001 From: Kirben Date: Wed, 5 Mar 2014 14:27:48 +1100 Subject: AGOS: Update debug tables. --- engines/agos/debug.cpp | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'engines/agos/debug.cpp') diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index 9dd6db911f..ad5bfb56f4 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -101,7 +101,7 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { } case 'W':{ - int n = (int16)READ_BE_UINT16(p); + uint16 n = READ_BE_UINT16(p); p += 2; if (getGameType() == GType_PP) { if (n >= 60000 && n < 62048) @@ -222,14 +222,18 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { error("dumpVideoScript: Opcode %d out of range (%d)", opcode, _numVideoOpcodes); } - if (getGameType() == GType_FF || getGameType() == GType_PP) { + if (getGameType() == GType_PP) { + strn = str = puzzlepack_videoOpcodeNameTable[opcode]; + } else if (getGameType() == GType_FF) { strn = str = feeblefiles_videoOpcodeNameTable[opcode]; } else if (getGameType() == GType_SIMON2) { strn = str = simon2_videoOpcodeNameTable[opcode]; } else if (getGameType() == GType_SIMON1) { strn = str = simon1_videoOpcodeNameTable[opcode]; - } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { + } else if (getGameType() == GType_WW) { strn = str = ww_videoOpcodeNameTable[opcode]; + } else if (getGameType() == GType_ELVIRA2) { + strn = str = elvira2_videoOpcodeNameTable[opcode]; } else if (getGameType() == GType_ELVIRA1) { strn = str = elvira1_videoOpcodeNameTable[opcode]; } else { @@ -250,25 +254,39 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { case 'x': debugN("\n"); return; - case 'b': + case 'b': { debugN("%d ", *src++); break; - case 'd': + } + case 'w': { + int16 v = (int16)readUint16Wrapper(src); + src += 2; + if (v < 0) + debugN("[%d] ", -v); + else + debugN("%d ", v); + break; + } + case 'd': { debugN("%d ", (int16)readUint16Wrapper(src)); src += 2; break; - case 'v': + } + case 'v': { debugN("[%d] ", readUint16Wrapper(src)); src += 2; break; - case 'i': + } + case 'i': { debugN("%d ", (int16)readUint16Wrapper(src)); src += 2; break; - case 'j': + } + case 'j': { debugN("-> "); break; - case 'q': + } + case 'q': { while (readUint16Wrapper(src) != end) { debugN("(%d,%d) ", readUint16Wrapper(src), readUint16Wrapper(src + 2)); @@ -276,6 +294,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { } src += 2; break; + } default: error("dumpVideoScript: Invalid fmt string '%c' in decompile VGA", *str); } -- cgit v1.2.3