From d3ec729c8f7dff3689775ad32a42399e4f1ae015 Mon Sep 17 00:00:00 2001 From: uruk Date: Wed, 17 Jul 2013 20:48:55 +0200 Subject: AVALANCHE: Add Graph::drawLine(). --- engines/avalanche/graph.cpp | 4 ++++ engines/avalanche/graph.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/avalanche') diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graph.cpp index 2143bcf53e..9b5662e6be 100644 --- a/engines/avalanche/graph.cpp +++ b/engines/avalanche/graph.cpp @@ -78,6 +78,10 @@ void Graph::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) { _surface.fillRect(Common::Rect(x1, y1, x2, y2), color); } +void Graph::drawLine(int x0, int y0, int x1, int y1, uint32 color) { + _surface.drawLine(x0, y0, x1, y1, color); +} + Graphics::Surface *Graph::readImage(const byte *source) { Graphics::Surface *picture = new Graphics::Surface; diff --git a/engines/avalanche/graph.h b/engines/avalanche/graph.h index f1a6678fad..d602864e0f 100644 --- a/engines/avalanche/graph.h +++ b/engines/avalanche/graph.h @@ -56,7 +56,9 @@ public: void drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color); - // Must free the returened pointer!!! + void drawLine(int x0, int y0, int x1, int y1, uint32 color); + + // Must free the returned pointer!!! Graphics::Surface *readImage(const byte *source); void copySurface(const Graphics::Surface &source, uint16 destX, uint16 destY); -- cgit v1.2.3