diff options
author | Strangerke | 2016-06-04 10:11:25 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 442d41714023d2d128d92f15a284c5c0aa341ee4 (patch) | |
tree | f08a0f4ecaeae53aa58d6718fa1b4e1b9588c754 | |
parent | 35677f1c82d0e47463ddb537ed894d582bf823aa (diff) | |
download | scummvm-rg350-442d41714023d2d128d92f15a284c5c0aa341ee4.tar.gz scummvm-rg350-442d41714023d2d128d92f15a284c5c0aa341ee4.tar.bz2 scummvm-rg350-442d41714023d2d128d92f15a284c5c0aa341ee4.zip |
DM: Fix some warnings
-rw-r--r-- | engines/dm/dungeonman.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp index bb803abf92..c37467eb88 100644 --- a/engines/dm/dungeonman.cpp +++ b/engines/dm/dungeonman.cpp @@ -495,10 +495,6 @@ Thing DungeonMan::getSquareFirstThing(int16 mapX, int16 mapY) { // TODO: get rid of the GOTOs void DungeonMan::setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX, int16 mapY) { // complete, except where marked - bool leftOrnAllowed, rightOrnAllowed, frontOrnAllowed; - bool squareIsFakeWall; - bool footPrintsAllowed; - _vm->_displayMan->_championPortraitOrdinal = 0; // BUG0_75, possible fix memset(aspectArray, 0, 5 * sizeof(uint16)); @@ -506,6 +502,12 @@ void DungeonMan::setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX, Square square = getSquare(mapX, mapY); aspectArray[kElemAspect] = square.getType(); + + bool leftOrnAllowed = false; + bool rightOrnAllowed = false; + bool frontOrnAllowed = false; + bool squareIsFakeWall = false; + bool footPrintsAllowed = false; switch (square.getType()) { case kWallElemType: switch (dir) { @@ -531,7 +533,6 @@ void DungeonMan::setSquareAspect(uint16 *aspectArray, direction dir, int16 mapX, break; } - squareIsFakeWall = false; T0172010_ClosedFakeWall: setSquareAspectOrnOrdinals(aspectArray, leftOrnAllowed, frontOrnAllowed, rightOrnAllowed, dir, mapX, mapY, squareIsFakeWall); @@ -775,8 +776,8 @@ void DungeonMan::decodeText(char *destString, Thing thing, TextType type) { uint16 codeCounter = 0; int16 escChar = 0; uint16 *codeWord = _dunData.textData + textString.getWordOffset(); - uint16 code, codes; - char *escReplString = NULL; + uint16 code = 0, codes = 0; + char *escReplString = nullptr; for (;;) { /*infinite loop*/ if (!codeCounter) { codes = *codeWord++; |