diff options
author | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
commit | 682807f0e916b189c69b60765418ee1ccc327cbf (patch) | |
tree | e8b220b934f6b14d4dac290181fce0c1b209579a /engines/agi/cycle.cpp | |
parent | 83f1531cb8fa5ba43c246143ecdde2cb1d140a8e (diff) | |
parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
download | scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.gz scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.bz2 scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.zip |
merged trunk into branch, reverted Cruise Singleton changes
svn-id: r51961
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r-- | engines/agi/cycle.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 10df40556f..b7eba22298 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -177,9 +177,12 @@ void AgiEngine::updateTimer() { setvar(vDays, getvar(vDays) + 1); } -void AgiEngine::newInputMode(int i) { +void AgiEngine::newInputMode(InputMode mode) { + if (mode == INPUT_MENU && !getflag(fMenusWork) && !(getFeatures() & GF_MENUS)) + return; + _oldMode = _game.inputMode; - _game.inputMode = i; + _game.inputMode = mode; } void AgiEngine::oldInputMode() { @@ -200,7 +203,7 @@ int AgiEngine::mainCycle() { // vars in every interpreter cycle. // // We run AGIMOUSE always as a side effect - if (getFeatures() & GF_AGIMOUSE || 1) { + if (getFeatures() & GF_AGIMOUSE || true) { _game.vars[28] = _mouse.x / 2; _game.vars[29] = _mouse.y; } @@ -314,7 +317,8 @@ int AgiEngine::playGame() { _game.clockEnabled = true; _game.lineUserInput = 22; - if (getFeatures() & GF_AGIMOUSE) + // We run AGIMOUSE always as a side effect + if (getFeatures() & GF_AGIMOUSE || true) report("Using AGI Mouse 1.0 protocol\n"); if (getFeatures() & GF_AGIPAL) @@ -386,28 +390,33 @@ int AgiEngine::runGame() { _restartGame = false; } - // Set computer type (v20 i.e. vComputer) + // Set computer type (v20 i.e. vComputer) and sound type switch (getPlatform()) { case Common::kPlatformAtariST: setvar(vComputer, kAgiComputerAtariST); + setvar(vSoundgen, kAgiSoundPC); break; case Common::kPlatformAmiga: if (getFeatures() & GF_OLDAMIGAV20) setvar(vComputer, kAgiComputerAmigaOld); else setvar(vComputer, kAgiComputerAmiga); + setvar(vSoundgen, kAgiSoundTandy); break; case Common::kPlatformApple2GS: setvar(vComputer, kAgiComputerApple2GS); + if (getFeatures() & GF_2GSOLDSOUND) + setvar(vSoundgen, kAgiSound2GSOld); + else + setvar(vSoundgen, kAgiSoundTandy); break; case Common::kPlatformPC: default: setvar(vComputer, kAgiComputerPC); + setvar(vSoundgen, kAgiSoundPC); break; } - setvar(vSoundgen, 1); // IBM PC SOUND - // Set monitor type (v26 i.e. vMonitor) switch (_renderMode) { case Common::kRenderCGA: @@ -430,7 +439,7 @@ int AgiEngine::runGame() { setvar(vFreePages, 180); // Set amount of free memory to realistic value setvar(vMaxInputChars, 38); _game.inputMode = INPUT_NONE; - _game.inputEnabled = 0; + _game.inputEnabled = false; _game.hasPrompt = 0; _game.state = STATE_RUNNING; |