diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-04-20 14:49:44 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-04-20 14:49:44 +0200 |
| commit | fc538c5088e52f0932f74f190cd6499fd6da8a9c (patch) | |
| tree | fba3d7a6c4a9146b5eaec45e770f6a1dd7afccaa /src/tools/map_extractor | |
| parent | d4e355d5344d98e127e9d33082262649812062a9 (diff) | |
Tools: Enabled struct packing to ensure that structures are read from files properly
Diffstat (limited to 'src/tools/map_extractor')
| -rw-r--r-- | src/tools/map_extractor/adt.h | 4 | ||||
| -rw-r--r-- | src/tools/map_extractor/dbcfile.h | 4 | ||||
| -rw-r--r-- | src/tools/map_extractor/loadlib/loadlib.h | 5 | ||||
| -rw-r--r-- | src/tools/map_extractor/wdt.h | 4 |
4 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h index 5cb45d488d5..10894c7a697 100644 --- a/src/tools/map_extractor/adt.h +++ b/src/tools/map_extractor/adt.h @@ -40,6 +40,8 @@ enum LiquidType #define ADT_CELL_SIZE 8 #define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE) +#pragma pack(push, 1) + // // Adt file height map chunk // @@ -304,4 +306,6 @@ public: adt_MHDR *a_grid; }; +#pragma pack(pop) + #endif diff --git a/src/tools/map_extractor/dbcfile.h b/src/tools/map_extractor/dbcfile.h index 526c553e0f0..9e2e6670f89 100644 --- a/src/tools/map_extractor/dbcfile.h +++ b/src/tools/map_extractor/dbcfile.h @@ -82,6 +82,8 @@ public: friend class DBCFile; friend class DBCFile::Iterator; + + Record& operator=(Record const& right); }; /** Iterator that iterates over records */ @@ -111,6 +113,8 @@ public: } private: Record record; + + Iterator& operator=(Iterator const& right); }; // Get record by id diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h index 724c41ef3c9..39f800d9b4c 100644 --- a/src/tools/map_extractor/loadlib/loadlib.h +++ b/src/tools/map_extractor/loadlib/loadlib.h @@ -47,6 +47,8 @@ typedef uint8_t uint8; #define FILE_FORMAT_VERSION 18 +#pragma pack(push, 1) + union u_map_fcc { char fcc_txt[4]; @@ -80,4 +82,7 @@ public: bool loadFile(char *filename, bool log = true); virtual void free(); }; + +#pragma pack(pop) + #endif diff --git a/src/tools/map_extractor/wdt.h b/src/tools/map_extractor/wdt.h index a55598105b3..9b7fc53cb34 100644 --- a/src/tools/map_extractor/wdt.h +++ b/src/tools/map_extractor/wdt.h @@ -25,6 +25,8 @@ //************************************************************************************** #define WDT_MAP_SIZE 64 +#pragma pack(push, 1) + class wdt_MWMO{ union{ uint32 fcc; @@ -83,4 +85,6 @@ public: wdt_MWMO *wmo; }; +#pragma pack(pop) + #endif
\ No newline at end of file |
