diff options
-rw-r--r-- | engines/hdb/draw-manager.cpp | 5 | ||||
-rw-r--r-- | engines/hdb/draw-manager.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index b03763e849..6cd7909ec0 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -26,9 +26,14 @@ namespace HDB { DrawMan::DrawMan() { _tLookupArray = NULL; + _globalSurface.create(kScreenWidth, kScreenHeight, g_hdb->_format); _systemInit = false; } +DrawMan::~DrawMan() { + _globalSurface.free(); +} + bool DrawMan::init() { // Read total number of tiles in game diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index 3e88fa9c8f..b27638dd94 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -53,6 +53,7 @@ class DrawMan { public: DrawMan(); + ~DrawMan(); bool init(); Tile *getTile(int index); @@ -67,6 +68,7 @@ public: //void draw3DStarsLeft(); private: + Graphics::ManagedSurface _globalSurface; int _numTiles; TileLookup *_tLookupArray; uint16 _skyTiles[kMaxSkies]; |