aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-06-26 22:39:18 +0530
committerEugene Sandulenko2019-09-03 17:17:00 +0200
commit9ef57f67de43063621b7446e9427d08b90a197ac (patch)
tree5e672812404bde082966e6b25f7699e223232ae9 /engines
parent1c0da3526c7adc4e7f1d637892088473556c4611 (diff)
downloadscummvm-rg350-9ef57f67de43063621b7446e9427d08b90a197ac.tar.gz
scummvm-rg350-9ef57f67de43063621b7446e9427d08b90a197ac.tar.bz2
scummvm-rg350-9ef57f67de43063621b7446e9427d08b90a197ac.zip
HDB: Fix the type of _foreground and _background
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/map-loader.cpp6
-rw-r--r--engines/hdb/map-loader.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp
index 678c203f51..a5e7cf891d 100644
--- a/engines/hdb/map-loader.cpp
+++ b/engines/hdb/map-loader.cpp
@@ -89,7 +89,7 @@ bool Map::load(Common::SeekableReadStream *stream) {
_iconListOffset, _infoNum, _infoNum, _infoListOffset);
// Reading Background
- _background = new uint16[_width * _height];
+ _background = new int16[_width * _height];
stream->seek(_backgroundOffset);
for (int i = 0; i < _width * _height; i++) {
_background[i] = stream->readUint16LE();
@@ -100,7 +100,7 @@ bool Map::load(Common::SeekableReadStream *stream) {
}
// Reading Foreground
- _foreground = new uint16[_width * _height];
+ _foreground = new int16[_width * _height];
stream->seek(_foregroundOffset);
for (int i = 0; i < _width * _height; i++) {
_foreground[i] = stream->readUint16LE();
@@ -611,7 +611,7 @@ void Map::draw() {
for (int i = 0; i < maxTileX; i++) {
// Draw Background Tile
- uint16 tileIndex = _background[matrixY + _mapTileX + i];
+ int16 tileIndex = _background[matrixY + _mapTileX + i];
if (tileIndex < 0) {
tileIndex = 0;
}
diff --git a/engines/hdb/map-loader.h b/engines/hdb/map-loader.h
index 62d494c662..3916ee7485 100644
--- a/engines/hdb/map-loader.h
+++ b/engines/hdb/map-loader.h
@@ -156,8 +156,8 @@ private:
uint16 _infoNum;
uint32 _infoListOffset;
- uint16 *_background;
- uint16 *_foreground;
+ int16 *_background;
+ int16 *_foreground;
MSMIcon *_iconList;
byte *_mapExplosions;