[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.103.2.1,1.103.2.2 saveload.cpp,1.140.2.2,1.140.2.3 script.cpp,1.149.2.1,1.149.2.2 script_v8.cpp,2.229.2.1,2.229.2.2 scumm.h,1.369.2.3,1.369.2.4 scummvm.cpp,2.577.2.12,2.577.2.13 string.cpp,1.193.2.3,1.193.2.4 vars.cpp,1.71.2.2,1.71.2.3
Travis Howell
kirben at users.sourceforge.net
Mon May 3 03:59:01 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.149,1.149.2.1 vars.cpp,1.71.2.1,1.71.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.140.2.3,1.140.2.4 saveload.h,1.32.2.1,1.32.2.2 scummvm.cpp,2.577.2.13,2.577.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21692/scumm
Modified Files:
Tag: branch-0-6-0
dialogs.cpp saveload.cpp script.cpp script_v8.cpp scumm.h
scummvm.cpp string.cpp vars.cpp
Log Message:
Back port VAR_VOICE_MODE support
back port subtitle speed changes (Half done)
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.103.2.1
retrieving revision 1.103.2.2
diff -u -d -r1.103.2.1 -r1.103.2.2
--- dialogs.cpp 2 May 2004 16:36:03 -0000 1.103.2.1
+++ dialogs.cpp 3 May 2004 10:57:42 -0000 1.103.2.2
@@ -464,6 +464,9 @@
if (getResult()) {
// Subtitles
ConfMan.set("subtitles", subtitlesCheckbox->getState(), _domain);
+ // Sync with current setting
+ if (_vm->_version >= 7)
+ _vm->VAR(_vm->VAR_VOICE_MODE) = subtitlesCheckbox->getState();
}
GUI_OptionsDialog::close();
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.140.2.2
retrieving revision 1.140.2.3
diff -u -d -r1.140.2.2 -r1.140.2.3
--- saveload.cpp 2 May 2004 16:36:03 -0000 1.140.2.2
+++ saveload.cpp 3 May 2004 10:57:43 -0000 1.140.2.3
@@ -201,6 +201,10 @@
_scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
}
+ // Sync with current config setting
+ if (_version >= 7)
+ VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+
// We could simply dirty colours 0-15 for 16-colour games -- nowadays
// they handle their palette pretty much like the more recent games
// anyway. There was a time, though, when re-initializing was necessary
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.149.2.1
retrieving revision 1.149.2.2
diff -u -d -r1.149.2.1 -r1.149.2.2
--- script.cpp 3 May 2004 02:27:49 -0000 1.149.2.1
+++ script.cpp 3 May 2004 10:57:44 -0000 1.149.2.2
@@ -545,9 +545,11 @@
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
// FIXME: Find some better place to put this.
- if (var == VAR_CHARINC)
- VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
- else
+ if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
+ int talkspeed = ConfMan.getInt("talkspeed") / 20;
+ if (talkspeed >= 0 && talkspeed <= 180)
+ VAR(VAR_CHARINC) = talkspeed;
+ } else
_scummVars[var] = value;
// stay in sync with loom cd subtitle var
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.229.2.1
retrieving revision 2.229.2.2
diff -u -d -r2.229.2.1 -r2.229.2.2
--- script_v8.cpp 2 May 2004 16:36:04 -0000 2.229.2.1
+++ script_v8.cpp 3 May 2004 10:57:45 -0000 2.229.2.2
@@ -397,7 +397,10 @@
if (!(var & 0xF0000000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
- return _scummVars[var];
+ if (var == VAR_CHARINC)
+ return (9 - _scummVars[var]);
+ else
+ return _scummVars[var];
}
if (var & 0x80000000) {
@@ -422,7 +425,15 @@
if (!(var & 0xF0000000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
- _scummVars[var] = value;
+ if (var == VAR_CHARINC) {
+ if (ConfMan.hasKey("talkspeed")) {
+ int talkspeed = ConfMan.getInt("talkspeed") / 20;
+ if (talkspeed >= 0 && talkspeed <= 9)
+ VAR(VAR_CHARINC) = talkspeed;
+ } else
+ VAR(VAR_CHARINC) = (_features & GF_DEMO) ? value : (9 - value);
+ } else
+ _scummVars[var] = value;
if ((_varwatch == (int)var) || (_varwatch == 0)) {
if (vm.slot[_currentScript].number < 100)
@@ -1475,7 +1486,9 @@
// 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, "Saveload Page") || !strcmp((char *)ah->data, "Object Names"))
+ 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);
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.369.2.3
retrieving revision 1.369.2.4
diff -u -d -r1.369.2.3 -r1.369.2.4
--- scumm.h 2 May 2004 16:36:04 -0000 1.369.2.3
+++ scumm.h 3 May 2004 10:57:46 -0000 1.369.2.4
@@ -1222,6 +1222,8 @@
byte VAR_ACTIVE_OBJECT1;
byte VAR_ACTIVE_OBJECT2;
byte VAR_CLICK_AREA;
+
+ byte VAR_VOICE_MODE;
};
// This is a constant lookup table of reverse bit masks
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v
retrieving revision 2.577.2.12
retrieving revision 2.577.2.13
diff -u -d -r2.577.2.12 -r2.577.2.13
--- scummvm.cpp 3 May 2004 02:16:46 -0000 2.577.2.12
+++ scummvm.cpp 3 May 2004 10:57:47 -0000 2.577.2.13
@@ -1219,6 +1219,9 @@
if (_gameId == GID_MONKEY || _gameId == GID_MONKEY_SEGA)
_scummVars[74] = 1225;
+ if (_version == 7)
+ VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+
VAR(VAR_CHARINC) = 4;
setTalkingActor(0);
}
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.193.2.3
retrieving revision 1.193.2.4
diff -u -d -r1.193.2.3 -r1.193.2.4
--- string.cpp 11 Apr 2004 20:56:51 -0000 1.193.2.3
+++ string.cpp 3 May 2004 10:57:49 -0000 1.193.2.4
@@ -177,16 +177,8 @@
_useTalkAnims = true;
}
- // HACK: Most of the audio sync in Loom is handled by the "MI1
- // timer", but some of it depends on text strings timing out at
- // the right moment.
-
- if (_gameId == GID_LOOM256) {
- _defaultTalkDelay = 100;
- VAR(VAR_CHARINC) = 5;
- }
-
- _talkDelay = _defaultTalkDelay;
+ // Always set to 60
+ _talkDelay = 60;
if (!_keepText) {
if (_version <= 3 && _gameId != GID_LOOM) {
@@ -326,7 +318,7 @@
_charset->_nextLeft = _charset->_left;
_charset->_nextTop = _charset->_top;
if (_version <= 2) {
- _talkDelay += _defaultTalkDelay / 20;
+ _talkDelay += _defaultTalkDelay;
VAR(VAR_CHARCOUNT)++;
} else
_talkDelay += (int)VAR(VAR_CHARINC);
Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.71.2.2
retrieving revision 1.71.2.3
diff -u -d -r1.71.2.2 -r1.71.2.3
--- vars.cpp 3 May 2004 02:27:49 -0000 1.71.2.2
+++ vars.cpp 3 May 2004 10:57:49 -0000 1.71.2.3
@@ -193,7 +193,7 @@
VAR_PERFORMANCE_2 = 27;
VAR_GAME_LOADED = 29;
VAR_V6_EMSSPACE = 32;
- //VAR_VOICE_MODE = 33; // 0 is voice, 1 is voice+text, 2 is text only
+ VAR_VOICE_MODE = 33; // 0 is voice, 1 is voice+text, 2 is text only
VAR_RANDOM_NR = 34;
VAR_NEW_ROOM = 35;
VAR_WALKTO_OBJ = 36;
@@ -287,7 +287,7 @@
VAR_OVERRIDE = 30;
VAR_ROOM = 31;
- //VAR_VOICE_MODE = 39; // 0 is voice, 1 is voice+text, 2 is text only
+ VAR_VOICE_MODE = 39; // 0 is voice, 1 is voice+text, 2 is text only
VAR_GAME_LOADED = 40;
VAR_LANGUAGE = 41;
@@ -334,7 +334,8 @@
VAR_KEYPRESS = 132;
VAR_SYNC = 134;
- VAR_CHARINC = 221;
+ VAR_DEFAULT_TALK_DELAY = 128;
+ VAR_CHARINC = 129;
}
} // End of namespace Scumm
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.149,1.149.2.1 vars.cpp,1.71.2.1,1.71.2.2
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.140.2.3,1.140.2.4 saveload.h,1.32.2.1,1.32.2.2 scummvm.cpp,2.577.2.13,2.577.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list