From 0d1a5e3894590c3ff8c9f083164c2c8d40209718 Mon Sep 17 00:00:00 2001 From: Helmut Buhler Date: Sun, 13 Jul 2025 17:03:09 +0200 Subject: [PATCH 1/2] Make game compile in VS2019 --- Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h index fe4601177a9..f257eae92e6 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h @@ -45,6 +45,14 @@ #include "simplevec.h" #include "chunkio.h" +// TheSuperHackers VS 2019 and earlier require a hack in order to compile this +#if defined(_MSC_VER) && _MSC_VER <= 1929 +#define TYPENAME_HACK1 typename +#define TYPENAME_HACK2 +#else +#define TYPENAME_HACK1 +#define TYPENAME_HACK2 typename +#endif // Forward declarations class ChunkSaveClass; @@ -163,7 +171,7 @@ class LERPAnimationChannelClass : public PrimitiveAnimationChannelClass using PrimitiveAnimationChannelClass::m_Data; using PrimitiveAnimationChannelClass::m_LastIndex; public: - using typename PrimitiveAnimationChannelClass::KeyClass; + using TYPENAME_HACK2 PrimitiveAnimationChannelClass::KeyClass; public: @@ -187,7 +195,7 @@ int PrimitiveAnimationChannelClass::Get_Key_Count (void) const // Set_Key_Value ///////////////////////////////////////////////////////// template -const PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const +TYPENAME_HACK1 const PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const { return m_Data[index]; } @@ -388,4 +396,7 @@ LERPAnimationChannelClass::Evaluate (float time) return value; } +#undef TYPENAME_HACK1 +#undef TYPENAME_HACK2 + #endif //__PRIM_ANIM_H From 32354e00a42104517ffb1f236ff8b3ac9de00c37 Mon Sep 17 00:00:00 2001 From: Helmut Buhler Date: Mon, 14 Jul 2025 20:06:14 +0200 Subject: [PATCH 2/2] Simplify typename hack --- Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h index f257eae92e6..b49e334202d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/prim_anim.h @@ -45,14 +45,6 @@ #include "simplevec.h" #include "chunkio.h" -// TheSuperHackers VS 2019 and earlier require a hack in order to compile this -#if defined(_MSC_VER) && _MSC_VER <= 1929 -#define TYPENAME_HACK1 typename -#define TYPENAME_HACK2 -#else -#define TYPENAME_HACK1 -#define TYPENAME_HACK2 typename -#endif // Forward declarations class ChunkSaveClass; @@ -171,7 +163,7 @@ class LERPAnimationChannelClass : public PrimitiveAnimationChannelClass using PrimitiveAnimationChannelClass::m_Data; using PrimitiveAnimationChannelClass::m_LastIndex; public: - using TYPENAME_HACK2 PrimitiveAnimationChannelClass::KeyClass; + using typename PrimitiveAnimationChannelClass::KeyClass; public: @@ -195,7 +187,7 @@ int PrimitiveAnimationChannelClass::Get_Key_Count (void) const // Set_Key_Value ///////////////////////////////////////////////////////// template -TYPENAME_HACK1 const PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const +const typename PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const { return m_Data[index]; } @@ -396,7 +388,4 @@ LERPAnimationChannelClass::Evaluate (float time) return value; } -#undef TYPENAME_HACK1 -#undef TYPENAME_HACK2 - #endif //__PRIM_ANIM_H