aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-02-20 22:25:34 +0100
committeruruk2014-02-20 22:25:34 +0100
commit0b4a2ba0a81f092935e727353e89cb146fc380ce (patch)
tree6bc22feda2c7ce14d1a893bca05388c06e4d843a
parent4e80bb12d46198f39aa3fee7c13f6aa62e27ba60 (diff)
downloadscummvm-rg350-0b4a2ba0a81f092935e727353e89cb146fc380ce.tar.gz
scummvm-rg350-0b4a2ba0a81f092935e727353e89cb146fc380ce.tar.bz2
scummvm-rg350-0b4a2ba0a81f092935e727353e89cb146fc380ce.zip
AVALANCHE: Implement ShootEmUp::updateTime().
-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;