From e6a10fb9925a3429dc27c46dd116ad16946b3253 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 15 Apr 2021 18:35:36 +0200 Subject: [PATCH] fix iw3 gcc compatibility --- src/Common/Game/IW3/IW3_Assets.h | 8 ++++---- src/ObjLoading/ObjContainer/SoundBank/SoundBank.cpp | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Common/Game/IW3/IW3_Assets.h b/src/Common/Game/IW3/IW3_Assets.h index 21fc0d71..e1a9ba2d 100644 --- a/src/Common/Game/IW3/IW3_Assets.h +++ b/src/Common/Game/IW3/IW3_Assets.h @@ -558,7 +558,7 @@ namespace IW3 MaterialTextureDefInfo u; }; - struct GfxDrawSurfFields + struct gcc_align(8) GfxDrawSurfFields { uint64_t objectId : 16; uint64_t reflectionProbeIndex : 8; @@ -573,8 +573,8 @@ namespace IW3 union GfxDrawSurf { - GfxDrawSurfFields fields; - uint64_t packed; + gcc_align(8) GfxDrawSurfFields fields; + gcc_align(8) uint64_t packed; }; struct MaterialInfo @@ -1355,7 +1355,7 @@ namespace IW3 float angles[3]; }; - struct __declspec(align(4)) GfxLightImage + struct type_align(4) GfxLightImage { GfxImage* image; char samplerState; diff --git a/src/ObjLoading/ObjContainer/SoundBank/SoundBank.cpp b/src/ObjLoading/ObjContainer/SoundBank/SoundBank.cpp index f5636b2b..d35aec0d 100644 --- a/src/ObjLoading/ObjContainer/SoundBank/SoundBank.cpp +++ b/src/ObjLoading/ObjContainer/SoundBank/SoundBank.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "zlib.h"