HYPNO: added clock timeout in level c30 in wet

This commit is contained in:
neuromancer 2022-04-30 14:32:20 +02:00
parent e5c8043ece
commit 297b4720d2
2 changed files with 24 additions and 0 deletions

View File

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

View File

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