AVALANCHE: Implement the floating eyeballs and the "Glerk"s animation.
This commit is contained in:
parent
1af04e937b
commit
737e38eff8
3 changed files with 43 additions and 1 deletions
|
@ -32,7 +32,7 @@ namespace Avalanche {
|
||||||
|
|
||||||
const int8 GhostRoom::kAdjustment[5] = { 7, 0, 7, 7, 7 };
|
const int8 GhostRoom::kAdjustment[5] = { 7, 0, 7, 7, 7 };
|
||||||
const byte GhostRoom::kWaveOrder[5] = { 5, 1, 2, 3, 4 };
|
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 };
|
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) {
|
GhostRoom::GhostRoom(AvalancheEngine *vm) {
|
||||||
|
@ -169,6 +169,43 @@ void GhostRoom::run() {
|
||||||
|
|
||||||
loadPictures();
|
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()");
|
warning("STUB: run()");
|
||||||
|
|
||||||
CursorMan.showMouse(true);
|
CursorMan.showMouse(true);
|
||||||
|
|
|
@ -281,6 +281,10 @@ Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16
|
||||||
return endPoint;
|
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) {
|
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);
|
_surface.drawThickLine(x1, y1, x2, y2, penX, penY, color);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
void loadDigits();
|
void loadDigits();
|
||||||
void loadMouse(byte which);
|
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);
|
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);
|
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);
|
void drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue