[Scummvm-cvs-logs] scummvm master -> 614006c1e575df5ca03059669e435aedd64e8db1

urukgit urukgit at users.noreply.github.com
Thu Feb 20 22:53:01 CET 2014


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0b4a2ba0a8 AVALANCHE: Implement ShootEmUp::updateTime().
401b85eb21 AVALANCHE: Implement ShootEmUp::check321().
614006c1e5 AVALANCHE: Implement ShootEmUp::defineCameo().


Commit: 0b4a2ba0a81f092935e727353e89cb146fc380ce
    https://github.com/scummvm/scummvm/commit/0b4a2ba0a81f092935e727353e89cb146fc380ce
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-20T13:25:34-08:00

Commit Message:
AVALANCHE: Implement ShootEmUp::updateTime().

Changed paths:
    engines/avalanche/shootemup.cpp
    engines/avalanche/shootemup.h



diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 00e74cc..e1a6280 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 9e9747b..36ef8d0 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;
 


Commit: 401b85eb214e6980e8d030cf36bd55d78371d732
    https://github.com/scummvm/scummvm/commit/401b85eb214e6980e8d030cf36bd55d78371d732
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-20T13:31:03-08:00

Commit Message:
AVALANCHE: Implement ShootEmUp::check321().

Changed paths:
    engines/avalanche/shootemup.cpp



diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index e1a6280..51bc714 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -619,7 +619,25 @@ void ShootEmUp::escapeCheck() {
 }
 
 void ShootEmUp::check321() {
-	warning("STUB: ShootEmUp::check321()");
+	if (_count321 == 0)
+		return;
+
+	_count321--;
+
+	switch (_count321) {
+	case 84:
+		define(320, 60, 16, 2, 1, 94, false, true);
+		break;
+	case 169:
+		define(320, 60, 15, 0, 1, 94, false, true);
+		break;
+	case 254:
+		define(320, 60, 14, -2, 1, 94, false, true);
+		define(0, 100, 18, 2, 0, 254, false, true);
+		break;
+	default:
+		break;
+	}
 }
 
 } // End of namespace Avalanche


Commit: 614006c1e575df5ca03059669e435aedd64e8db1
    https://github.com/scummvm/scummvm/commit/614006c1e575df5ca03059669e435aedd64e8db1
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-20T13:43:29-08:00

Commit Message:
AVALANCHE: Implement ShootEmUp::defineCameo().

Changed paths:
    engines/avalanche/shootemup.cpp
    engines/avalanche/shootemup.h



diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 51bc714..5f48c2f 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -215,8 +215,21 @@ void ShootEmUp::define(int16 x, int16 y, byte p, int8 ix, int8 iy, int16 time, b
 	}
 }
 
-void ShootEmUp::defineCameo(int16 xx, int16 yy, byte pp, int16 time) {
-	warning("STUB: ShootEmUp::defineCameo()");
+void ShootEmUp::defineCameo(int16 x, int16 y, byte p, int16 time) {
+	for (int i = 0; i < 99; i++) {
+		if (_sprites[i]._x == kFlag) {
+			_sprites[i]._x = x;
+			_sprites[i]._y = y;
+			_sprites[i]._p = p;
+			_sprites[i]._ix = 0;
+			_sprites[i]._iy = 0;
+			_sprites[i]._timeout = time;
+			_sprites[i]._cameo = true;
+			_sprites[i]._cameoFrame = p + 1;
+			_sprites[i]._missile = false;
+			_sprites[i]._wipe = false;
+		}
+	}
 }
 
 void ShootEmUp::showStock(byte index) {
diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h
index 36ef8d0..d0df763 100644
--- a/engines/avalanche/shootemup.h
+++ b/engines/avalanche/shootemup.h
@@ -103,7 +103,7 @@ private:
 	void blank(Common::Rect rect);
 	void plotThem();
 	void define(int16 x, int16 y, byte p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe);
-	void defineCameo(int16 xx, int16 yy, byte pp, int16 time);
+	void defineCameo(int16 x, int16 y, byte p, int16 time);
 	void showStock(byte index);
 	void drawNumber(int number, int size, int x);
 	void showScore();






More information about the Scummvm-git-logs mailing list