1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 10:52:41 +01:00

Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style

This commit is contained in:
Charles Pigott
2018-06-18 21:21:45 +01:00
committed by Patric Stout
parent 93469a92f2
commit 63898f61b0
4 changed files with 20 additions and 23 deletions

View File

@@ -71,23 +71,16 @@ struct ScreenshotFormat {
/*************************************************
**** SCREENSHOT CODE FOR WINDOWS BITMAP (.BMP)
*************************************************/
#if defined(_MSC_VER) || defined(__WATCOMC__)
#pragma pack(push, 1)
#endif
/** BMP File Header (stored in little endian) */
struct BitmapFileHeader {
PACK(struct BitmapFileHeader {
uint16 type;
uint32 size;
uint32 reserved;
uint32 off_bits;
} GCC_PACK;
});
assert_compile(sizeof(BitmapFileHeader) == 14);
#if defined(_MSC_VER) || defined(__WATCOMC__)
#pragma pack(pop)
#endif
/** BMP Info Header (stored in little endian) */
struct BitmapInfoHeader {
uint32 size;