diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp index 6791b21fe34..f4102cac383 100644 --- a/engines/hypno/arcade.cpp +++ b/engines/hypno/arcade.cpp @@ -268,6 +268,14 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) { Common::Event event; while (!shouldQuit()) { + if (_timerStarted) { + if (_countdown <= 0) { + _loseLevel = true; + debugC(1, kHypnoDebugArcade, "Finishing level (timeout)"); + _timerStarted = false; + removeTimers(); + } + } needsUpdate = _background->decoder->needsUpdate(); while (g_system->getEventManager()->pollEvent(event)) { mousePos = getPlayerPosition(false); @@ -553,6 +561,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) { _masks = nullptr; } + _timerStarted = false; + removeTimers(); stopSound(); _music.clear(); } diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp index 8c3bd94cf3e..67939a6628c 100644 --- a/engines/hypno/wet/arcade.cpp +++ b/engines/hypno/wet/arcade.cpp @@ -602,6 +602,12 @@ void WetEngine::runBeforeArcade(ArcadeShooting *arc) { if (arc->mode == "YT") { _c33PlayerCursor = decodeFrames("c33/c33i2.smk"); } + if (arc->mode == "Y3") { + bool started = startCountdown(420); // 7 minutes + if (!started) + error("Failed to start countdown in level %d!", arc->id); + } else + _timerStarted = false; } @@ -806,6 +812,14 @@ void WetEngine::drawPlayer() { _compositeSurface->drawLine(113, 9, 119, 9, c); _compositeSurface->drawLine(200, 9, 206, 9, c); + if (_timerStarted) { + assert(_arcadeMode == "Y3"); + c = kHypnoColorYellow; + uint32 minutes = _countdown / 60; + uint32 seconds = _countdown % 60; + drawString("block05.fgx", Common::String::format("CLOCK: %02d:%02d", minutes, seconds), 19, 11, 0, c); + } + c = kHypnoColorRed; // red ? Common::Point mousePos = g_system->getEventManager()->getMousePos(); int i = detectTarget(mousePos);