aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-02-19 16:48:26 +0100
committeruruk2014-02-19 16:48:26 +0100
commita3eea23624df66a277802bc1bf828dbf773c5da1 (patch)
treefbecf23155f409395da16dd414f9237f95bb976e /engines
parent2a62c310c3aa42a094530b0b03e1a080b4b2e4c0 (diff)
downloadscummvm-rg350-a3eea23624df66a277802bc1bf828dbf773c5da1.tar.gz
scummvm-rg350-a3eea23624df66a277802bc1bf828dbf773c5da1.tar.bz2
scummvm-rg350-a3eea23624df66a277802bc1bf828dbf773c5da1.zip
AVALANCHE: Implement ShootEmUp::initRunner().
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/shootemup.cpp19
-rw-r--r--engines/avalanche/shootemup.h1
2 files changed, 18 insertions, 2 deletions
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 4a4c10c17e..07a40a0c72 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -36,6 +36,7 @@ const byte ShootEmUp::kStocks = 27;
const byte ShootEmUp::kFacingRight = 87;
const byte ShootEmUp::kFacingLeft = 93;
const long int ShootEmUp::kFlag = -20047;
+const byte ShootEmUp::kFrameDelayMax = 2;
ShootEmUp::ShootEmUp(AvalancheEngine *vm) {
_vm = vm;
@@ -308,8 +309,22 @@ void ShootEmUp::setup() {
initRunner(20, 100, 61, 67, (-(int8)_vm->_rnd->getRandomNumber(4)) + 1, _vm->_rnd->getRandomNumber(3) - 2);
}
-void ShootEmUp::initRunner(int16 xx, int16 yy, byte f1, byte f2, int8 ixx, int8 iyy) {
- warning("STUB: ShootEmUp::initRunner()");
+void ShootEmUp::initRunner(int16 x, int16 y, byte f1, byte f2, int8 ix, int8 iy) {
+ for (int i = 0; i < 4; i++) {
+ if (_running[i]._x == kFlag) {
+ _running[i]._x = x;
+ _running[i]._y = y;
+ _running[i]._frame = f1;
+ _running[i]._tooHigh = f2;
+ _running[i]._lowest = f1;
+ _running[i]._ix = ix;
+ _running[i]._iy = iy;
+ if ((ix = 0) && (iy = 0))
+ _running[i]._ix = 2; // To stop them running on the spot!
+ _running[i]._frameDelay = kFrameDelayMax;
+ return;
+ }
+ }
}
void ShootEmUp::moveAvvy() {
diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h
index 38f18b0d1c..62d55804d7 100644
--- a/engines/avalanche/shootemup.h
+++ b/engines/avalanche/shootemup.h
@@ -62,6 +62,7 @@ private:
static const byte kFacingRight;
static const byte kFacingLeft;
static const long int kFlag;
+ static const byte kFrameDelayMax;
AvalancheEngine *_vm;