diff options
author | Travis Howell | 2004-09-22 07:21:57 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-22 07:21:57 +0000 |
commit | 1c84b9fb50bbfb93b1111f4e97a3d154df9980f1 (patch) | |
tree | 9ccd71165665cd6d93ad7d85fd215563c0b9022f /scumm/script_v8.cpp | |
parent | 7389ca8884701eccc3992de52901b1a52a5fbd7e (diff) | |
download | scummvm-rg350-1c84b9fb50bbfb93b1111f4e97a3d154df9980f1.tar.gz scummvm-rg350-1c84b9fb50bbfb93b1111f4e97a3d154df9980f1.tar.bz2 scummvm-rg350-1c84b9fb50bbfb93b1111f4e97a3d154df9980f1.zip |
Value is correct, but string index not array id.
svn-id: r15233
Diffstat (limited to 'scumm/script_v8.cpp')
-rw-r--r-- | scumm/script_v8.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 8db0f72516..815a82fde5 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -1310,12 +1310,9 @@ void ScummEngine_v8::o8_kernelSetFunctions() { 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 @@ void ScummEngine_v8::o8_kernelGetFunctions() { 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")) |