[Scummvm-git-logs] scummvm master -> 297b4720d2863b644a5572b62ddc61b44b442afd
neuromancer
noreply at scummvm.org
Sat Apr 30 12:34:46 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
297b4720d2 HYPNO: added clock timeout in level c30 in wet
Commit: 297b4720d2863b644a5572b62ddc61b44b442afd
https://github.com/scummvm/scummvm/commit/297b4720d2863b644a5572b62ddc61b44b442afd
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-30T14:32:54+02:00
Commit Message:
HYPNO: added clock timeout in level c30 in wet
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/wet/arcade.cpp
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);
More information about the Scummvm-git-logs
mailing list