[Scummvm-cvs-logs] scummvm master -> 1ba4cce14b7fc272036d56a240fc7f0f7c133e56

urukgit urukgit at users.noreply.github.com
Sat Feb 8 18:12:31 CET 2014


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

Summary:
3ebd83d197 AVALANCHE: Repair the ghost's animation.
b57345e70b AVALANCHE: Add the yelling to the end of the ghost's animation.
46a341b4aa AVALANCHE: Implement the ghostroom's animation until Avvy turns back.
bb596a5b1b AVALANCHE: Implement another pair of floating eyeballs.
5c9029c731 AVALANCHE: Finish GhostRoom's implementation.
1ba4cce14b AVALANCHE: Repair GhostRoom::doBat().


Commit: 3ebd83d19716de40df4b6570fb5473b7e6292510
    https://github.com/scummvm/scummvm/commit/3ebd83d19716de40df4b6570fb5473b7e6292510
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T07:54:40-08:00

Commit Message:
AVALANCHE: Repair the ghost's animation.

Now it doesn't overlap with the bat's static picture on the bottom of
the screen.

Changed paths:
    engines/avalanche/ghostroom.cpp



diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index d5d10ab..a210035 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -252,7 +252,7 @@ void GhostRoom::run() {
 
 	for (int i = 0; i < 4; i++)
 		for (int j = 0; j < 5; j++) {
-			_vm->_graphics->drawFilledRectangle(Common::Rect(0, 96, 26 * 8, 169 + kAdjustment[j]), kColorBlack);
+			_vm->_graphics->drawFilledRectangle(Common::Rect(0, 96, 26 * 8, 169), kColorBlack);
 			_vm->_graphics->ghostDrawGhost(_ghost[kWaveOrder[j]], 0, 96 + kAdjustment[j]);
 			_vm->_graphics->refreshScreen();
 


Commit: b57345e70b978072e9f024976bce7ef198bfd7b7
    https://github.com/scummvm/scummvm/commit/b57345e70b978072e9f024976bce7ef198bfd7b7
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T08:03:03-08:00

Commit Message:
AVALANCHE: Add the yelling to the end of the ghost's animation.

Changed paths:
    engines/avalanche/ghostroom.cpp



diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index a210035..f6a03a7 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -248,17 +248,24 @@ void GhostRoom::run() {
 	}
 
 	// Then it waves:
-	_aarghCount = -14;
+	_aarghCount = -15;
 
 	for (int i = 0; i < 4; i++)
 		for (int j = 0; j < 5; j++) {
 			_vm->_graphics->drawFilledRectangle(Common::Rect(0, 96, 26 * 8, 169), kColorBlack);
 			_vm->_graphics->ghostDrawGhost(_ghost[kWaveOrder[j]], 0, 96 + kAdjustment[j]);
+
+			_aarghCount++;
+
+			if (_aarghCount >= 0)
+				for (int k = 0; k <= _aarghCount; k++)
+					_vm->_graphics->ghostDrawPicture(_aargh[k], _aarghWhere[k].x, _aarghWhere[k].y);
+
 			_vm->_graphics->refreshScreen();
 
 			wait(177);
 		}
-	
+
 	warning("STUB: run()");
 
 	CursorMan.showMouse(true);


Commit: 46a341b4aa158aadb1681937354af7446ba8be25
    https://github.com/scummvm/scummvm/commit/46a341b4aa158aadb1681937354af7446ba8be25
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T08:16:14-08:00

Commit Message:
AVALANCHE: Implement the ghostroom's animation until Avvy turns back.

Changed paths:
    engines/avalanche/ghostroom.cpp



diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index f6a03a7..f45f404 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -112,7 +112,9 @@ void GhostRoom::doBat() {
 }
 
 void GhostRoom::bigGreenEyes(byte how) {
-	warning("STUB: bigGreenEyes()");
+	_vm->_graphics->ghostDrawPicture(_greenEyes[how], 330, 103);
+	_vm->_graphics->ghostDrawPicture(_greenEyes[how], 376, 103);
+	_vm->_graphics->refreshScreen();
 }
 
 ChunkBlock GhostRoom::readChunkBlock(Common::File &file) {
@@ -266,6 +268,24 @@ void GhostRoom::run() {
 			wait(177);
 		}
 
+	// The exclamation mark appears:
+	_vm->_graphics->ghostDrawPicture(_exclamation, 246, 127);
+	_vm->_graphics->refreshScreen();
+	wait(777);
+
+	// Erase "aargh":
+	_vm->_graphics->drawFilledRectangle(Common::Rect(172, 78, 348, 112), kColorBlack); 
+	_vm->_graphics->refreshScreen();
+
+	for (int i = 4; i >= 0; i--) {
+		wait(377);
+		bigGreenEyes(i);
+	}
+
+	// Erase the exclamation mark:
+	_vm->_graphics->drawFilledRectangle(Common::Rect(246, 127, 252, 134), kColorBlack); 
+	_vm->_graphics->refreshScreen();
+
 	warning("STUB: run()");
 
 	CursorMan.showMouse(true);


Commit: bb596a5b1b6ee4737ac7161657f044a567fa620d
    https://github.com/scummvm/scummvm/commit/bb596a5b1b6ee4737ac7161657f044a567fa620d
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T08:37:05-08:00

Commit Message:
AVALANCHE: Implement another pair of floating eyeballs.

Repair the previous one.

Changed paths:
    engines/avalanche/ghostroom.cpp



diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index f45f404..dc75fff 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -208,12 +208,12 @@ void GhostRoom::run() {
 		int xBound = x % 30;
 		if ((22 <= xBound) && (xBound <= 27)) {
 			if (xBound == 27)
-				_vm->_graphics->drawFilledRectangle(Common::Rect(x, 134, x + 17, 137), kColorBlack);
+				_vm->_graphics->drawFilledRectangle(Common::Rect(x, 135, x + 17, 137), kColorBlack);
 			_vm->_graphics->ghostDrawPicture(_eyes[0], x, 136);
 			_vm->_graphics->drawDot(x + 16, 137, kColorBlack);
 		} else {
 			if (xBound == 21)
-				_vm->_graphics->drawFilledRectangle(Common::Rect(x, 136, x + 18, 140), kColorBlack);
+				_vm->_graphics->drawFilledRectangle(Common::Rect(x, 137, x + 18, 139), kColorBlack);
 			_vm->_graphics->ghostDrawPicture(_eyes[0], x, 135);
 			_vm->_graphics->drawDot(x + 16, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
 		}
@@ -286,6 +286,31 @@ void GhostRoom::run() {
 	_vm->_graphics->drawFilledRectangle(Common::Rect(246, 127, 252, 134), kColorBlack); 
 	_vm->_graphics->refreshScreen();
 
+	// Avvy hurries back:
+	_glerkStage = 1;
+	_greldetCount = 18;
+	_redGreldet = false;
+	
+	for (int x = 217; x <= 479; x++) {
+		// The floating eyeballs again:
+		int xBound = x % 30;
+		if ((22 <= xBound) && (xBound <= 27)) {
+			if (xBound == 22)
+				_vm->_graphics->drawFilledRectangle(Common::Rect(x + 22, 134, x + 38, 138), kColorBlack);
+			_vm->_graphics->ghostDrawPicture(_eyes[1], x + 23, 136);
+			_vm->_graphics->drawDot(x + 22, 137, kColorBlack);
+		} else {
+			if (xBound == 28)
+				_vm->_graphics->drawFilledRectangle(Common::Rect(x + 22, 135, x + 38, 139), kColorBlack);
+			_vm->_graphics->ghostDrawPicture(_eyes[1], x + 23, 135);
+			_vm->_graphics->drawDot(x + 22, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
+		}
+
+		_vm->_graphics->refreshScreen();
+
+		wait(10);
+	}
+
 	warning("STUB: run()");
 
 	CursorMan.showMouse(true);


Commit: 5c9029c7319f3e5bbffb0aba51b6d1e7a739df09
    https://github.com/scummvm/scummvm/commit/5c9029c7319f3e5bbffb0aba51b6d1e7a739df09
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T09:07:51-08:00

Commit Message:
AVALANCHE: Finish GhostRoom's implementation.

Changed paths:
    engines/avalanche/animation.cpp
    engines/avalanche/ghostroom.cpp



diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index a3c01af..74dd210 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -815,7 +815,7 @@ void Animation::callSpecial(uint16 which) {
 		}
 		break;
 	case 4: // This is the ghost room link.
-		_sprites[0]->turn(kDirRight); // you'll see this after we get back from bootstrap
+		_sprites[0]->turn(kDirRight); // You'll see this after we get back.
 		_vm->_timer->addTimer(1, Timer::kProcGhostRoomPhew, Timer::kReasonGhostRoomPhew);
 		_vm->_ghostroom->run();
 		break;
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index dc75fff..a6d84df 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -28,12 +28,14 @@
 #include "avalanche/avalanche.h"
 #include "avalanche/ghostroom.h"
 
+#include "common/random.h"
+
 namespace Avalanche {
 
 const int8 GhostRoom::kAdjustment[5] = { 7, 0, 7, 7, 7 };
 const byte GhostRoom::kWaveOrder[5] = { 4, 0, 1, 2, 3 };
 const byte GhostRoom::kGlerkFade[26] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 0 };
-const byte GhostRoom::kGreldetFade[18] = { 1, 2, 3, 4, 5, 6, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1 };
+const byte GhostRoom::kGreldetFade[18] = { 0, 1, 2, 3, 4, 5, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0 };
 
 GhostRoom::GhostRoom(AvalancheEngine *vm) {
 	_vm = vm;
@@ -287,7 +289,7 @@ void GhostRoom::run() {
 	_vm->_graphics->refreshScreen();
 
 	// Avvy hurries back:
-	_glerkStage = 1;
+	_glerkStage = 0;
 	_greldetCount = 18;
 	_redGreldet = false;
 	
@@ -306,14 +308,34 @@ void GhostRoom::run() {
 			_vm->_graphics->drawDot(x + 22, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
 		}
 
+		// Plot the Green Eyes:
+		if ((x % 53) == 5) {
+			bigGreenEyes(_glerkStage);
+			_glerkStage++;
+		}
+
+		// Plot the Greldet:
+		
+		if (_greldetCount == 18) {
+			_greldetX = _vm->_rnd->getRandomNumber(599);
+			_greldetY = _vm->_rnd->getRandomNumber(79);
+			_greldetCount = 0;
+			_redGreldet = !_redGreldet;
+		}
+		
+		_vm->_graphics->ghostDrawPicture(_greldet[kGreldetFade[_greldetCount]][_redGreldet], _greldetX, _greldetY);
+		_greldetCount++;
+
 		_vm->_graphics->refreshScreen();
 
 		wait(10);
 	}
 
-	warning("STUB: run()");
-
 	CursorMan.showMouse(true);
+	_vm->_graphics->restoreScreen();
+	_vm->_graphics->removeBackup();
+	_vm->fadeOut();
+	_vm->fadeIn();
 }
 
 } // End of namespace Avalanche


Commit: 1ba4cce14b7fc272036d56a240fc7f0f7c133e56
    https://github.com/scummvm/scummvm/commit/1ba4cce14b7fc272036d56a240fc7f0f7c133e56
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-08T09:11:36-08:00

Commit Message:
AVALANCHE: Repair GhostRoom::doBat().

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



diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index a6d84df..ea1e428 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -41,6 +41,9 @@ GhostRoom::GhostRoom(AvalancheEngine *vm) {
 	_vm = vm;
 
 	_glerkStage = 0;
+	_batX = 0;
+	_batY = 0;
+	_batCount = 0;
 	_aarghCount = 0;
 	_greldetX = _greldetY = 0;
 	_greldetCount = 0;
@@ -78,38 +81,34 @@ void GhostRoom::wait(uint16 howLong) {
 }
 
 void GhostRoom::doBat() {
-	static int16 batX = 277;
-	static int16 batY = 40;
-	static uint16 batCount = 0;
-
-	batCount++;
+	_batCount++;
 
 	int8 dx, iy;
 	byte batImage;
-	if ((batCount % 2) == 1) {
-		if ((1 <= batCount) && (batCount <= 90)) {
+	if ((_batCount % 2) == 1) {
+		if ((1 <= _batCount) && (_batCount <= 90)) {
 			dx = 2;
 			iy = 1;
 			batImage = 0;
-		} else if ((91 <= batCount) && (batCount <= 240)) {
+		} else if ((91 <= _batCount) && (_batCount <= 240)) {
 			dx = 1;
 			iy = 1;
 			batImage = 1;
-		} else if((241 <= batCount) && (batCount <= 260)) {
+		} else if((241 <= _batCount) && (_batCount <= 260)) {
 			dx = 1;
 			iy = 4;
 			batImage = 2;
 		}
 
-		if ((batCount == 91) || (batCount == 241)) // When the bat changes, blank out the old one.
-			_vm->_graphics->drawFilledRectangle(Common::Rect(batX + _bat[batImage].w, batY, batX + _bat[batImage - 1].w, batY + _bat[batImage - 1].h), kColorBlack);
+		if ((_batCount == 91) || (_batCount == 241)) // When the bat changes, blank out the old one.
+			_vm->_graphics->drawFilledRectangle(Common::Rect(_batX + _bat[batImage].w, _batY, _batX + _bat[batImage - 1].w, _batY + _bat[batImage - 1].h), kColorBlack);
 
-		_vm->_graphics->drawFilledRectangle(Common::Rect(batX, batY, batX + _bat[batImage].w, batY + iy), kColorBlack);
-		_vm->_graphics->drawFilledRectangle(Common::Rect(batX + _bat[batImage].w - dx, batY, batX + _bat[batImage].w, batY + _bat[batImage].h), kColorBlack);
+		_vm->_graphics->drawFilledRectangle(Common::Rect(_batX, _batY, _batX + _bat[batImage].w, _batY + iy), kColorBlack);
+		_vm->_graphics->drawFilledRectangle(Common::Rect(_batX + _bat[batImage].w - dx, _batY, _batX + _bat[batImage].w, _batY + _bat[batImage].h), kColorBlack);
 
-		batX -= dx;
-		batY++;
-		_vm->_graphics->ghostDrawPicture(_bat[batImage], batX, batY);
+		_batX -= dx;
+		_batY++;
+		_vm->_graphics->ghostDrawPicture(_bat[batImage], _batX, _batY);
 	}
 }
 
@@ -203,7 +202,11 @@ void GhostRoom::run() {
 
 	loadPictures();
 
+	// Avvy walks over:
 	_glerkStage = 0;
+	_batX = 277;
+	_batY = 40;
+	_batCount = 0;
 
 	for (int x = 500; x >= 217; x--) {
 		// The floating eyeballs:
diff --git a/engines/avalanche/ghostroom.h b/engines/avalanche/ghostroom.h
index 72ee828..b4a2b28 100644
--- a/engines/avalanche/ghostroom.h
+++ b/engines/avalanche/ghostroom.h
@@ -68,6 +68,8 @@ private:
 	Graphics::Surface _greenEyes[5];
 	Graphics::Surface _greldet[6][2];
 
+	int16 _batX, _batY;
+	uint16 _batCount;
 	byte _glerkStage;
 	int8 _aarghCount;
 	int16 _greldetX, _greldetY;






More information about the Scummvm-git-logs mailing list