diff options
-rw-r--r-- | engines/avalanche/avalot.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/graphics.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/graphics.h | 10 |
3 files changed, 10 insertions, 6 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index c73208ca61..10b4dfcdbd 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -206,7 +206,7 @@ Common::Point Clock::calcHand(uint16 angle, uint16 length, Color color) { return(Common::Point(177, 177)); } - return(_vm->_graphics->drawArc(_vm->_graphics->_surface, kCenterX, kCenterY, 449 - angle, 450 - angle, length, color)); + return(_vm->_graphics->drawScreenArc(kCenterX, kCenterY, 449 - angle, 450 - angle, length, color)); } void Clock::drawHand(const Common::Point &endPoint, Color color) { diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index c4846d573c..9fb9ec17d2 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -269,6 +269,10 @@ Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16 return endPoint; } +Common::Point GraphicManager::drawScreenArc(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color) { + return drawArc(_surface, x, y, stAngle, endAngle, radius, color); +} + void GraphicManager::drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color) { while (radius > 0) drawArc(_scrolls, x, y, stAngle, endAngle, radius--, color); diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index 7af1f8a8b0..100a5dad72 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -67,11 +67,7 @@ public: void fleshColors(); - // Taken from Free Pascal's Procedure InternalEllipseDefault. Used to replace Pascal's procedure arc. - // Returns the end point of the arc. (Needed in Clock.) - // TODO: Make it more accurate later. - Common::Point drawArc(Graphics::Surface &surface, int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); - + Common::Point drawScreenArc(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); void drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); void drawTriangle(Common::Point *p, Color color); void drawNormalText(const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color); @@ -140,6 +136,10 @@ private: Graphics::Surface loadPictureGraphic(Common::File &file); // Reads Graphic-planar EGA data. void drawText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color); + // Taken from Free Pascal's Procedure InternalEllipseDefault. Used to replace Pascal's procedure arc. + // Returns the end point of the arc. (Needed in Clock.) + // TODO: Make it more accurate later. + Common::Point drawArc(Graphics::Surface &surface, int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); }; } // End of namespace Avalanche |