[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.273,2.274
Travis Howell
kirben at users.sourceforge.net
Wed Sep 22 00:23:06 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16273/scumm
Modified Files:
script_v8.cpp
Log Message:
Value is correct, but string index not array id.
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.273
retrieving revision 2.274
diff -u -d -r2.273 -r2.274
--- script_v8.cpp 21 Sep 2004 13:54:30 -0000 2.273
+++ script_v8.cpp 22 Sep 2004 07:21:57 -0000 2.274
@@ -1310,12 +1310,9 @@
break;
case 32: // writeRegistryValue
{
- int array = args[1];
+ int idx = args[1];
int value = args[2];
- // FIXME - hack: for some reasons the wrong variable ID arrives here, compared to the
- // scripts. Probably a wrong push/pop somewhere. For now override to correct value.
- array = 658;
- ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
+ ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, idx);
debugC(DEBUG_GENERAL,"o8_kernelSetFunctions: writeRegistryValue(%s, %d)", (char *)ah->data, value);
}
@@ -1412,11 +1409,8 @@
break;
case 0xE0: // readRegistryValue
{
- int array = args[1];
- // FIXME - hack: for some reasons the wrong variable ID arrives here, compared to the
- // scripts. Probably a wrong push/pop somewhere. For now override to correct value.
- array = 658;
- ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
+ int idx = args[1];
+ ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, idx);
if (!strcmp((char *)ah->data, "SFX Volume"))
push(ConfMan.getInt("sfx_volume") / 2);
else if (!strcmp((char *)ah->data, "Voice Volume"))
More information about the Scummvm-git-logs
mailing list