FifoFileStruct: replace unions with explicit padding

This commit is contained in:
Michael Maltese 2017-04-25 17:29:49 -07:00
parent 4d52df150b
commit f9a67fbf6f
1 changed files with 28 additions and 33 deletions

View File

@ -15,12 +15,10 @@ enum
MIN_LOADER_VERSION = 1,
};
#pragma pack(push, 4)
#pragma pack(push, 1)
union FileHeader
struct FileHeader
{
struct
{
u32 fileId;
u32 file_version;
u32 min_loader_version;
@ -37,22 +35,18 @@ union FileHeader
u32 flags;
u64 texMemOffset;
u32 texMemSize;
};
u32 rawData[32];
u8 reserved[40];
};
union FileFrameInfo
struct FileFrameInfo
{
struct
{
u64 fifoDataOffset;
u32 fifoDataSize;
u32 fifoStart;
u32 fifoEnd;
u64 memoryUpdatesOffset;
u32 numMemoryUpdates;
};
u32 rawData[16];
u8 reserved[32];
};
struct FileMemoryUpdate
@ -62,6 +56,7 @@ struct FileMemoryUpdate
u64 dataOffset;
u32 dataSize;
u8 type;
u8 reserved[3];
};
#pragma pack(pop)