From 0e58f9c9d1d21348f9fa5b68c5038bebf03e54c6 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Fri, 7 Jun 2019 18:11:56 +0530 Subject: [PATCH] HDB: Add the loadTiles() function to map-loader --- engines/hdb/map-loader.cpp | 18 +++++++++++++----- engines/hdb/map-loader.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index e4577b3b48e..c2828dc5a29 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -95,10 +95,18 @@ bool Map::load(Common::SeekableReadStream *stream) { return true; } -int MapLoader::loadTiles() { - warning("STUB: MAPLOADER: LOAD TILES"); - return 0; -} -#endif +int Map::loadTiles() { + + int tile, temp; + int skyIndex = 0; + + // Load all tiles + for (uint j = 0; j < _height; j++) { + for (uint i = 0; i < _width; i++) { + tile = _background[j * _width + i]; + } + } + + return skyIndex; } } diff --git a/engines/hdb/map-loader.h b/engines/hdb/map-loader.h index ce4d809761d..741241061b3 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -51,6 +51,7 @@ public: Map(); bool load(Common::SeekableReadStream *stream); + int loadTiles(); int mapX, mapY; // Coordinates of Map int mapTileX, mapTileY; // Tile Coordinates of Map