aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/cge2_main.cpp
diff options
context:
space:
mode:
authorunknown2014-09-07 11:01:23 +0200
committerunknown2014-09-07 11:01:23 +0200
commit5c8129a1ddcb682695e25f83e3da2286d85e15aa (patch)
tree50d308d32e808c9e5b79bf296df1ad08bc7b758c /engines/cge2/cge2_main.cpp
parentda1b76be4d7fd477ba75ca8b04a961d7ab7cd0ef (diff)
downloadscummvm-rg350-5c8129a1ddcb682695e25f83e3da2286d85e15aa.tar.gz
scummvm-rg350-5c8129a1ddcb682695e25f83e3da2286d85e15aa.tar.bz2
scummvm-rg350-5c8129a1ddcb682695e25f83e3da2286d85e15aa.zip
CGE2: Refactor _startupMode.
Diffstat (limited to 'engines/cge2/cge2_main.cpp')
-rw-r--r--engines/cge2/cge2_main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index c52a354f9e..1057b00089 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -49,13 +49,13 @@ void System::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
// The original was calling keyClick()
// The sound is uselessly annoying and noisy, so it has been removed
_vm->killText();
- if (_vm->_startupMode == 1) {
+ if (_vm->_gamePhase == kPhaseIntro) {
_vm->_commandHandler->addCommand(kCmdClear, -1, 0, nullptr);
return;
}
}
} else {
- if (_vm->_startupMode)
+ if (_vm->_gamePhase != kPhaseInGame)
return;
_vm->_infoLine->setText(nullptr);
@@ -450,7 +450,7 @@ void CGE2Engine::sceneUp(int cav) {
_dark = false;
- if (!_startupMode)
+ if (_gamePhase == kPhaseInGame)
_mouse->on();
feedSnail(_vga->_showQ->locate(bakRef + 255), kNear, _heroTab[_sex]->_ptr);
@@ -522,7 +522,7 @@ void CGE2Engine::showBak(int ref) {
}
void CGE2Engine::mainLoop() {
- if (_startupMode == 0)
+ if (_gamePhase == kPhaseInGame)
checkSounds();
_vga->show();
@@ -751,7 +751,7 @@ void CGE2Engine::cge2_main() {
if (_text->getText(255) != nullptr) {
runGame();
- _startupMode = 2;
+ _gamePhase = kPhaseOver;
}
_vga->sunset();
@@ -850,7 +850,7 @@ void Sprite::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
if ((mask & kEventAttn) != 0)
return;
- if (!_vm->_startupMode)
+ if (_vm->_gamePhase == kPhaseInGame)
_vm->_infoLine->setText(name());
if (_ref < 0)