diff options
author | Eugene Sandulenko | 2019-07-09 21:16:02 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:16 +0200 |
commit | f544c83def7196afdbd696bc550ac2a2d6f0d2fe (patch) | |
tree | 057df78ccc98db81c468239cd5fc4d17e36c5de2 | |
parent | 168921d7d74788e12e2ebb99ceccd9dba09c61e2 (diff) | |
download | scummvm-rg350-f544c83def7196afdbd696bc550ac2a2d6f0d2fe.tar.gz scummvm-rg350-f544c83def7196afdbd696bc550ac2a2d6f0d2fe.tar.bz2 scummvm-rg350-f544c83def7196afdbd696bc550ac2a2d6f0d2fe.zip |
HDB: Allocate memory on loading
-rw-r--r-- | engines/hdb/map.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index d725dc7a2a..b28533096c 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -167,14 +167,23 @@ void Map::loadSaveFile(Common::InSaveFile *in) { // load map data + _background = new int16[_width * _height]; for (i = 0; i < _width * _height; i++) _background[i] = in->readSint32LE(); + + _foreground = new int16[_width * _height]; for (i = 0; i < _width * _height; i++) _foreground[i] = in->readSint32LE(); + + _mapExplosions = new byte[_width * _height]; for (i = 0; i < _width * _height; i++) _mapExplosions[i] = in->readByte(); + + _mapExpBarrels = new byte[_width * _height]; for (i = 0; i < _width * _height; i++) _mapExpBarrels[i] = in->readByte(); + + _mapLaserBeams = new byte[_width * _height]; for (i = 0; i < _width * _height; i++) _mapLaserBeams[i] = in->readByte(); } |