From 2974af3178ec526674684bb693165e5ab48cf3bc Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 21 May 2020 10:29:59 +0300 Subject: [PATCH] - fixed a bunch of compilation errors with MSVC 16.6.0 --- source/common/utility/files_decompress.cpp | 1 + source/duke3d/src/anim.h | 8 ++++---- source/duke3d/src/savegame.h | 4 ++-- source/rr/src/anim.h | 8 ++++---- source/rr/src/savegame.h | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/source/common/utility/files_decompress.cpp b/source/common/utility/files_decompress.cpp index c14079b63..c79d762e6 100644 --- a/source/common/utility/files_decompress.cpp +++ b/source/common/utility/files_decompress.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include "files.h" #include "templates.h" diff --git a/source/duke3d/src/anim.h b/source/duke3d/src/anim.h index 50f6b6bc2..9fb31fca8 100644 --- a/source/duke3d/src/anim.h +++ b/source/duke3d/src/anim.h @@ -30,12 +30,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_DUKE_NS -typedef struct { +struct animsound_t { uint16_t frame = 0; int16_t sound = 0; -} animsound_t; +}; -typedef struct +struct dukeanim_t { FString name; double frameaspect1 = 0.0, frameaspect2 = 0.0; @@ -43,7 +43,7 @@ typedef struct TArray Sounds; uint8_t framedelay = 0; uint8_t frameflags = 0; -} dukeanim_t; +}; extern dukeanim_t* g_animPtr; extern TArray g_Animations; diff --git a/source/duke3d/src/savegame.h b/source/duke3d/src/savegame.h index 535e6ab4a..ace93cefd 100644 --- a/source/duke3d/src/savegame.h +++ b/source/duke3d/src/savegame.h @@ -36,7 +36,7 @@ BEGIN_DUKE_NS #define SV_MINOR_VER 7 #pragma pack(push,1) -typedef struct +struct savehead_t { char headerstr[11]; uint8_t majorver, minorver, ptrsize; @@ -56,7 +56,7 @@ typedef struct // 286 bytes uint8_t getPtrSize() const { return ptrsize; } -} savehead_t; +}; #pragma pack(pop) extern int32_t g_fakeSaveID; diff --git a/source/rr/src/anim.h b/source/rr/src/anim.h index 0bde36c2f..e27b5ea52 100644 --- a/source/rr/src/anim.h +++ b/source/rr/src/anim.h @@ -25,12 +25,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_RR_NS -typedef struct { +struct animsound_t { uint16_t frame = 0; int16_t sound = 0; -} animsound_t; +}; -typedef struct +struct dukeanim_t { FString name; double frameaspect1 = 0, frameaspect2 = 0; @@ -38,7 +38,7 @@ typedef struct TArray Sounds; uint8_t framedelay = 0; uint8_t frameflags = 0; -} dukeanim_t; +}; extern dukeanim_t* g_animPtr; extern TArray g_Animations; diff --git a/source/rr/src/savegame.h b/source/rr/src/savegame.h index 2b5960f59..7ae9fb1ee 100644 --- a/source/rr/src/savegame.h +++ b/source/rr/src/savegame.h @@ -31,7 +31,7 @@ BEGIN_RR_NS #define SV_MINOR_VER 7 #pragma pack(push,1) -typedef struct +struct savehead_t { char headerstr[11]; uint8_t majorver, minorver, ptrsize; @@ -51,7 +51,7 @@ typedef struct // 286 bytes uint8_t getPtrSize() const { return ptrsize; } -} savehead_t; +}; #pragma pack(pop) int32_t sv_updatestate(int32_t frominit);