[Scummvm-cvs-logs] SF.net SVN: scummvm:[49633] tools/branches/gsoc2010-decompiler/decompiler/ scummv6/disassembler.cpp
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Sun Jun 13 16:19:11 CEST 2010
Revision: 49633
http://scummvm.svn.sourceforge.net/scummvm/?rev=49633&view=rev
Author: pidgeot
Date: 2010-06-13 14:19:10 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
Fix signedness of SCUMMv6 opcode parameters
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-06-13 14:02:44 UTC (rev 49632)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp 2010-06-13 14:19:10 UTC (rev 49633)
@@ -57,11 +57,11 @@
OPCODE(0x00, "pushByte", kLoad, 1, "B");
OPCODE(0x01, "pushWord", kLoad, 1, "s");
OPCODE(0x02, "pushByteVar", kLoad, 1, "B");
- OPCODE(0x03, "pushWordVar", kLoad, 1, "s");
+ OPCODE(0x03, "pushWordVar", kLoad, 1, "w");
OPCODE(0x06, "byteArrayRead", kLoad, 0, "B");
- OPCODE(0x07, "wordArrayRead", kLoad, 0, "s");
+ OPCODE(0x07, "wordArrayRead", kLoad, 0, "w");
OPCODE(0x0A, "byteArrayIndexedRead", kLoad, -1, "B");
- OPCODE(0x0B, "wordArrayIndexedRead", kLoad, -1, "s");
+ OPCODE(0x0B, "wordArrayIndexedRead", kLoad, -1, "w");
OPCODE(0x0C, "dup", kLoad, 1, "");
OPCODE(0x0D, "not", kBoolean, 0, "");
OPCODE(0x0E, "eq", kComparison, -1, "");
@@ -78,19 +78,19 @@
OPCODE(0x19, "lor", kBoolean, -1, "");
OPCODE(0x1A, "pop", kStack, -1, "");
OPCODE(0x42, "writeByteVar", kStore, -1, "B");
- OPCODE(0x43, "writeWordVar", kStore, -1, "s");
+ OPCODE(0x43, "writeWordVar", kStore, -1, "w");
OPCODE(0x46, "byteArrayWrite", kStore, -2, "B");
- OPCODE(0x47, "wordArrayWrite", kStore, -2, "s");
+ OPCODE(0x47, "wordArrayWrite", kStore, -2, "w");
OPCODE(0x4A, "byteArrayIndexedWrite", kStore, -3, "B");
- OPCODE(0x4B, "wordArrayIndexedWrite", kStore, -3, "s");
+ OPCODE(0x4B, "wordArrayIndexedWrite", kStore, -3, "w");
OPCODE(0x4E, "byteVarInc", kArithmetic, 0, "B");
- OPCODE(0x4F, "wordVarInc", kArithmetic, 0, "s");
+ OPCODE(0x4F, "wordVarInc", kArithmetic, 0, "w");
OPCODE(0x52, "byteArrayInc", kArithmetic, -1, "B");
- OPCODE(0x53, "wordArrayInc", kArithmetic, -1, "s");
+ OPCODE(0x53, "wordArrayInc", kArithmetic, -1, "w");
OPCODE(0x56, "byteVarDec", kArithmetic, 0, "B");
- OPCODE(0x57, "wordVarDec", kArithmetic, 0, "s");
+ OPCODE(0x57, "wordVarDec", kArithmetic, 0, "w");
OPCODE(0x5A, "byteArrayDec", kArithmetic, -1, "B");
- OPCODE(0x5B, "wordArrayDec", kArithmetic, -1, "s");
+ OPCODE(0x5B, "wordArrayDec", kArithmetic, -1, "w");
OPCODE(0x5C, "jumpTrue", kCondJumpRel, -1, "s");
OPCODE(0x5D, "jumpFalse", kCondJumpRel, -1, "s");
OPCODE(0x5E, "startScript", kSpecial, 0x1020, ""); //Variable stack arguments
@@ -268,9 +268,9 @@
OPCODE(0xA2, "getActorElevation", kSpecial, 0, "");
OPCODE(0xA3, "getVerbEntrypoint", kSpecial, -1, "");
START_SUBOPCODE(0xA4); //arrayOps
- OPCODE(0xCD, "arrayOp_assignString", kSpecial, -1, "sc");
- OPCODE(0xD0, "arrayOp_assignIntList", kSpecial, 0x1100, "s"); //Variable stack arguments
- OPCODE(0xD4, "arrayOp_assign2DimList", kSpecial, 0x1100, "s"); //Variable stack arguments
+ OPCODE(0xCD, "arrayOp_assignString", kSpecial, -1, "wc");
+ OPCODE(0xD0, "arrayOp_assignIntList", kSpecial, 0x1100, "w"); //Variable stack arguments
+ OPCODE(0xD4, "arrayOp_assign2DimList", kSpecial, 0x1100, "w"); //Variable stack arguments
END_SUBOPCODE;
START_SUBOPCODE(0xA5); //saveRestoreVerbs
OPCODE(0x8D, "srVerb_saveVerbs", kSpecial, -3, "");
@@ -377,21 +377,21 @@
OPCODE(0xBA, "talkActor", kSpecial, -1, "c");
OPCODE(0xBB, "talkEgo", kSpecial, 0, "c");
START_SUBOPCODE(0xBC); //dimArray
- OPCODE(0xC7, "dimArrayInt", kSpecial, -1, "s");
- OPCODE(0xC8, "dimArrayBit", kSpecial, -1, "s");
- OPCODE(0xC9, "dimArrayNibble", kSpecial, -1, "s");
- OPCODE(0xCA, "dimArrayByte", kSpecial, -1, "s");
- OPCODE(0xCB, "dimArrayString", kSpecial, -1, "s");
- OPCODE(0xCC, "dimArray_nukeArray", kSpecial, 0, "s");
+ OPCODE(0xC7, "dimArrayInt", kSpecial, -1, "w");
+ OPCODE(0xC8, "dimArrayBit", kSpecial, -1, "w");
+ OPCODE(0xC9, "dimArrayNibble", kSpecial, -1, "w");
+ OPCODE(0xCA, "dimArrayByte", kSpecial, -1, "w");
+ OPCODE(0xCB, "dimArrayString", kSpecial, -1, "w");
+ OPCODE(0xCC, "dimArray_nukeArray", kSpecial, 0, "w");
END_SUBOPCODE;
OPCODE(0xBE, "startObjectQuick", kSpecial, 0x1020, ""); //Variable stack arguments
OPCODE(0xBF, "startScriptQuick2", kSpecial, 0x1010, ""); //Variable stack arguments
START_SUBOPCODE(0xC0); //dim2DimArray
- OPCODE(0xC7, "dim2DimArrayInt", kSpecial, -2, "s");
- OPCODE(0xC8, "dim2DimArrayBit", kSpecial, -2, "s");
- OPCODE(0xC9, "dim2DimArrayNibble", kSpecial, -2, "s");
- OPCODE(0xCA, "dim2DimArrayByte", kSpecial, -2, "s");
- OPCODE(0xCB, "dim2DimArrayString", kSpecial, -2, "s");
+ OPCODE(0xC7, "dim2DimArrayInt", kSpecial, -2, "w");
+ OPCODE(0xC8, "dim2DimArrayBit", kSpecial, -2, "w");
+ OPCODE(0xC9, "dim2DimArrayNibble", kSpecial, -2, "w");
+ OPCODE(0xCA, "dim2DimArrayByte", kSpecial, -2, "w");
+ OPCODE(0xCB, "dim2DimArrayString", kSpecial, -2, "w");
END_SUBOPCODE;
OPCODE(0xC4, "abs", kArithmetic, 0, "");
OPCODE(0xC5, "getDistObjObj", kSpecial, -1, "");
@@ -406,14 +406,14 @@
OPCODE(0xD0, "getDateTime", kSpecial, 0, "");
OPCODE(0xD1, "stopTalking", kSpecial, 0, "");
OPCODE(0xD2, "getAnimateVariable", kSpecial, -1, "");
- OPCODE(0xD4, "shuffle", kSpecial, -2, "s");
+ OPCODE(0xD4, "shuffle", kSpecial, -2, "w");
OPCODE(0xD5, "jumpToScript", kSpecial, 0x1020, ""); //Variable stack arguments
OPCODE(0xD6, "band", kBoolean, -1, "");
OPCODE(0xD7, "bor", kBoolean, -1, "");
OPCODE(0xD8, "isRoomScriptRunning", kSpecial, 0, "");
OPCODE(0xDD, "findAllObjects", kSpecial, 0, "");
OPCODE(0xE1, "getPixel", kSpecial, -1, "");
- OPCODE(0xE3, "pickVarRandom", kSpecial, 0x1001, "s"); //Variable stack arguments
+ OPCODE(0xE3, "pickVarRandom", kSpecial, 0x1001, "w"); //Variable stack arguments
OPCODE(0xE4, "setBoxSet", kSpecial, -1, "");
OPCODE(0xEC, "getActorLayer", kSpecial, 0, "");
OPCODE(0xED, "getObjectNewDir", kSpecial, 0, "");
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