[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.163,1.164 script_v8.cpp,2.262,2.263
Travis Howell
kirben at users.sourceforge.net
Sat Jul 31 23:54:08 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/scumm
Modified Files:
script.cpp script_v8.cpp
Log Message:
Correct default settings used by COMI
Allow object_labels config option in COMI
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- script.cpp 31 Jul 2004 23:34:07 -0000 1.163
+++ script.cpp 1 Aug 2004 06:52:45 -0000 1.164
@@ -550,7 +550,6 @@
if (!(var & 0xF000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
- // FIXME: Find some better place to put this.
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
uint talkspeed = ConfMan.getInt("talkspeed");
if (talkspeed <= 9)
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.262
retrieving revision 2.263
diff -u -d -r2.262 -r2.263
--- script_v8.cpp 1 Aug 2004 01:54:37 -0000 2.262
+++ script_v8.cpp 1 Aug 2004 06:52:45 -0000 2.263
@@ -396,10 +396,7 @@
if (!(var & 0xF0000000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
- if (var == VAR_CHARINC)
- return (9 - _scummVars[var]);
- else
- return _scummVars[var];
+ return _scummVars[var];
}
if (var & 0x80000000) {
@@ -424,13 +421,10 @@
if (!(var & 0xF0000000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
- if (var == VAR_CHARINC) {
- if (ConfMan.hasKey("talkspeed")) {
- uint talkspeed = ConfMan.getInt("talkspeed");
- if (talkspeed <= 9)
- VAR(VAR_CHARINC) = talkspeed;
- } else
- VAR(VAR_CHARINC) = (_features & GF_DEMO) ? value : (9 - value);
+ if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
+ uint talkspeed = ConfMan.getInt("talkspeed");
+ if (talkspeed <= 9)
+ VAR(VAR_CHARINC) = talkspeed;
} else
_scummVars[var] = value;
@@ -1337,7 +1331,16 @@
warning("o8_kernelSetFunctions: stopAllVideo()");
break;
case 32: // writeRegistryValue
- warning("o8_kernelSetFunctions: writeRegistryValue(%d, %d)", args[1], args[2]);
+ {
+ int array = 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));
+
+ debug(1,"o8_kernelSetFunctions: writeRegistryValue(%s, %d)", (char *)ah->data, value);
+ }
break;
case 33: // paletteSetIntensity
warning("o8_kernelSetFunctions: paletteSetIntensity(%d, %d)", args[1], args[2]);
@@ -1449,12 +1452,21 @@
// scripts. Probably a wrong push/pop somewhere. For now override to correct value.
array = 658;
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
- if (!strcmp((char *)ah->data, "Text Status"))
+ if (!strcmp((char *)ah->data, "SFX Volume"))
+ push(ConfMan.getInt("sfx_volume") / 2);
+ else if (!strcmp((char *)ah->data, "Voice Volume"))
+ push(ConfMan.getInt("speech_volume") / 2);
+ else if (!strcmp((char *)ah->data, "Music Volume"))
+ push(ConfMan.getInt("music_volume") / 2);
+ else if (!strcmp((char *)ah->data, "Text Status"))
push(ConfMan.getBool("subtitles"));
- else if (!strcmp((char *)ah->data, "Saveload Page") || !strcmp((char *)ah->data, "Object Names"))
- push(1);
- else
- push(0);
+ else if (!strcmp((char *)ah->data, "Object Names"))
+ push(ConfMan.getBool("object_labels"));
+ else if (!strcmp((char *)ah->data, "Saveload Page"))
+ push(14);
+ else // Use defaults
+ push(-1);
+ debug(1,"o8_kernelGetFunctions: readRegistryValue(%s)", (char *)ah->data);
}
break;
case 0xE1: // imGetMusicPosition
More information about the Scummvm-git-logs
mailing list