[Scummvm-cvs-logs] SF.net SVN: scummvm:[51318] tools/branches/gsoc2010-decompiler/decompiler
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Jul 26 17:03:32 CEST 2010
Revision: 51318
http://scummvm.svn.sourceforge.net/scummvm/?rev=51318&view=rev
Author: fingolfin
Date: 2010-07-26 15:03:31 +0000 (Mon, 26 Jul 2010)
Log Message:
-----------
Add START_SUBOPCODE_WITH_PREFIX
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-07-26 15:00:15 UTC (rev 51317)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-07-26 15:03:31 UTC (rev 51318)
@@ -108,20 +108,20 @@
OPCODE_MD(0x68, "beginCutscene", kSpecial, 0x1000, "", "l"); // Variable stack arguments
OPCODE(0x69, "stopMusic", kSpecial, 0, "");
OPCODE_MD(0x6A, "freezeUnfreeze", kSpecial, -1, "", "p");
- START_SUBOPCODE(0x6B); // cursorCommand
- OPCODE(0x90, "cursorCmd_CursorOn", kSpecial, 0, "");
- OPCODE(0x91, "cursorCmd_CursorOff", kSpecial, 0, "");
- OPCODE(0x92, "cursorCmd_UserputOn", kSpecial, 0, "");
- OPCODE(0x93, "cursorCmd_UserputOff", kSpecial, 0, "");
- OPCODE(0x94, "cursorCmd_SoftOn", kSpecial, 0, "");
- OPCODE(0x95, "cursorCmd_SoftOff", kSpecial, 0, "");
- OPCODE(0x96, "cursorCmd_UserputSoftOn", kSpecial, 0, "");
- OPCODE(0x97, "cursorCmd_UserputSoftOff", kSpecial, 0, "");
- OPCODE_MD(0x99, "cursorCmd_Image", kSpecial, -2, "", "z");
- OPCODE_MD(0x9A, "cursorCmd_Hotspot", kSpecial, -2, "", "pp");
- OPCODE_MD(0x9C, "cursorCmd_CharsetSet", kSpecial, -1, "", "p");
- OPCODE_MD(0x9D, "cursorCmd_CharsetColors", kSpecial, 0x1000, "", "l"); // Variable stack arguments
- OPCODE_MD(0xD6, "cursorCmd_Transparent", kSpecial, -1, "", "p");
+ START_SUBOPCODE_WITH_PREFIX(0x6B, "cursorCommand");
+ OPCODE(0x90, "cursorOn", kSpecial, 0, "");
+ OPCODE(0x91, "cursorOff", kSpecial, 0, "");
+ OPCODE(0x92, "userputOn", kSpecial, 0, "");
+ OPCODE(0x93, "userputOff", kSpecial, 0, "");
+ OPCODE(0x94, "softCursorOn", kSpecial, 0, "");
+ OPCODE(0x95, "softCursorOff", kSpecial, 0, "");
+ OPCODE(0x96, "softUserputOn", kSpecial, 0, "");
+ OPCODE(0x97, "softUserputOff", kSpecial, 0, "");
+ OPCODE_MD(0x99, "setCursorImg", kSpecial, -2, "", "z");
+ OPCODE_MD(0x9A, "setCursorHotspot", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x9C, "initCharset", kSpecial, -1, "", "p");
+ OPCODE_MD(0x9D, "charsetColors", kSpecial, 0x1000, "", "l"); // Variable stack arguments
+ OPCODE_MD(0xD6, "setCursorTransparency", kSpecial, -1, "", "p");
END_SUBOPCODE;
OPCODE(0x6C, "breakHere", kSpecial, 0, "");
OPCODE_MD(0x6D, "ifClassOfIs", kSpecial, 0x1011, "", "rlp"); // Variable stack arguments
@@ -168,116 +168,116 @@
OPCODE_MD(0x98, "isSoundRunning", kSpecial, 0, "", "rp");
OPCODE_MD(0x99, "setBoxFlags", kSpecial, 0x1100, "", "pl"); // Variable stack arguments
OPCODE(0x9A, "createBoxMatrix", kSpecial, 0, "");
- START_SUBOPCODE(0x9B); // resourceRoutines
- OPCODE_MD(0x64, "resRoutine_loadScript", kSpecial, -1, "", "p");
- OPCODE_MD(0x65, "resRoutine_loadSound", kSpecial, -1, "", "p");
- OPCODE_MD(0x66, "resRoutine_loadCostume", kSpecial, -1, "", "p");
- OPCODE_MD(0x67, "resRoutine_loadRoom", kSpecial, -1, "", "p");
- OPCODE_MD(0x68, "resRoutine_nukeScript", kSpecial, -1, "", "p");
- OPCODE_MD(0x69, "resRoutine_nukeSound", kSpecial, -1, "", "p");
- OPCODE_MD(0x6A, "resRoutine_nukeCostume", kSpecial, -1, "", "p");
- OPCODE_MD(0x6B, "resRoutine_nukeRoom", kSpecial, -1, "", "p");
- OPCODE_MD(0x6C, "resRoutine_lockScript", kSpecial, -1, "", "p");
- OPCODE_MD(0x6D, "resRoutine_lockSound", kSpecial, -1, "", "p");
- OPCODE_MD(0x6E, "resRoutine_lockCostume", kSpecial, -1, "", "p");
- OPCODE_MD(0x6F, "resRoutine_lockRoom", kSpecial, -1, "", "p");
- OPCODE_MD(0x70, "resRoutine_unlockScript", kSpecial, -1, "", "p");
- OPCODE_MD(0x71, "resRoutine_unlockSound", kSpecial, -1, "", "p");
- OPCODE_MD(0x72, "resRoutine_unlockCostume", kSpecial, -1, "", "p");
- OPCODE_MD(0x73, "resRoutine_unlockRoom", kSpecial, -1, "", "p");
- OPCODE_MD(0x75, "resRoutine_loadCharset", kSpecial, -1, "", "p");
- OPCODE_MD(0x76, "resRoutine_nukeCharset", kSpecial, -1, "", "p");
- OPCODE_MD(0x77, "resRoutine_loadFlObject", kSpecial, -2, "", "pp");
+ START_SUBOPCODE_WITH_PREFIX(0x9B, "resourceRoutines");
+ OPCODE_MD(0x64, "loadScript", kSpecial, -1, "", "p");
+ OPCODE_MD(0x65, "loadSound", kSpecial, -1, "", "p");
+ OPCODE_MD(0x66, "loadCostume", kSpecial, -1, "", "p");
+ OPCODE_MD(0x67, "loadRoom", kSpecial, -1, "", "p");
+ OPCODE_MD(0x68, "nukeScript", kSpecial, -1, "", "p");
+ OPCODE_MD(0x69, "nukeSound", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6A, "nukeCostume", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6B, "nukeRoom", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6C, "lockScript", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6D, "lockSound", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6E, "lockCostume", kSpecial, -1, "", "p");
+ OPCODE_MD(0x6F, "lockRoom", kSpecial, -1, "", "p");
+ OPCODE_MD(0x70, "unlockScript", kSpecial, -1, "", "p");
+ OPCODE_MD(0x71, "unlockSound", kSpecial, -1, "", "p");
+ OPCODE_MD(0x72, "unlockCostume", kSpecial, -1, "", "p");
+ OPCODE_MD(0x73, "unlockRoom", kSpecial, -1, "", "p");
+ OPCODE_MD(0x75, "loadCharset", kSpecial, -1, "", "p");
+ OPCODE_MD(0x76, "nukeCharset", kSpecial, -1, "", "p");
+ OPCODE_MD(0x77, "loadFlObject", kSpecial, -2, "", "pp");
END_SUBOPCODE;
- START_SUBOPCODE(0x9C); // roomOps
- OPCODE_MD(0xAC, "roomOp_roomScroll", kSpecial, -2, "", "pp");
- OPCODE_MD(0xAE, "roomOp_setScreen", kSpecial, -2, "", "pp");
- OPCODE_MD(0xAF, "roomOp_setPalColor", kSpecial, -4, "", "pppp");
- OPCODE(0xB0, "roomOp_shakeOn", kSpecial, 0, "");
- OPCODE(0xB1, "roomOp_shakeOff", kSpecial, 0, "");
- OPCODE_MD(0xB3, "roomOp_darkenPalette", kSpecial, -3, "", "ppp");
- OPCODE_MD(0xB4, "roomOp_saveLoadRoom", kSpecial, -2, "", "pp");
- OPCODE_MD(0xB5, "roomOp_screenEffect", kSpecial, -1, "", "p");
- OPCODE_MD(0xB6, "roomOp_darkenPaletteRGB", kSpecial, -5, "", "ppppp");
- OPCODE_MD(0xB7, "roomOp_setupShadowPalette", kSpecial, -5, "", "ppppp");
- OPCODE_MD(0xBA, "roomOp_palManipulate", kSpecial, -4, "", "pppp");
- OPCODE_MD(0xBB, "roomOp_colorCycleDelay", kSpecial, -2, "", "pp");
- OPCODE_MD(0xD5, "roomOp_setPalette", kSpecial, -1, "", "p");
- OPCODE_MD(0xDC, "roomOp_copyPalColor", kSpecial, -2, "", "pp");
+ START_SUBOPCODE_WITH_PREFIX(0x9C, "roomOps");
+ OPCODE_MD(0xAC, "roomScroll", kSpecial, -2, "", "pp");
+ OPCODE_MD(0xAE, "setScreen", kSpecial, -2, "", "pp");
+ OPCODE_MD(0xAF, "setPalColor", kSpecial, -4, "", "pppp");
+ OPCODE(0xB0, "shakeOn", kSpecial, 0, "");
+ OPCODE(0xB1, "shakeOff", kSpecial, 0, "");
+ OPCODE_MD(0xB3, "darkenPalette", kSpecial, -3, "", "ppp");
+ OPCODE_MD(0xB4, "saveLoadRoom", kSpecial, -2, "", "pp");
+ OPCODE_MD(0xB5, "screenEffect", kSpecial, -1, "", "p");
+ OPCODE_MD(0xB6, "darkenPaletteRGB", kSpecial, -5, "", "ppppp");
+ OPCODE_MD(0xB7, "setupShadowPalette", kSpecial, -5, "", "ppppp");
+ OPCODE_MD(0xBA, "palManipulate", kSpecial, -4, "", "pppp");
+ OPCODE_MD(0xBB, "colorCycleDelay", kSpecial, -2, "", "pp");
+ OPCODE_MD(0xD5, "setPalette", kSpecial, -1, "", "p");
+ OPCODE_MD(0xDC, "copyPalColor", kSpecial, -2, "", "pp");
END_SUBOPCODE;
- START_SUBOPCODE(0x9D); // actorOps
- OPCODE_MD(0x4C, "actorOp_setCostume", kSpecial, -1, "", "p");
- OPCODE_MD(0x4D, "actorOp_setWalkSpeed", kSpecial, -2, "", "pp");
- OPCODE_MD(0x4E, "actorOp_setSound", kSpecial, 0x1000, "", "l"); // Variable stack arguments
- OPCODE_MD(0x4F, "actorOp_setWalkFrame", kSpecial, -1, "", "p");
- OPCODE_MD(0x50, "actorOp_setTalkFrame", kSpecial, -2, "", "pp");
- OPCODE_MD(0x51, "actorOp_setStandFrame", kSpecial, -1, "", "p");
- OPCODE_MD(0x52, "actorOp_82?", kSpecial, -3, "", "ppp");
- OPCODE(0x53, "actorOp_init", kSpecial, 0, "");
- OPCODE_MD(0x54, "actorOp_setElevation", kSpecial, -1, "", "p");
- OPCODE(0x55, "actorOp_setDefAnim", kSpecial, 0, "");
- OPCODE_MD(0x56, "actorOp_setPalette", kSpecial, -2, "", "pp");
- OPCODE_MD(0x57, "actorOp_setTalkColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x58, "actorOp_setName", kSpecial, 0, "c", "s");
- OPCODE_MD(0x59, "actorOp_setInitFrame", kSpecial, -1, "", "p");
- OPCODE_MD(0x5B, "actorOp_setWidth", kSpecial, -1, "", "p");
- OPCODE_MD(0x5C, "actorOp_setScale", kSpecial, -1, "", "p");
- OPCODE(0x5D, "actorOp_setNeverZClip", kSpecial, 0, "");
- OPCODE_MD(0x5E, "actorOp_setAlwaysZClip", kSpecial, -1, "", "p");
- OPCODE(0x5F, "actorOp_setIgnoreBoxes", kSpecial, 0, "");
- OPCODE(0x60, "actorOp_setFollowBoxes", kSpecial, 0, "");
- OPCODE_MD(0x61, "actorOp_setAnimSpeed", kSpecial, -1, "", "p");
- OPCODE_MD(0x62, "actorOp_setShadowMode", kSpecial, -1, "", "p");
- OPCODE_MD(0x63, "actorOp_setTalkPos", kSpecial, -2, "", "pp");
- OPCODE_MD(0xC5, "actorOp_setCurActor", kSpecial, -1, "", "p");
- OPCODE_MD(0xC6, "actorOp_setAnimVar", kSpecial, -2, "", "pp");
- OPCODE(0xD7, "actorOp_setIgnoreTurnsOn", kSpecial, 0, "");
- OPCODE(0xD8, "actorOp_setIgnoreTurnsOff", kSpecial, 0, "");
- OPCODE(0xD9, "actorOp_initLittle", kSpecial, 0, "");
- OPCODE_MD(0xE1, "actorOp_setAlwaysZClip?", kSpecial, -1, "", "p");
- OPCODE_MD(0xE3, "actorOp_setLayer", kSpecial, -1, "", "p");
- OPCODE_MD(0xE4, "actorOp_setWalkScript", kSpecial, -1, "", "p");
- OPCODE(0xE5, "actorOp_setStanding", kSpecial, 0, "");
- OPCODE_MD(0xE6, "actorOp_setDirection", kSpecial, -1, "", "p");
- OPCODE_MD(0xE7, "actorOp_turnToDirection", kSpecial, -1, "", "p");
- OPCODE(0xE9, "actorOp_freeze", kSpecial, 0, "");
- OPCODE(0xEA, "actorOp_unfreeze", kSpecial, 0, "");
- OPCODE_MD(0xEB, "actorOp_setTalkScript", kSpecial, -1, "", "p");
+ START_SUBOPCODE_WITH_PREFIX(0x9D, "actorOps");
+ OPCODE_MD(0x4C, "setCostume", kSpecial, -1, "", "p");
+ OPCODE_MD(0x4D, "setWalkSpeed", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x4E, "setSound", kSpecial, 0x1000, "", "l"); // Variable stack arguments
+ OPCODE_MD(0x4F, "setWalkFrame", kSpecial, -1, "", "p");
+ OPCODE_MD(0x50, "setTalkFrame", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x51, "setStandFrame", kSpecial, -1, "", "p");
+ OPCODE_MD(0x52, "82?", kSpecial, -3, "", "ppp");
+ OPCODE(0x53, "init", kSpecial, 0, "");
+ OPCODE_MD(0x54, "setElevation", kSpecial, -1, "", "p");
+ OPCODE(0x55, "setDefAnim", kSpecial, 0, "");
+ OPCODE_MD(0x56, "setPalette", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x57, "setTalkColor", kSpecial, -1, "", "p");
+ OPCODE_MD(0x58, "setName", kSpecial, 0, "c", "s");
+ OPCODE_MD(0x59, "setInitFrame", kSpecial, -1, "", "p");
+ OPCODE_MD(0x5B, "setWidth", kSpecial, -1, "", "p");
+ OPCODE_MD(0x5C, "setScale", kSpecial, -1, "", "p");
+ OPCODE(0x5D, "setNeverZClip", kSpecial, 0, "");
+ OPCODE_MD(0x5E, "setAlwaysZClip", kSpecial, -1, "", "p");
+ OPCODE(0x5F, "setIgnoreBoxes", kSpecial, 0, "");
+ OPCODE(0x60, "setFollowBoxes", kSpecial, 0, "");
+ OPCODE_MD(0x61, "setAnimSpeed", kSpecial, -1, "", "p");
+ OPCODE_MD(0x62, "setShadowMode", kSpecial, -1, "", "p");
+ OPCODE_MD(0x63, "setTalkPos", kSpecial, -2, "", "pp");
+ OPCODE_MD(0xC5, "setCurActor", kSpecial, -1, "", "p");
+ OPCODE_MD(0xC6, "setAnimVar", kSpecial, -2, "", "pp");
+ OPCODE(0xD7, "setIgnoreTurnsOn", kSpecial, 0, "");
+ OPCODE(0xD8, "setIgnoreTurnsOff", kSpecial, 0, "");
+ OPCODE(0xD9, "initLittle", kSpecial, 0, "");
+ OPCODE_MD(0xE1, "setAlwaysZClip?", kSpecial, -1, "", "p");
+ OPCODE_MD(0xE3, "setLayer", kSpecial, -1, "", "p");
+ OPCODE_MD(0xE4, "setWalkScript", kSpecial, -1, "", "p");
+ OPCODE(0xE5, "setStanding", kSpecial, 0, "");
+ OPCODE_MD(0xE6, "setDirection", kSpecial, -1, "", "p");
+ OPCODE_MD(0xE7, "turnToDirection", kSpecial, -1, "", "p");
+ OPCODE(0xE9, "freeze", kSpecial, 0, "");
+ OPCODE(0xEA, "unfreeze", kSpecial, 0, "");
+ OPCODE_MD(0xEB, "setTalkScript", kSpecial, -1, "", "p");
END_SUBOPCODE;
- START_SUBOPCODE(0x9E); // verbOps
- OPCODE_MD(0x7C, "verbOp_loadImg", kSpecial, -1, "", "p");
- OPCODE_MD(0x7D, "verbOp_loadString", kSpecial, 0, "c", "s");
- OPCODE_MD(0x7E, "verbOp_setColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x7F, "verbOp_setHiColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x80, "verbOp_setXY", kSpecial, -2, "", "pp");
- OPCODE(0x81, "verbOp_setOn", kSpecial, 0, "");
- OPCODE(0x82, "verbOp_setOff", kSpecial, 0, "");
- OPCODE(0x83, "verbOp_kill", kSpecial, 0, "");
- OPCODE(0x84, "verbOp_init", kSpecial, 0, "");
- OPCODE_MD(0x85, "verbOp_setDimColor", kSpecial, -1, "", "p");
- OPCODE(0x86, "verbOp_setDimmed", kSpecial, 0, "");
- OPCODE_MD(0x87, "verbOp_setKey", kSpecial, -1, "", "p");
- OPCODE(0x88, "verbOp_setCenter", kSpecial, 0, "");
- OPCODE_MD(0x89, "verbOp_setToString", kSpecial, -1, "", "p");
- OPCODE_MD(0x8B, "verbOp_setToObject", kSpecial, -2, "", "pp");
- OPCODE_MD(0x8C, "verbOp_setBkColor", kSpecial, -1, "", "p");
- OPCODE_MD(0xC4, "verbOp_setCurVerb", kSpecial, -1, "", "p");
- OPCODE(0xFF, "verbOp_redraw", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0x9E, "verbOps");
+ OPCODE_MD(0x7C, "loadImg", kSpecial, -1, "", "p");
+ OPCODE_MD(0x7D, "loadString", kSpecial, 0, "c", "s");
+ OPCODE_MD(0x7E, "setColor", kSpecial, -1, "", "p");
+ OPCODE_MD(0x7F, "setHiColor", kSpecial, -1, "", "p");
+ OPCODE_MD(0x80, "setXY", kSpecial, -2, "", "pp");
+ OPCODE(0x81, "setOn", kSpecial, 0, "");
+ OPCODE(0x82, "setOff", kSpecial, 0, "");
+ OPCODE(0x83, "kill", kSpecial, 0, "");
+ OPCODE(0x84, "init", kSpecial, 0, "");
+ OPCODE_MD(0x85, "setDimColor", kSpecial, -1, "", "p");
+ OPCODE(0x86, "setDimmed", kSpecial, 0, "");
+ OPCODE_MD(0x87, "setKey", kSpecial, -1, "", "p");
+ OPCODE(0x88, "setCenter", kSpecial, 0, "");
+ OPCODE_MD(0x89, "setToString", kSpecial, -1, "", "p");
+ OPCODE_MD(0x8B, "setToObject", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x8C, "setBkColor", kSpecial, -1, "", "p");
+ OPCODE_MD(0xC4, "setCurVerb", kSpecial, -1, "", "p");
+ OPCODE(0xFF, "redraw", kSpecial, 0, "");
END_SUBOPCODE;
OPCODE_MD(0x9F, "getActorFromXY", kSpecial, -1, "", "rpp");
OPCODE_MD(0xA0, "findObject", kSpecial, -1, "", "rpp");
OPCODE_MD(0xA1, "pseudoRoom", kSpecial, 0x1010, "", "lp"); // Variable stack arguments
OPCODE_MD(0xA2, "getActorElevation", kSpecial, 0, "", "rp");
OPCODE_MD(0xA3, "getVerbEntrypoint", kSpecial, -1, "", "rpp");
- START_SUBOPCODE(0xA4); // arrayOps
- OPCODE_MD(0xCD, "arrayOp_assignString", kSpecial, -1, "wc", "\xC0");
- OPCODE_MD(0xD0, "arrayOp_assignIntList", kSpecial, 0x1100, "w", "\xC0"); // Variable stack arguments
- OPCODE_MD(0xD4, "arrayOp_assign2DimList", kSpecial, 0x1100, "w", "\xC0"); // Variable stack arguments
+ START_SUBOPCODE_WITH_PREFIX(0xA4, "arrayOps");
+ OPCODE_MD(0xCD, "assignString", kSpecial, -1, "wc", "\xC0");
+ OPCODE_MD(0xD0, "assignIntList", kSpecial, 0x1100, "w", "\xC0"); // Variable stack arguments
+ OPCODE_MD(0xD4, "assign2DimList", kSpecial, 0x1100, "w", "\xC0"); // Variable stack arguments
END_SUBOPCODE;
- START_SUBOPCODE(0xA5); // saveRestoreVerbs
- OPCODE_MD(0x8D, "srVerb_saveVerbs", kSpecial, -3, "", "ppp");
- OPCODE_MD(0x8E, "srVerb_restoreVerbs", kSpecial, -3, "", "ppp");
- OPCODE_MD(0x8F, "srVerb_deleteVerbs", kSpecial, -3, "", "ppp");
+ START_SUBOPCODE_WITH_PREFIX(0xA5, "saveRestoreVerbs");
+ OPCODE_MD(0x8D, "saveVerbs", kSpecial, -3, "", "ppp");
+ OPCODE_MD(0x8E, "restoreVerbs", kSpecial, -3, "", "ppp");
+ OPCODE_MD(0x8F, "deleteVerbs", kSpecial, -3, "", "ppp");
END_SUBOPCODE;
OPCODE_MD(0xA6, "drawBox", kSpecial, -5, "", "ppppp");
OPCODE(0xA7, "pop", kStack, -1, "");
@@ -294,87 +294,87 @@
OPCODE_MD(0xAB, "getActorAnimCounter", kSpecial, 0, "", "rp");
OPCODE_MD(0xAC, "soundKludge", kSpecial, 0x1000, "", "l"); // Variable stack arguments
OPCODE_MD(0xAD, "isAnyOf", kSpecial, 0x1011, "", "rlp"); // Variable stack arguments
- START_SUBOPCODE(0xAE); // systemOps
- OPCODE(0x9E, "systemOp_restartGame", kSpecial, 0, "");
- OPCODE(0x9F, "systemOp_pauseGame", kSpecial, 0, "");
- OPCODE(0xA0, "systemOp_shutDown", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xAE, "systemOps");
+ OPCODE(0x9E, "restartGame", kSpecial, 0, "");
+ OPCODE(0x9F, "pauseGame", kSpecial, 0, "");
+ OPCODE(0xA0, "shutDown", kSpecial, 0, "");
END_SUBOPCODE;
OPCODE_MD(0xAF, "isActorInBox", kSpecial, -1, "", "rpp");
OPCODE_MD(0xB0, "delay", kSpecial, -1, "", "p");
OPCODE_MD(0xB1, "delaySeconds", kSpecial, -1, "", "p");
OPCODE_MD(0xB2, "delayMinutes", kSpecial, -1, "", "p");
OPCODE(0xB3, "stopSentence", kSpecial, 0, "");
- START_SUBOPCODE(0xB4); // printLine
- OPCODE_MD(0x41, "printLineXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printLineColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printLineRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printLineCenter", kSpecial, 0, "");
- OPCODE(0x47, "printLineLeft", kSpecial, 0, "");
- OPCODE(0x48, "printLineOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printLineMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printLineMsg", kSpecial, 0, "c", "s");
- OPCODE(0xFE, "printLineBegin", kSpecial, 0, "");
- OPCODE(0xFF, "printLineEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB4, "printLine");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
- START_SUBOPCODE(0xB5); // printText
- OPCODE_MD(0x41, "printTextXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printTextColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printTextRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printTextCenter", kSpecial, 0, "");
- OPCODE(0x47, "printTextLeft", kSpecial, 0, "");
- OPCODE(0x48, "printTextOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printTextMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printTextMsg", kSpecial, 0, "c", "s");
- OPCODE(0xFE, "printTextBegin", kSpecial, 0, "");
- OPCODE(0xFF, "printTextEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB5, "printText");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
- START_SUBOPCODE(0xB6); // printDebug
- OPCODE_MD(0x41, "printDebugXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printDebugColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printDebugRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printDebugCenter", kSpecial, 0, "");
- OPCODE(0x47, "printDebugLeft", kSpecial, 0, "");
- OPCODE(0x48, "printDebugOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printDebugMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printDebugMsg", kSpecial, 0, "c", "s");
- OPCODE(0xFE, "printDebugBegin", kSpecial, 0, "");
- OPCODE(0xFF, "printDebugEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB6, "printDebug");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
- START_SUBOPCODE(0xB7); // printSystem
- OPCODE_MD(0x41, "printSystemXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printSystemColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printSystemRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printSystemCenter", kSpecial, 0, "");
- OPCODE(0x47, "printSystemLeft", kSpecial, 0, "");
- OPCODE(0x48, "printSystemOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printSystemMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printSystemMsg", kSpecial, 0, "c", "s");
- OPCODE(0xFE, "printSystemBegin", kSpecial, 0, "");
- OPCODE(0xFF, "printSystemEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB7, "printSystem");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
- START_SUBOPCODE(0xB8); // printActor
- OPCODE_MD(0x41, "printActorXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printActorColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printActorRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printActorCenter", kSpecial, 0, "");
- OPCODE(0x47, "printActorLeft", kSpecial, 0, "");
- OPCODE(0x48, "printActorOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printActorMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printActorMsg", kSpecial, 0, "c", "s");
- OPCODE_MD(0xFE, "printActorBegin", kSpecial, -1, "", "p");
- OPCODE(0xFF, "printActorEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB8, "printActor");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
- START_SUBOPCODE(0xB9); // printEgo
- OPCODE_MD(0x41, "printEgoXY", kSpecial, -2, "", "pp");
- OPCODE_MD(0x42, "printEgoColor", kSpecial, -1, "", "p");
- OPCODE_MD(0x43, "printEgoRight", kSpecial, -1, "", "p");
- OPCODE(0x45, "printEgoCenter", kSpecial, 0, "");
- OPCODE(0x47, "printEgoLeft", kSpecial, 0, "");
- OPCODE(0x48, "printEgoOverhead", kSpecial, 0, "");
- OPCODE(0x4A, "printEgoMumble", kSpecial, 0, "");
- OPCODE_MD(0x4B, "printEgoMsg", kSpecial, 0, "c", "s");
- OPCODE(0xFE, "printEgoBegin", kSpecial, 0, "");
- OPCODE(0xFF, "printEgoEnd", kSpecial, 0, "");
+ START_SUBOPCODE_WITH_PREFIX(0xB9, "printEgo");
+ OPCODE_MD(0x41, "XY", kSpecial, -2, "", "pp");
+ OPCODE_MD(0x42, "color", kSpecial, -1, "", "p");
+ OPCODE_MD(0x43, "right", kSpecial, -1, "", "p");
+ OPCODE(0x45, "center", kSpecial, 0, "");
+ OPCODE(0x47, "left", kSpecial, 0, "");
+ OPCODE(0x48, "overhead", kSpecial, 0, "");
+ OPCODE(0x4A, "mumble", kSpecial, 0, "");
+ OPCODE_MD(0x4B, "msg", kSpecial, 0, "c", "s");
+ OPCODE(0xFE, "begin", kSpecial, 0, "");
+ OPCODE(0xFF, "end", kSpecial, 0, "");
END_SUBOPCODE;
OPCODE_MD(0xBA, "talkActor", kSpecial, -1, "c", "ps");
OPCODE_MD(0xBB, "talkEgo", kSpecial, 0, "c", "s");
Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h 2010-07-26 15:00:15 UTC (rev 51317)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h 2010-07-26 15:03:31 UTC (rev 51318)
@@ -58,6 +58,7 @@
while (_f.pos() != (int)_f.size()) { \
uint32 full_opcode = 0; \
uint8 opcode = _f.readByte(); \
+ std::string opcodePrefix; \
switch (opcode) {
#define END_OPCODES \
default: \
@@ -77,7 +78,7 @@
LAST_INST._opcode = full_opcode; \
LAST_INST._address = _address; \
LAST_INST._stackChange = stackChange; \
- LAST_INST._name = std::string(name); \
+ LAST_INST._name = opcodePrefix + std::string(name); \
LAST_INST._type = category; \
LAST_INST._codeGenData = codeGenData; \
readParams(&LAST_INST, (char*)params); \
@@ -90,6 +91,11 @@
#define OPCODE(val, name, category, stackChange, params) \
OPCODE_MD(val, name, category, stackChange, params, "")
+#define START_SUBOPCODE_WITH_PREFIX(val,prefix) \
+ OPCODE_BASE(val) \
+ opcodePrefix = prefix + std::string("."); \
+ opcode = _f.readByte(); \
+ switch (opcode) {
#define START_SUBOPCODE(val) \
OPCODE_BASE(val) \
opcode = _f.readByte(); \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list