[Scummvm-cvs-logs] SF.net SVN: scummvm: [25798] tools/trunk/descumm.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Feb 23 00:39:21 CET 2007
Revision: 25798
http://scummvm.svn.sourceforge.net/scummvm/?rev=25798&view=rev
Author: fingolfin
Date: 2007-02-22 15:39:17 -0800 (Thu, 22 Feb 2007)
Log Message:
-----------
Decode the save/load vars opcode used in Indy3
Modified Paths:
--------------
tools/trunk/descumm.cpp
Modified: tools/trunk/descumm.cpp
===================================================================
--- tools/trunk/descumm.cpp 2007-02-22 20:46:09 UTC (rev 25797)
+++ tools/trunk/descumm.cpp 2007-02-22 23:39:17 UTC (rev 25798)
@@ -688,9 +688,9 @@
c &= 0x7f;
if (c < 8) {
- buf += sprintf(buf, "^%d", c);
+ buf += sprintf(buf, "^%d", (int)c);
if (c > 3) {
- buf += sprintf(buf, "^%d", get_byte());
+ buf += sprintf(buf, "^%d", (int)get_byte());
}
} else
*buf++ = c;
@@ -3595,13 +3595,13 @@
((opcode & 0x20) ? A3V : A3B);
switch (opcode & 0x1F) {
case 0x01:
- do_tok(buf, "SaveVerbs", code);
+ do_tok(buf, "saveVerbs", code);
break;
case 0x02:
- do_tok(buf, "RestoreVerbs", code);
+ do_tok(buf, "restoreVerbs", code);
break;
case 0x03:
- do_tok(buf, "DeleteVerbs", code);
+ do_tok(buf, "deleteVerbs", code);
break;
default:
error("opcode 0xAB: Unhandled subop %d", opcode & 0x1F);
@@ -3635,9 +3635,46 @@
do_tok(buf, "pickupObject", ((opcode & 0x80) ? A1V : A1W));
break;
- case 0xA7:
- do_tok(buf, "saveLoadVars?", 0);
- break;
+ case 0xA7:{
+ int d = get_byte();
+ buf += sprintf(buf, "saveLoadVars(");
+ if (d == 1) {
+ buf += sprintf(buf, "Load");
+ } else {
+ buf += sprintf(buf, "Save");
+ }
+ while ((d = get_byte()) != 0) {
+ switch (d & 0x1F) {
+ case 0x01:
+ buf += sprintf(buf, ", VarRange(");
+ buf = get_var(buf);
+ buf += sprintf(buf, ",");
+ buf = get_var(buf);
+ buf += sprintf(buf, ")");
+ break;
+ case 0x02:
+ buf += sprintf(buf, ", StringRange(");
+ buf = get_var_or_byte(buf, (d & 0x80));
+ buf += sprintf(buf, ",");
+ buf = get_var_or_byte(buf, (d & 0x40));
+ buf += sprintf(buf, ")");
+ break;
+ case 0x03:
+ buf += sprintf(buf, ", Open(");
+ buf = get_ascii(buf);
+ buf += sprintf(buf, ")");
+ break;
+ case 0x04:
+ buf += sprintf(buf, ", Append)");
+ return;
+ case 0x1F:
+ buf += sprintf(buf, ", Close)");
+ return;
+ }
+ }
+ buf += sprintf(buf, ")");
+ break;
+ }
case 0x67:
case 0xE7:
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