rework loom subtitle option handing
svn-id: r8448
This commit is contained in:
parent
01cb6e2ab9
commit
aabfc254c1
4 changed files with 11 additions and 7 deletions
|
@ -475,6 +475,10 @@ int Scumm::readVar(uint var) {
|
|||
var = 266;
|
||||
}
|
||||
#endif
|
||||
if (_gameId == GID_LOOM256 && var == VAR_NOSUBTITLES) {
|
||||
return _noSubtitles;
|
||||
}
|
||||
|
||||
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
|
||||
return _scummVars[var];
|
||||
}
|
||||
|
@ -529,6 +533,10 @@ void Scumm::writeVar(uint var, int value) {
|
|||
else
|
||||
_scummVars[var] = value;
|
||||
|
||||
// stay in sync with loom cd subtitle var
|
||||
if (_gameId == GID_LOOM256 && var == VAR_NOSUBTITLES && (value == 0 || value == 1))
|
||||
_noSubtitles = value;
|
||||
|
||||
if ((_varwatch == (int)var) || (_varwatch == 0)) {
|
||||
if (vm.slot[_currentScript].number < 100)
|
||||
debug(1, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
|
||||
|
|
|
@ -1144,7 +1144,7 @@ public:
|
|||
byte VAR_SOUNDRESULT;
|
||||
byte VAR_TALKSTOP_KEY;
|
||||
byte VAR_59;
|
||||
byte VAR_SUBTITLES;
|
||||
byte VAR_NOSUBTITLES;
|
||||
|
||||
byte VAR_SOUNDPARAM;
|
||||
byte VAR_SOUNDPARAM2;
|
||||
|
|
|
@ -480,7 +480,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
|
|||
VAR_SOUNDRESULT = 0xFF;
|
||||
VAR_TALKSTOP_KEY = 0xFF;
|
||||
VAR_59 = 0xFF;
|
||||
VAR_SUBTITLES = 0xFF;
|
||||
VAR_NOSUBTITLES = 0xFF;
|
||||
|
||||
VAR_SOUNDPARAM = 0xFF;
|
||||
VAR_SOUNDPARAM2 = 0xFF;
|
||||
|
@ -2007,10 +2007,6 @@ void Scumm::processKbd() {
|
|||
VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
|
||||
} else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console
|
||||
g_debugger->attach(this, NULL);
|
||||
// F9 toggles subtitles for loomcd
|
||||
} else if (_gameId == GID_LOOM256 && _lastKeyHit == 323) {
|
||||
_noSubtitles = !_noSubtitles;
|
||||
VAR(VAR_SUBTITLES) = !_noSubtitles;
|
||||
}
|
||||
|
||||
_mouseButStat = _lastKeyHit;
|
||||
|
|
|
@ -83,7 +83,7 @@ void Scumm::setupScummVars() {
|
|||
VAR_SOUNDRESULT = 56;
|
||||
VAR_TALKSTOP_KEY = 57;
|
||||
VAR_59 = 59;
|
||||
VAR_SUBTITLES = 60; // for loomcd
|
||||
VAR_NOSUBTITLES = 60; // for loomcd
|
||||
|
||||
VAR_SOUNDPARAM = 64;
|
||||
VAR_SOUNDPARAM2 = 65;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue