aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/cge2.cpp1
-rw-r--r--engines/cge2/cge2.h1
-rw-r--r--engines/cge2/cge2_main.cpp8
-rw-r--r--engines/cge2/events.cpp2
4 files changed, 8 insertions, 4 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 8b51dda75e..8e70f0e93e 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -76,6 +76,7 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_vol[i] = nullptr;
_eventManager = nullptr;
_map = nullptr;
+ _skipIntro = false;
_quitFlag = false;
_bitmapPalette = nullptr;
_startupMode = 1;
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 8e94683824..79cb2064c8 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -280,6 +280,7 @@ public:
Common::RandomSource _randomSource;
+ bool _skipIntro;
bool _quitFlag;
Dac *_bitmapPalette;
int _startupMode;
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index c52a354f9e..3a994dd0f5 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -396,7 +396,7 @@ void CGE2Engine::movie(const char *ext) {
sceneUp(_now);
_keyboard->setClient(_sys);
- while (!_commandHandler->idle() && !_quitFlag)
+ while (!_commandHandler->idle() && !_quitFlag && !_skipIntro)
mainLoop();
_keyboard->setClient(nullptr);
@@ -532,11 +532,11 @@ void CGE2Engine::mainLoop() {
// Handle a delay between game frames
handleFrame();
- // Handle any pending events
- _eventManager->poll();
-
// Check shouldQuit()
_quitFlag = shouldQuit();
+
+ // Handle any pending events
+ _eventManager->poll();
}
void CGE2Engine::checkSounds() {
diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp
index ed1ec66bb1..13f6b4dc5d 100644
--- a/engines/cge2/events.cpp
+++ b/engines/cge2/events.cpp
@@ -219,6 +219,8 @@ void EventManager::poll() {
switch (_event.type) {
case Common::EVENT_KEYDOWN:
case Common::EVENT_KEYUP:
+ if (_vm->_startupMode == 1)
+ _vm->_skipIntro = true; // So the player can interrupt the intro.
// Handle keyboard events
_vm->_keyboard->newKeyboard(_event);
handleEvents();