aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/shootemup.cpp24
-rw-r--r--engines/avalanche/shootemup.h2
2 files changed, 25 insertions, 1 deletions
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 00e74ccd3b..e1a6280dc1 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -40,6 +40,8 @@ const long int ShootEmUp::kFlag = -20047;
const byte ShootEmUp::kFrameDelayMax = 2;
const byte ShootEmUp::kAvvyY = 150;
const byte ShootEmUp::kShooting[7] = { 87, 80, 81, 82, 81, 80, 87 };
+const byte ShootEmUp::kTimesASecond = 18;
+const byte ShootEmUp::kFlashTime = 20; // If flash_time is <= this, the word "time" will flash. Should be about 20.
ShootEmUp::ShootEmUp(AvalancheEngine *vm) {
_vm = vm;
@@ -532,7 +534,27 @@ void ShootEmUp::peopleRunning() {
}
void ShootEmUp::updateTime() {
- warning("STUB: ShootEmUp::updateTime()");
+ if (_count321 != 0)
+ return;
+
+ _timeThisSecond++;
+
+ if (_timeThisSecond < kTimesASecond)
+ return;
+
+ _time--;
+ showTime();
+ _timeThisSecond = 0;
+
+ if (_time < kFlashTime) {
+ int timeMode = 0;
+ if ((_time % 2) == 1)
+ timeMode = 20; // Normal 'Time:'
+ else
+ timeMode = 86; // Flash 'Time:'
+
+ _vm->_graphics->seuDrawPicture(110, 0, timeMode);
+ }
}
void ShootEmUp::hitPeople() {
diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h
index 9e9747bc8e..36ef8d0e73 100644
--- a/engines/avalanche/shootemup.h
+++ b/engines/avalanche/shootemup.h
@@ -66,6 +66,8 @@ private:
static const byte kFrameDelayMax;
static const byte kAvvyY;
static const byte kShooting[7];
+ static const byte kTimesASecond;
+ static const byte kFlashTime;
AvalancheEngine *_vm;