rework loom subtitle option handing

svn-id: r8448
This commit is contained in:
Jonathan Gray 2003-06-12 16:38:43 +00:00
parent 01cb6e2ab9
commit aabfc254c1
4 changed files with 11 additions and 7 deletions

View file

@ -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);