[Scummvm-cvs-logs] scummvm master -> 737e38eff82e92fcea4d0971d0b43c5fa4a6d53c
urukgit
urukgit at users.noreply.github.com
Wed Feb 5 13:41:22 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
737e38eff8 AVALANCHE: Implement the floating eyeballs and the "Glerk"s animation.
Commit: 737e38eff82e92fcea4d0971d0b43c5fa4a6d53c
https://github.com/scummvm/scummvm/commit/737e38eff82e92fcea4d0971d0b43c5fa4a6d53c
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-05T04:36:10-08:00
Commit Message:
AVALANCHE: Implement the floating eyeballs and the "Glerk"s animation.
Changed paths:
engines/avalanche/ghostroom.cpp
engines/avalanche/graphics.cpp
engines/avalanche/graphics.h
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index cbb36fb..aee8b4f 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -32,7 +32,7 @@ namespace Avalanche {
const int8 GhostRoom::kAdjustment[5] = { 7, 0, 7, 7, 7 };
const byte GhostRoom::kWaveOrder[5] = { 5, 1, 2, 3, 4 };
-const byte GhostRoom::kGlerkFade[26] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 2, 2, 1 };
+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 };
GhostRoom::GhostRoom(AvalancheEngine *vm) {
@@ -168,7 +168,44 @@ void GhostRoom::run() {
_vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 640, 200), kColorBlack); // Black out the whole screen.
loadPictures();
+
+ _glerkStage = 0;
+
+ for (int x = 500; x >= 217; x--) {
+ // The floating eyeballs:
+ 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->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->ghostDrawPicture(_eyes[0], x, 135);
+ _vm->_graphics->drawDot(x + 16, 136, kColorBlack); // Eyes would leave a trail 1 pixel high behind them.
+ }
+
+ // Plot the Glerk:
+ if ((x % 10) == 0) {
+ if (_glerkStage > 25)
+ break;
+
+ _vm->_graphics->ghostDrawGlerk(_glerk[kGlerkFade[_glerkStage]], 456, 14);
+ _glerkStage++;
+ }
+
+ _vm->_graphics->refreshScreen();
+
+ doBat();
+
+ wait(15);
+ }
+ // Blank out the Glerk's space.
+ _vm->_graphics->drawFilledRectangle(Common::Rect(456, 14, 530, 50), kColorBlack);
+ _vm->_graphics->refreshScreen();
+
warning("STUB: run()");
CursorMan.showMouse(true);
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 8bc32d8..06c8c83 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -281,6 +281,10 @@ Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16
return endPoint;
}
+void GraphicManager::drawDot(int x, int y, Color color) {
+ *(byte *)_surface.getBasePtr(x, y) = color;
+}
+
void GraphicManager::drawLine(int x1, int y1, int x2, int y2, int penX, int penY, Color color) {
_surface.drawThickLine(x1, y1, x2, y2, penX, penY, color);
}
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 485da1f..a372ce8 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -59,6 +59,7 @@ public:
void loadDigits();
void loadMouse(byte which);
+ void drawDot(int x, int y, Color color);
void drawLine(int x1, int y1, int x2, int y2, int penX, int penY, Color color);
Common::Point drawScreenArc(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
void drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
More information about the Scummvm-git-logs
mailing list