aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/graph.cpp7
-rw-r--r--engines/avalanche/graph.h6
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;