[Scummvm-cvs-logs] scummvm master -> f20d4e726d4c747d9c813d12834d35c7475e250e
urukgit
urukgit at users.noreply.github.com
Tue Feb 18 14:05:34 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:
f20d4e726d AVALANCHE: Introduce GraphicManager::blackOutScreen().
Commit: f20d4e726d4c747d9c813d12834d35c7475e250e
https://github.com/scummvm/scummvm/commit/f20d4e726d4c747d9c813d12834d35c7475e250e
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-18T05:05:03-08:00
Commit Message:
AVALANCHE: Introduce GraphicManager::blackOutScreen().
Changed paths:
engines/avalanche/ghostroom.cpp
engines/avalanche/graphics.cpp
engines/avalanche/graphics.h
engines/avalanche/shootemup.cpp
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index 5942c55..91b2bae 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 ca9409d..4bd6695 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 b720ae7..34f6498 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 cd46d00..435adb1 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:
More information about the Scummvm-git-logs
mailing list