aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-07 19:46:16 +0530
committerEugene Sandulenko2019-09-03 17:16:44 +0200
commit9ab8716137e1eba9ac90b5bc4cc4e677362935ec (patch)
treef0cff8d67b46f136c5acb5dbf7823213addc2918
parentf489a466f73d563ca5c48e1e7a329950208bf596 (diff)
downloadscummvm-rg350-9ab8716137e1eba9ac90b5bc4cc4e677362935ec.tar.gz
scummvm-rg350-9ab8716137e1eba9ac90b5bc4cc4e677362935ec.tar.bz2
scummvm-rg350-9ab8716137e1eba9ac90b5bc4cc4e677362935ec.zip
HDB: Add DrawMan::init to count number of tiles
-rw-r--r--engines/hdb/draw-manager.cpp12
-rw-r--r--engines/hdb/draw-manager.h20
2 files changed, 8 insertions, 24 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 1ab2868d9a..85ee4ec9aa 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -26,18 +26,20 @@ namespace HDB {
DrawMan::DrawMan() {
_systemInit = false;
- cursorDisplay = true;
}
bool DrawMan::init() {
+
+ _numTiles = g_hdb->_fileMan->getCount("t32_", TYPE_TILE32);
+
+ if (!_numTiles) {
+ return false;
+ }
+
_systemInit = true;
return true;
}
-void DrawMan::loadTile32(char *name, uint32 *length) {
-
-}
-
Picture::~Picture() {
_surface.free();
}
diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h
index 8dcca5ee72..f0895d175e 100644
--- a/engines/hdb/draw-manager.h
+++ b/engines/hdb/draw-manager.h
@@ -23,8 +23,6 @@
#ifndef HDB_DRAW_MANAGER_H
#define HDB_DRAW_MANAGER_H
-#include "common/array.h"
-#include "common/file.h"
#include "graphics/surface.h"
#include "hdb/hdb.h"
@@ -35,27 +33,11 @@ class DrawMan {
public:
DrawMan();
- /*
- struct Tile {
- MPCEntry *mpcData;
- Tile32Type *tileData;
- uint32 flags;
- uint16 loaded;
- uint16 skyIndex;
- uint16 animIndex;
- };*/
bool init();
-// void saveToFile(const Common::String &filename);
-// void loadFromFile(const Common::String &filename);
- void loadTile32(char *name, uint32 *length);
-
- bool cursorDisplay;
- int cursorX, cursorY;
-// Common::Array<Tile *> tileArray;
private:
-
+ int _numTiles;
bool _systemInit;
};