mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
LAB: better fix of loadMapData, taking into account the other loops on _maps
This commit is contained in:
parent
9b6851c1a7
commit
be1fd471be
@ -87,8 +87,8 @@ void LabEngine::loadMapData() {
|
|||||||
_music->stopSoundEffect();
|
_music->stopSoundEffect();
|
||||||
|
|
||||||
_maxRooms = mapFile->readUint16LE();
|
_maxRooms = mapFile->readUint16LE();
|
||||||
_maps = new MapData[_maxRooms]; // will be freed when the user exits the map
|
_maps = new MapData[_maxRooms + 1]; // will be freed when the user exits the map
|
||||||
for (int i = 0; i < _maxRooms; i++) {
|
for (int i = 1; i <= _maxRooms; i++) {
|
||||||
_maps[i]._x = mapFile->readUint16LE();
|
_maps[i]._x = mapFile->readUint16LE();
|
||||||
_maps[i]._y = mapFile->readUint16LE();
|
_maps[i]._y = mapFile->readUint16LE();
|
||||||
_maps[i]._pageNumber = mapFile->readUint16LE();
|
_maps[i]._pageNumber = mapFile->readUint16LE();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user