aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-02-18 14:05:03 +0100
committeruruk2014-02-18 14:05:03 +0100
commitf20d4e726d4c747d9c813d12834d35c7475e250e (patch)
tree9c1202cf140b6544ae256d28401d073d4f59b76b /engines
parent589c6ffed25e818cd332e3ffb462ee13c4c8703e (diff)
downloadscummvm-rg350-f20d4e726d4c747d9c813d12834d35c7475e250e.tar.gz
scummvm-rg350-f20d4e726d4c747d9c813d12834d35c7475e250e.tar.bz2
scummvm-rg350-f20d4e726d4c747d9c813d12834d35c7475e250e.zip
AVALANCHE: Introduce GraphicManager::blackOutScreen().
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/ghostroom.cpp2
-rw-r--r--engines/avalanche/graphics.cpp8
-rw-r--r--engines/avalanche/graphics.h3
-rw-r--r--engines/avalanche/shootemup.cpp4
4 files changed, 11 insertions, 6 deletions
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index 5942c5565c..91b2bae4f0 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -209,7 +209,7 @@ void GhostRoom::run() {
CursorMan.showMouse(false);
_vm->_graphics->saveScreen();
_vm->fadeOut();
- _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 639, 199), kColorBlack); // Black out the whole screen.
+ _vm->_graphics->blackOutScreen();
_vm->fadeIn();
// Only load the pictures if it's our first time walking into the room.
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index ca9409d25d..4bd6695bb8 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -478,12 +478,16 @@ void GraphicManager::drawDebugLines() {
}
}
+void GraphicManager::drawRectangle(Common::Rect rect, Color color) {
+ _surface.frameRect(Common::Rect(rect.left, rect.top, rect.right + 1, rect.bottom + 1), color);
+}
+
void GraphicManager::drawFilledRectangle(Common::Rect rect, Color color) {
_surface.fillRect(Common::Rect(rect.left, rect.top, rect.right + 1, rect.bottom + 1), color);
}
-void GraphicManager::drawRectangle(Common::Rect rect, Color color) {
- _surface.frameRect(Common::Rect(rect.left, rect.top, rect.right + 1, rect.bottom + 1), color);
+void GraphicManager::blackOutScreen() {
+ _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 639, 199), kColorBlack);
}
void GraphicManager::nimLoad() {
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index b720ae7c8e..34f6498fca 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -61,8 +61,9 @@ public:
// We have to handle the drawing of rectangles a little bit differently to mimic Pascal's bar() and rectangle() methods properly.
// Now it is possible to use the original coordinates everywhere.
- void drawFilledRectangle(Common::Rect rect, Color color);
void drawRectangle(Common::Rect rect, Color color);
+ void drawFilledRectangle(Common::Rect rect, Color color);
+ void blackOutScreen();
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);
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index cd46d00333..435adb1d48 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -206,7 +206,7 @@ void ShootEmUp::nextPage() {
}
void ShootEmUp::instructions() {
- _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 639, 199), kColorBlack); // Black out the whole screen.
+ _vm->_graphics->blackOutScreen();
_vm->_graphics->seuDrawPicture(25, 25, kFacingRight);
_vm->_graphics->drawNormalText("< Avvy, our hero, needs your help - you must move him around.", _vm->_font, 8, 60, 35, kColorWhite);
_vm->_graphics->drawNormalText("(He''s too terrified to move himself!)", _vm->_font, 8, 80, 45, kColorWhite);
@@ -270,7 +270,7 @@ void ShootEmUp::setup() {
_count321 = 255; // Counting down.
- _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 639, 199), kColorBlack); // Black out the whole screen.
+ _vm->_graphics->blackOutScreen();
// Set up status line:
_vm->_graphics->seuDrawPicture(0, 0, 16); // Score: