From 954d1c649c99e19a020de9ed764b88a7ced2c25d Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sun, 23 Jun 2019 05:45:29 +0530 Subject: HDB: Add getter-setter for the cursor --- engines/hdb/draw-manager.cpp | 10 ++++++++++ engines/hdb/draw-manager.h | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'engines') diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 4a74e3de40..534ca966e8 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -395,6 +395,16 @@ int DrawMan::animateTile(int tileIndex) { return _tLookupArray[tileIndex].animIndex; } +void DrawMan::setCursor(int x, int y) { + _cursorX = x; + _cursorY = y; +} + +void DrawMan::getCursor(int *x, int *y) { + *x = _cursorX; + *y = _cursorY; +} + Picture::Picture() : _width(0), _height(0), _name("") { _surface.create(_width, _height, g_hdb->_format); } diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index 1d1c5d6f42..350f8655e4 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -115,6 +115,11 @@ public: int animateTile(int tileIndex); + // Font Functions + + void setCursor(int x, int y); + void getCursor(int *x, int *y); + private: int _numTiles; TileLookup *_tLookupArray; -- cgit v1.2.3