diff options
author | uruk | 2013-07-12 10:25:16 +0200 |
---|---|---|
committer | uruk | 2013-07-12 10:25:16 +0200 |
commit | 1bb9d2b9965348e6526e9b9d5100ff443fdef3cd (patch) | |
tree | 1e3bf0f30d08991cdd32f3b973ef1c3a02f3c123 | |
parent | 0fc20c25dea704eafecd8786722f8e26ca552e2f (diff) | |
download | scummvm-rg350-1bb9d2b9965348e6526e9b9d5100ff443fdef3cd.tar.gz scummvm-rg350-1bb9d2b9965348e6526e9b9d5100ff443fdef3cd.tar.bz2 scummvm-rg350-1bb9d2b9965348e6526e9b9d5100ff443fdef3cd.zip |
AVALANCHE: Grap: rename drawToScreen to refreshScreen, add drawBar.
-rw-r--r-- | engines/avalanche/graph.cpp | 7 | ||||
-rw-r--r-- | engines/avalanche/graph.h | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graph.cpp index 2c845c06c5..47836aaa86 100644 --- a/engines/avalanche/graph.cpp +++ b/engines/avalanche/graph.cpp @@ -35,6 +35,7 @@ #include "engines/util.h" #include "graphics/palette.h" +#include "common/rect.h" namespace Avalanche { @@ -73,7 +74,11 @@ void Graph::setPixel(byte *pixel, byte color) { *pixel = color; } -void Graph::drawToScreen() { +void Graph::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) { + _surface.fillRect(Common::Rect(x1, y1, x2, y2), color); +} + +void Graph::refreshScreen() { g_system->copyRectToScreen(_surface.pixels, _surface.pitch , 0, 0, _screenWidth, _screenHeight); g_system->updateScreen(); } diff --git a/engines/avalanche/graph.h b/engines/avalanche/graph.h index 220f87f1f6..beaa796915 100644 --- a/engines/avalanche/graph.h +++ b/engines/avalanche/graph.h @@ -38,7 +38,7 @@ class AvalancheEngine; class Graph { public: static const int16 _screenWidth = 640; - static const int16 _screenHeight = 350; + static const int16 _screenHeight = 200; @@ -52,7 +52,9 @@ public: void setPixel(byte *pixel, byte color); - void drawToScreen(); + void drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color); + + void refreshScreen(); private: AvalancheEngine *_vm; |