[Scummvm-cvs-logs] SF.net SVN: scummvm:[51078] tools/branches/gsoc2010-decompiler/decompiler/ scummv6/codegen.cpp
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Wed Jul 21 02:14:53 CEST 2010
Revision: 51078
http://scummvm.svn.sourceforge.net/scummvm/?rev=51078&view=rev
Author: pidgeot
Date: 2010-07-21 00:14:53 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
Add UnaryOp handling (excluding arrays)
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp
Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp 2010-07-21 00:09:56 UTC (rev 51077)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp 2010-07-21 00:14:53 UTC (rev 51078)
@@ -94,6 +94,30 @@
break;
}
break;
+ case kUnaryOp:
+ switch (inst._opcode) {
+ case 0x0D: // not
+ _stack.push(new UnaryOpEntry(_stack.pop(), inst._operator));
+ break;
+ case 0x4E: // byteVarInc
+ case 0x4F: // wordVarInc
+ case 0x56: // byteVarDec
+ case 0x57: // wordVarDec
+ {
+ std::stringstream s;
+ EntryPtr p = new UnaryOpEntry(new VarEntry(decodeVarName(inst._params[0].getUnsigned())), inst._operator);
+ s << p;
+ addOutputLine(s.str());
+ break;
+ }
+ case 0x52: // byteArrayInc
+ case 0x53: // wordArrayInc
+ case 0x5A: // byteArrayDec
+ case 0x5B: // wordArrayDec
+ // TODO
+ break;
+ }
+ break;
default:
{
std::stringstream s;
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