diff options
-rw-r--r-- | engines/gob/map.h | 17 | ||||
-rw-r--r-- | engines/gob/map_v1.cpp | 7 |
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/gob/map.h b/engines/gob/map.h index f373eb2123..f8e16210ee 100644 --- a/engines/gob/map.h +++ b/engines/gob/map.h @@ -63,20 +63,15 @@ struct WayPoint { int16 notWalkable; }; +struct ItemPos { + int8 x; + int8 y; + int8 orient; +}; + class Map { public: -#include "common/pack-start.h" // START STRUCT PACKING - -#define szMap_ItemPos 3 - struct ItemPos { - int8 x; - int8 y; - int8 orient; - } PACKED_STRUCT; - -#include "common/pack-end.h" // END STRUCT PACKING - int16 _mapWidth; int16 _mapHeight; diff --git a/engines/gob/map_v1.cpp b/engines/gob/map_v1.cpp index 1f007dbf34..aa6603fd55 100644 --- a/engines/gob/map_v1.cpp +++ b/engines/gob/map_v1.cpp @@ -98,7 +98,12 @@ void Map_v1::loadMapObjects(const char *avjFile) { _wayPoints[i].x = mapData.readUint16LE(); _wayPoints[i].y = mapData.readUint16LE(); } - mapData.read(_itemPoses, szMap_ItemPos * 20); + + for (int i = 0; i < 20; i++) { + _itemPoses[i].x = mapData.readByte(); + _itemPoses[i].y = mapData.readByte(); + _itemPoses[i].orient = mapData.readByte(); + } } mapData.skip(32 + 76 + 4 + 20); |