aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-05-15 17:52:39 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit73a7cba58921e59cdd3049f57b0a3990e7422ea2 (patch)
tree53e1d7b34b0dbcc4ed11bfdb8227952c3375b5a5
parenta8c82c1e947e845e201aa114a246a5b3e3dd863b (diff)
downloadscummvm-rg350-73a7cba58921e59cdd3049f57b0a3990e7422ea2.tar.gz
scummvm-rg350-73a7cba58921e59cdd3049f57b0a3990e7422ea2.tar.bz2
scummvm-rg350-73a7cba58921e59cdd3049f57b0a3990e7422ea2.zip
DM: Fix bug with uninitialized _currMap.index and file loading order
-rw-r--r--engines/dm/dm.cpp7
-rw-r--r--engines/dm/dungeonman.cpp3
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index ee818495e4..34efcf3407 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -54,9 +54,12 @@ Common::Error DMEngine::run() {
_displayMan = new DisplayMan(this);
_dungeonMan = new DungeonMan(this);
+ _displayMan->setUpScreens(320, 200);
+
_dungeonMan->loadDungeonFile();
+ _dungeonMan->setCurrentMapAndPartyMap(0);
+
- _displayMan->setUpScreens(320, 200);
_displayMan->loadGraphics();
@@ -64,7 +67,7 @@ Common::Error DMEngine::run() {
_displayMan->loadPalette(gPalCredits);
- _dungeonMan->setCurrentMapAndPartyMap(0);
+
uint16 i = 0; //TODO: testing, please delete me
while (true) {
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 46d4f62704..824a730602 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -352,9 +352,6 @@ void DungeonMan::loadDungeonFile() {
}
void DungeonMan::setCurrentMap(uint16 mapIndex) {
- if (_currMap.index == mapIndex)
- return;
-
_currMap.index = mapIndex;
_currMap.data = _dunData.mapData[mapIndex];
_currMap.map = _maps + mapIndex;