[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.218,1.219 scumm.cpp,1.495,1.496 scumm.h,1.620,1.621 vars.cpp,1.132,1.133
kirben
kirben at users.sourceforge.net
Sun May 8 19:40:21 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26034/scumm
Modified Files:
script.cpp scumm.cpp scumm.h vars.cpp
Log Message:
All SCUMM6 games use VAR_SUBTITLES, not VAR_NOSUBTITLES.
Cleanup.
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -d -r1.218 -r1.219
--- script.cpp 20 Apr 2005 23:53:27 -0000 1.218
+++ script.cpp 9 May 2005 02:38:57 -0000 1.219
@@ -505,12 +505,11 @@
}
}
- if (var == VAR_NOSUBTITLES) {
- if (_gameId == GID_LOOM256 || _heversion >= 60)
- return !ConfMan.getBool("subtitles");
- else if (_gameId == GID_SAMNMAX)
- // Used as VAR_SUBTITLES in Sam & Max during Conroy Bumpus song
- return ConfMan.getBool("subtitles");
+ if (VAR_SUBTITLES != 0xFF && var == VAR_SUBTITLES) {
+ return ConfMan.getBool("subtitles");
+ }
+ if (VAR_SUBTITLES != 0xFF && var == VAR_NOSUBTITLES) {
+ return !ConfMan.getBool("subtitles");
}
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
@@ -574,20 +573,24 @@
if (!(var & 0xF000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
+ if (VAR_SUBTITLES != 0xFF && var == VAR_SUBTITLES) {
+ // Ignore default setting in HE60/61 games
+ if (_heversion <= 61 && vm.slot[_currentScript].number == 1)
+ return;
+ assert(value == 0 || value == 1);
+ ConfMan.set("subtitles", value);
+ }
+ if (VAR_NOSUBTITLES != 0xFF && var == VAR_NOSUBTITLES) {
+ assert(value == 0 || value == 1);
+ ConfMan.set("subtitles", !value);
+ }
+
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
uint talkspeed = ConfMan.getInt("talkspeed");
if (talkspeed <= 9)
VAR(VAR_CHARINC) = talkspeed;
- } else
+ } else {
_scummVars[var] = value;
-
- // stay in sync with loom cd subtitle var
- if ((_gameId == GID_LOOM256 || _heversion >= 60) && var == VAR_NOSUBTITLES) {
- assert(value == 0 || value == 1);
- if (_heversion <= 61 && vm.slot[_currentScript].number == 1)
- value = !ConfMan.getBool("subtitles");
- else
- ConfMan.set("subtitles", (value == 0));
}
if ((_varwatch == (int)var) || (_varwatch == 0)) {
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -d -r1.495 -r1.496
--- scumm.cpp 9 May 2005 00:42:10 -0000 1.495
+++ scumm.cpp 9 May 2005 02:38:57 -0000 1.496
@@ -1017,6 +1017,7 @@
VAR_ROOM_WIDTH = 0xFF;
VAR_ROOM_HEIGHT = 0xFF;
+ VAR_SUBTITLES = 0xFF;
VAR_V6_EMSSPACE = 0xFF;
VAR_CAMERA_POS_Y = 0xFF;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.620
retrieving revision 1.621
diff -u -d -r1.620 -r1.621
--- scumm.h 9 May 2005 00:09:01 -0000 1.620
+++ scumm.h 9 May 2005 02:38:58 -0000 1.621
@@ -1259,6 +1259,7 @@
// V6+
byte VAR_ROOM_WIDTH;
byte VAR_ROOM_HEIGHT;
+ byte VAR_SUBTITLES;
byte VAR_V6_EMSSPACE;
// V7/V8 (=GF_NEW_CAMERA) specific variables
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- vars.cpp 8 May 2005 03:08:11 -0000 1.132
+++ vars.cpp 9 May 2005 02:38:58 -0000 1.133
@@ -88,7 +88,6 @@
}
if (_gameId == GID_LOOM256 || _version >= 5) {
- VAR_NOSUBTITLES = 60;
VAR_SOUNDPARAM = 64;
VAR_SOUNDPARAM2 = 65;
VAR_SOUNDPARAM3 = 66;
@@ -149,17 +148,27 @@
VAR_CURRENT_LIGHTS = 9;
- if (_version >= 4)
+ if (_version >= 4) {
VAR_V5_TALK_STRING_Y = 54;
+ }
+ if (_gameId == GID_LOOM256 || _version >= 5) {
+ VAR_NOSUBTITLES = 60;
+ }
}
void ScummEngine_v6::setupScummVars() {
// Many vars are the same as in V5 & V6 games, so just call the inherited method first
ScummEngine::setupScummVars();
+ if (_heversion == 0) {
+ VAR_V6_SOUNDMODE = 9;
+ }
+
VAR_ROOM_WIDTH = 41;
VAR_ROOM_HEIGHT = 54;
+ VAR_SUBTITLES = 60;
+
VAR_LEFTBTN_HOLD = 74;
VAR_RIGHTBTN_HOLD = 75;
@@ -171,10 +180,6 @@
VAR_V6_EMSSPACE = 76;
VAR_RANDOM_NR = 118;
- if (_heversion < 70) {
- VAR_V6_SOUNDMODE = 9;
- }
-
VAR_TIMEDATE_YEAR = 119;
VAR_TIMEDATE_MONTH = 129;
VAR_TIMEDATE_DAY = 128;
@@ -183,7 +188,6 @@
// Sam & Max specific
VAR_CHARSET_MASK = 123;
-
}
void ScummEngine_v70he::setupScummVars() {
@@ -238,7 +242,7 @@
VAR_CUTSCENEEXIT_KEY = 44;
VAR_TALKSTOP_KEY = 45;
VAR_HAVE_MSG = 46;
- VAR_NOSUBTITLES = 47;
+ VAR_SUBTITLES = 47;
VAR_CHARINC = 48;
VAR_TALK_ACTOR = 49;
VAR_LAST_SOUND = 50;
More information about the Scummvm-git-logs
mailing list