diff options
author | Sven Hesse | 2010-10-30 17:27:53 +0000 |
---|---|---|
committer | Sven Hesse | 2010-10-30 17:27:53 +0000 |
commit | 8a7d0cc249ead074d7fb5bc8ff45acb279b87f80 (patch) | |
tree | ba6c5b294ec3ada98383c537d037df03ce64803a | |
parent | 0f536e28f9c3b6ee7bb3a92de49c8efc03e70ea8 (diff) | |
download | scummvm-rg350-8a7d0cc249ead074d7fb5bc8ff45acb279b87f80.tar.gz scummvm-rg350-8a7d0cc249ead074d7fb5bc8ff45acb279b87f80.tar.bz2 scummvm-rg350-8a7d0cc249ead074d7fb5bc8ff45acb279b87f80.zip |
GOB: Remove the "ugly" reading of Map::_itemPoses
Removing the need to pack that struct
svn-id: r53951
-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); |