From 6b5f5163a07b7d32dc232ca342fd86e1c0e24b37 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 21:55:18 +0200 Subject: [PATCH 01/32] [ZH] Basic preprocessor fixes --- GeneralsMD/Code/Libraries/Include/Lib/BaseType.h | 12 ++++++------ .../Source/Compression/LZHCompress/NoxCompress.cpp | 4 ++-- .../Code/Libraries/Source/WWVegas/WWLib/always.h | 2 ++ .../Code/Libraries/Source/WWVegas/WWLib/chunkio.h | 2 +- .../Code/Libraries/Source/WWVegas/WWMath/wwmath.h | 2 +- .../Code/Libraries/Source/debug/test3/test3.cpp | 1 - 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h b/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h index a77c757e84..1cacc61ae8 100644 --- a/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h +++ b/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h @@ -97,12 +97,12 @@ //#define abs(x) (((x) < 0) ? -(x) : (x)) //#endif -#ifndef min -#define min(x,y) (((x)<(y)) ? (x) : (y)) +#ifndef MIN +#define MIN(x,y) (((x)<(y)) ? (x) : (y)) #endif -#ifndef max -#define max(x,y) (((x)>(y)) ? (x) : (y)) +#ifndef MAX +#define MAX(x,y) (((x)>(y)) ? (x) : (y)) #endif #ifndef TRUE @@ -278,8 +278,8 @@ struct RealRange // both ranges void combine( RealRange &other ) { - lo = min( lo, other.lo ); - hi = max( hi, other.hi ); + lo = MIN( lo, other.lo ); + hi = MAX( hi, other.hi ); } }; diff --git a/GeneralsMD/Code/Libraries/Source/Compression/LZHCompress/NoxCompress.cpp b/GeneralsMD/Code/Libraries/Source/Compression/LZHCompress/NoxCompress.cpp index 7d006c6841..cc478bb6d1 100644 --- a/GeneralsMD/Code/Libraries/Source/Compression/LZHCompress/NoxCompress.cpp +++ b/GeneralsMD/Code/Libraries/Source/Compression/LZHCompress/NoxCompress.cpp @@ -164,7 +164,7 @@ Bool CompressFile (char *infile, char *outfile) compressor = LZHLCreateCompressor(); for ( i = 0; i < rawSize; i += BLOCKSIZE ) { - blocklen = min((UnsignedInt)BLOCKSIZE, rawSize - i); + blocklen = MIN((UnsignedInt)BLOCKSIZE, rawSize - i); compressed = LZHLCompress(compressor, outBlock + compressedSize, inBlock + i, blocklen); compressedSize += compressed; } @@ -284,7 +284,7 @@ Bool CompressMemory (void *inBufferVoid, Int inSize, void *outBufferVoid, Int& compressor = LZHLCreateCompressor(); for ( i = 0; i < rawSize; i += BLOCKSIZE ) { - blocklen = min((UnsignedInt)BLOCKSIZE, rawSize - i); + blocklen = MIN((UnsignedInt)BLOCKSIZE, rawSize - i); compressed = LZHLCompress(compressor, outBuffer + compressedSize, inBuffer + i, blocklen); compressedSize += compressed; } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h index def9795963..4e392a9fb8 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h @@ -187,7 +187,9 @@ class W3DMPO ** I'm relpacing all occurances of 'min' and 'max with 'MIN' and 'MAX'. For code which ** is out of our domain (e.g. Max sdk) I'm declaring template functions for 'min' and 'max' */ +#ifndef NOMINMAX #define NOMINMAX +#endif #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/chunkio.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/chunkio.h index 029da1faf5..7d2d00adab 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/chunkio.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/chunkio.h @@ -377,4 +377,4 @@ class ChunkLoadClass -#endif // CHUNKIO_H \ No newline at end of file +#endif // CHUNKIO_H diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWMath/wwmath.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWMath/wwmath.h index 831afdeb6e..b5d5c53f8d 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWMath/wwmath.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWMath/wwmath.h @@ -64,7 +64,7 @@ // (DRM 05/07/01) Temporarily eliminated _fastcall // on non-Microsoft compatible compilers. Jani // should be replacing this soon. -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__GNUC__) #define __fastcall #endif // _MSC_VER diff --git a/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp b/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp index 4298a6d883..9460786002 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp @@ -26,7 +26,6 @@ // // Debug module - Test 3 (Checking FLAT I/O, logging) ////////////////////////////////////////////////////////////////////////////// -#ifdef NDEBUG #include "../debug.h" unsigned divByNull; From 176f1cebd6ce982262486c372059d05fce4a5327 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 22:03:26 +0200 Subject: [PATCH 02/32] [ZH] Replacements of _int64 with __int64 --- .../Code/GameEngine/Source/Common/PerfTimer.cpp | 12 ++++++------ .../Source/WWVegas/WWDebug/wwprofile.cpp | 2 +- .../Libraries/Source/WWVegas/WWDebug/wwprofile.h | 1 - .../Code/Libraries/Source/profile/profile.cpp | 16 ++++++++-------- .../Code/Libraries/Source/profile/profile.h | 4 ++-- .../Source/profile/profile_funclevel.cpp | 12 ++++++------ .../Libraries/Source/profile/profile_funclevel.h | 6 +++--- .../Source/profile/profile_highlevel.cpp | 2 +- .../Libraries/Source/profile/profile_highlevel.h | 2 +- 9 files changed, 28 insertions(+), 29 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/PerfTimer.cpp b/GeneralsMD/Code/GameEngine/Source/Common/PerfTimer.cpp index 0d4fcec12f..020e9c3ca4 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/PerfTimer.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/PerfTimer.cpp @@ -73,7 +73,7 @@ void InitPrecisionTimer() // measure clock cycles 3 times for 20 msec each // then take the 2 counts that are closest, average - _int64 n[ 3 ]; + __int64 n[ 3 ]; for( int k = 0; k < 3; k++ ) { // wait for end of current tick @@ -81,7 +81,7 @@ void InitPrecisionTimer() while( timeGetTime() < timeEnd ); //do nothing // get cycles - _int64 start, startQPC, endQPC; + __int64 start, startQPC, endQPC; QueryPerformanceCounter( (LARGE_INTEGER *)&startQPC ); ProfileGetTime( start ); timeEnd += 20; @@ -102,9 +102,9 @@ void InitPrecisionTimer() } // find two closest values - _int64 d01 = n[ 1 ] - n[ 0 ]; - _int64 d02 = n[ 2 ] - n[ 0 ]; - _int64 d12 = n[ 2 ] - n[ 1 ]; + __int64 d01 = n[ 1 ] - n[ 0 ]; + __int64 d02 = n[ 2 ] - n[ 0 ]; + __int64 d12 = n[ 2 ] - n[ 1 ]; if( d01 < 0 ) { @@ -119,7 +119,7 @@ void InitPrecisionTimer() d12 = -d12; } - _int64 avg; + __int64 avg; if( d01 < d02 ) { avg = d01 < d12 ? n[ 0 ] + n[ 1 ] : n[ 1 ] + n[ 2 ]; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp index 1eb6f39f3d..0007b6c6ab 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp @@ -97,7 +97,7 @@ WWINLINE double WWProfile_Get_Inv_Processor_Ticks_Per_Second(void) * HISTORY: * * 9/24/2000 gth : Created. * *=============================================================================================*/ -inline void WWProfile_Get_Ticks(_int64 * ticks) +inline void WWProfile_Get_Ticks(__int64 * ticks) { #ifdef _UNIX *ticks = TIMEGETTIME(); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.h index ee060a07e9..9b5755d699 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwprofile.h @@ -47,7 +47,6 @@ #ifdef _UNIX typedef signed long long __int64; -typedef signed long long _int64; #endif // enable profiling by default in debug mode. diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile.cpp b/GeneralsMD/Code/Libraries/Source/profile/profile.cpp index c1114ad591..8fb92170d3 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile.cpp +++ b/GeneralsMD/Code/Libraries/Source/profile/profile.cpp @@ -85,7 +85,7 @@ void ProfileFreeMemory(void *ptr) ////////////////////////////////////////////////////////////////////////////// -static _int64 GetClockCyclesFast(void) +static __int64 GetClockCyclesFast(void) { // this is where we're adding our internal result functions Profile::AddResultFunction(ProfileResultFileCSV::Create, @@ -99,7 +99,7 @@ static _int64 GetClockCyclesFast(void) // measure clock cycles 3 times for 20 msec each // then take the 2 counts that are closest, average - _int64 n[3]; + __int64 n[3]; for (int k=0;k<3;k++) { // wait for end of current tick @@ -107,7 +107,7 @@ static _int64 GetClockCyclesFast(void) while (timeGetTime()funcLine; } -unsigned _int64 ProfileFuncLevel::Id::GetCalls(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetCalls(unsigned frame) const { if (!m_funcPtr) return 0; @@ -632,7 +632,7 @@ unsigned _int64 ProfileFuncLevel::Id::GetCalls(unsigned frame) const } } -unsigned _int64 ProfileFuncLevel::Id::GetTime(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetTime(unsigned frame) const { if (!m_funcPtr) return 0; @@ -649,7 +649,7 @@ unsigned _int64 ProfileFuncLevel::Id::GetTime(unsigned frame) const } } -unsigned _int64 ProfileFuncLevel::Id::GetFunctionTime(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetFunctionTime(unsigned frame) const { if (!m_funcPtr) return 0; @@ -753,17 +753,17 @@ unsigned ProfileFuncLevel::Id::GetLine(void) const return 0; } -unsigned _int64 ProfileFuncLevel::Id::GetCalls(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetCalls(unsigned frame) const { return 0; } -unsigned _int64 ProfileFuncLevel::Id::GetTime(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetTime(unsigned frame) const { return 0; } -unsigned _int64 ProfileFuncLevel::Id::GetFunctionTime(unsigned frame) const +unsigned __int64 ProfileFuncLevel::Id::GetFunctionTime(unsigned frame) const { return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h b/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h index 252f65a80a..64ee9db4a2 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h +++ b/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h @@ -127,7 +127,7 @@ class ProfileFuncLevel \param frame number of recorded frame, or Total \return number of calls */ - unsigned _int64 GetCalls(unsigned frame) const; + unsigned __int64 GetCalls(unsigned frame) const; /** \brief Determine time spend in this function and its children. @@ -135,7 +135,7 @@ class ProfileFuncLevel \param frame number of recorded frame, or Total \return time spend (in CPU ticks) */ - unsigned _int64 GetTime(unsigned frame) const; + unsigned __int64 GetTime(unsigned frame) const; /** \brief Determine time spend in this function only (exclude @@ -144,7 +144,7 @@ class ProfileFuncLevel \param frame number of recorded frame, or Total \return time spend in this function alone (in CPU ticks) */ - unsigned _int64 GetFunctionTime(unsigned frame) const; + unsigned __int64 GetFunctionTime(unsigned frame) const; /** \brief Determine the list of caller Ids. diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.cpp b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.cpp index 5ed7797759..e6d96c2d34 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.cpp +++ b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.cpp @@ -101,7 +101,7 @@ ProfileHighLevel::Block::Block(const char *name) ProfileHighLevel::Block::~Block() { - _int64 end; + __int64 end; ProfileGetTime(end); end-=m_start; diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h index 26e6da1c30..4697ef5552 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h +++ b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h @@ -173,7 +173,7 @@ class ProfileHighLevel Id m_idTime; /// start time - _int64 m_start; + __int64 m_start; }; /** From 5ec2ac74a3e0fe51ed58ad1985aab52a480cd52c Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sun, 30 Mar 2025 18:58:57 +0200 Subject: [PATCH 03/32] [ZH] Introdution of CPP_11 macro for code requiring c++11 or higher --- Dependencies/Utility/Utility/CppMacros.h | 6 ++++++ GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h | 2 ++ .../GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h | 2 +- GeneralsMD/Code/GameEngineDevice/CMakeLists.txt | 1 + GeneralsMD/Code/Libraries/Include/Lib/BaseType.h | 1 + GeneralsMD/Code/Libraries/Source/Compression/CMakeLists.txt | 1 + .../Code/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt | 1 + .../Code/Libraries/Source/WWVegas/WWLib/CMakeLists.txt | 1 + GeneralsMD/Code/Libraries/Source/debug/CMakeLists.txt | 1 + GeneralsMD/Code/Main/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/Compress/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/PATCHGET/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt | 1 + 16 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Dependencies/Utility/Utility/CppMacros.h b/Dependencies/Utility/Utility/CppMacros.h index 680aeda5d6..7333477066 100644 --- a/Dependencies/Utility/Utility/CppMacros.h +++ b/Dependencies/Utility/Utility/CppMacros.h @@ -8,3 +8,9 @@ #else #define NOEXCEPT_17 #endif + +#if __cplusplus >= 201103L + #define CPP_11(code) code +#else + #define CPP_11(code) +#endif diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h index 2f8f15e68f..5294835f62 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h @@ -30,6 +30,8 @@ #ifndef _AUDIOAFFECT_H_ #define _AUDIOAFFECT_H_ +#include + // if it is set by the options panel, use the system setting parameter. Otherwise, this will be // appended to whatever the current system volume is. enum AudioAffect diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h index e159976017..5e5bff6e5c 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h @@ -51,7 +51,7 @@ #include #include "EABrowserDispatch/BrowserDispatch.h" #include "FEBDispatch.h" -#include +#include class GameWindow; diff --git a/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt b/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt index 646c2abf2c..0d369515db 100644 --- a/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt +++ b/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt @@ -205,6 +205,7 @@ target_include_directories(z_gameenginedevice PUBLIC ) target_link_libraries(z_gameenginedevice PRIVATE + gz_utility zi_libraries_include zi_libraries_source zi_main diff --git a/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h b/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h index 1cacc61ae8..5ffa08ccdd 100644 --- a/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h +++ b/GeneralsMD/Code/Libraries/Include/Lib/BaseType.h @@ -34,6 +34,7 @@ #include #include +#include /* ** Turn off some unneeded warnings. diff --git a/GeneralsMD/Code/Libraries/Source/Compression/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/Compression/CMakeLists.txt index cd14c5a5e8..dff507c6b1 100644 --- a/GeneralsMD/Code/Libraries/Source/Compression/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/Compression/CMakeLists.txt @@ -30,6 +30,7 @@ target_include_directories(z_compression INTERFACE target_link_libraries(z_compression PRIVATE gz_config + gz_utility zi_libraries_include ) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt index 1ffd2e269a..7884f6177b 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/CMakeLists.txt @@ -16,6 +16,7 @@ set_target_properties(z_wwdebug PROPERTIES OUTPUT_NAME wwdebug) target_sources(z_wwdebug PRIVATE ${WWDEBUG_SRC}) target_link_libraries(z_wwdebug PRIVATE + gz_utility z_wwcommon zi_libraries_include ) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/CMakeLists.txt index 31695d3014..bec079086c 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/CMakeLists.txt @@ -203,6 +203,7 @@ set_target_properties(z_wwlib PROPERTIES OUTPUT_NAME wwlib) target_sources(z_wwlib PRIVATE ${WWLIB_SRC}) target_link_libraries(z_wwlib PRIVATE + gz_utility z_wwcommon zi_libraries_include ) diff --git a/GeneralsMD/Code/Libraries/Source/debug/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/debug/CMakeLists.txt index 7d2bb88c4f..2d87b14c17 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/debug/CMakeLists.txt @@ -34,5 +34,6 @@ target_include_directories(z_debug INTERFACE target_link_libraries(z_debug PRIVATE gz_config + gz_utility zi_libraries_include ) diff --git a/GeneralsMD/Code/Main/CMakeLists.txt b/GeneralsMD/Code/Main/CMakeLists.txt index 4c4f7638bc..5402aafd90 100644 --- a/GeneralsMD/Code/Main/CMakeLists.txt +++ b/GeneralsMD/Code/Main/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(z_generals PRIVATE safedisc vfw32 winmm + gz_utility z_debug z_gameengine z_gameenginedevice diff --git a/GeneralsMD/Code/Tools/Compress/CMakeLists.txt b/GeneralsMD/Code/Tools/Compress/CMakeLists.txt index dc867ecb88..dc244f4375 100644 --- a/GeneralsMD/Code/Tools/Compress/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/Compress/CMakeLists.txt @@ -11,6 +11,7 @@ target_sources(z_compress PRIVATE ${COMRPESS_SRC}) target_link_libraries(z_compress PRIVATE gz_config + gz_utility z_compression zi_libraries_include zi_libraries_source diff --git a/GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt b/GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt index 4d403462e8..c24843a2b3 100644 --- a/GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/GUIEdit/CMakeLists.txt @@ -54,6 +54,7 @@ target_link_libraries(z_guiedit PRIVATE stlport vfw32 winmm + gz_utility z_debug z_gameengine z_gameenginedevice diff --git a/GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt b/GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt index c0b5f56f0a..57caae2442 100644 --- a/GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/ImagePacker/CMakeLists.txt @@ -33,6 +33,7 @@ target_link_libraries(z_imagepacker PRIVATE imm32 vfw32 winmm + gz_utility z_debug z_gameengine z_gameenginedevice diff --git a/GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt b/GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt index 9f606aea66..810b602253 100644 --- a/GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/MapCacheBuilder/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(z_mapcachebuilder PRIVATE imm32 vfw32 winmm + gz_utility z_debug z_gameengine z_gameenginedevice diff --git a/GeneralsMD/Code/Tools/PATCHGET/CMakeLists.txt b/GeneralsMD/Code/Tools/PATCHGET/CMakeLists.txt index 9207a7058b..b701cd5977 100644 --- a/GeneralsMD/Code/Tools/PATCHGET/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/PATCHGET/CMakeLists.txt @@ -27,6 +27,7 @@ macro(setup_patchgrabber appname) imm32 vfw32 winmm + gz_utility z_debug z_gameengine z_gameenginedevice diff --git a/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt b/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt index 78b064ab92..e783807181 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt @@ -215,6 +215,7 @@ target_link_libraries(z_worldbuilder PRIVATE imm32 vfw32 winmm + gz_utility z_browserdispatch z_debug z_gameengine From 43c49b2c289cc21ca592ee8b008316ab6ee43e96 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 22:35:36 +0200 Subject: [PATCH 04/32] [ZH] Forward enum declacrations portability fix --- .../GameEngine/Include/Common/AcademyStats.h | 2 +- .../GameEngine/Include/Common/ActionManager.h | 10 +++---- .../GameEngine/Include/Common/AudioAffect.h | 2 +- .../Include/Common/AudioEventInfo.h | 8 ++--- .../GameEngine/Include/Common/AudioEventRTS.h | 6 ++-- .../Include/Common/AudioHandleSpecialValues.h | 2 +- .../GameEngine/Include/Common/AudioRequest.h | 2 +- .../Include/Common/BuildAssistant.h | 4 +-- .../GameEngine/Include/Common/DisabledTypes.h | 2 +- .../GameEngine/Include/Common/DrawModule.h | 4 +-- .../Include/Common/DynamicAudioEventInfo.h | 2 +- .../Code/GameEngine/Include/Common/Errors.h | 2 +- .../GameEngine/Include/Common/GameAudio.h | 4 +-- .../GameEngine/Include/Common/GameCommon.h | 20 ++++++------- .../Code/GameEngine/Include/Common/GameLOD.h | 10 +++---- .../GameEngine/Include/Common/GameState.h | 8 ++--- .../Code/GameEngine/Include/Common/GameType.h | 16 +++++----- .../Code/GameEngine/Include/Common/Geometry.h | 4 +-- .../GameEngine/Include/Common/GlobalData.h | 6 ++-- .../Code/GameEngine/Include/Common/INI.h | 4 +-- .../Code/GameEngine/Include/Common/KindOf.h | 2 +- .../GameEngine/Include/Common/MapObject.h | 2 +- .../GameEngine/Include/Common/MessageStream.h | 8 ++--- .../GameEngine/Include/Common/ModelState.h | 2 +- .../Code/GameEngine/Include/Common/Module.h | 8 ++--- .../Include/Common/NameKeyGenerator.h | 2 +- .../GameEngine/Include/Common/OSDisplay.h | 4 +-- .../Include/Common/ObjectStatusTypes.h | 2 +- .../Include/Common/PartitionSolver.h | 2 +- .../Code/GameEngine/Include/Common/Player.h | 8 ++--- .../GameEngine/Include/Common/PlayerList.h | 2 +- .../Code/GameEngine/Include/Common/Radar.h | 4 +-- .../Code/GameEngine/Include/Common/Recorder.h | 2 +- .../GameEngine/Include/Common/STLTypedefs.h | 6 ++-- .../Code/GameEngine/Include/Common/Science.h | 2 +- .../GameEngine/Include/Common/SpecialPower.h | 4 +-- .../Include/Common/SpecialPowerType.h | 2 +- .../GameEngine/Include/Common/StateMachine.h | 4 +-- .../Code/GameEngine/Include/Common/Team.h | 2 +- .../GameEngine/Include/Common/ThingSort.h | 2 +- .../GameEngine/Include/Common/ThingTemplate.h | 16 +++++----- .../Code/GameEngine/Include/Common/Upgrade.h | 8 ++--- .../Code/GameEngine/Include/Common/Xfer.h | 14 ++++----- .../GameEngine/Include/GameClient/Anim2D.h | 4 +-- .../Include/GameClient/AnimateWindowManager.h | 2 +- .../Include/GameClient/CommandXlat.h | 6 ++-- .../Include/GameClient/ControlBar.h | 30 +++++++++---------- .../Include/GameClient/ControlBarScheme.h | 2 +- .../Include/GameClient/DisconnectMenu.h | 2 +- .../GameEngine/Include/GameClient/Display.h | 2 +- .../GameEngine/Include/GameClient/Drawable.h | 12 ++++---- .../GameClient/EstablishConnectionsMenu.h | 2 +- .../Code/GameEngine/Include/GameClient/Eva.h | 2 +- .../Include/GameClient/ExtendedMessageBox.h | 2 +- .../Include/GameClient/GUICallbacks.h | 2 +- .../GameEngine/Include/GameClient/Gadget.h | 2 +- .../Include/GameClient/GameWindow.h | 6 ++-- .../GameEngine/Include/GameClient/InGameUI.h | 12 ++++---- .../GameEngine/Include/GameClient/KeyDefs.h | 2 +- .../GameEngine/Include/GameClient/MetaEvent.h | 10 +++---- .../GameEngine/Include/GameClient/Mouse.h | 2 +- .../Include/GameClient/ParticleSys.h | 4 +-- .../Include/GameClient/RadiusDecal.h | 2 +- .../GameEngine/Include/GameClient/Shadow.h | 2 +- .../GameEngine/Include/GameClient/Shell.h | 2 +- .../Include/GameClient/TerrainRoads.h | 2 +- .../Include/GameClient/TerrainVisual.h | 4 +-- .../Code/GameEngine/Include/GameClient/View.h | 4 +-- .../Include/GameClient/WindowVideoManager.h | 4 +-- .../Code/GameEngine/Include/GameLogic/AI.h | 18 +++++------ .../Include/GameLogic/AIStateMachine.h | 4 +-- .../GameEngine/Include/GameLogic/ArmorSet.h | 2 +- .../Include/GameLogic/CrateSystem.h | 2 +- .../GameEngine/Include/GameLogic/Damage.h | 4 +-- .../GameEngine/Include/GameLogic/GameLogic.h | 2 +- .../Include/GameLogic/GhostObject.h | 4 +-- .../GameEngine/Include/GameLogic/Locomotor.h | 10 +++---- .../Include/GameLogic/LocomotorSet.h | 2 +- .../Include/GameLogic/Module/AIUpdate.h | 18 +++++------ .../Module/AnimationSteeringUpdate.h | 2 +- .../Module/AssaultTransportAIUpdate.h | 2 +- .../GameLogic/Module/BaikonurLaunchPower.h | 2 +- .../GameLogic/Module/BattlePlanUpdate.h | 8 ++--- .../Include/GameLogic/Module/BehaviorModule.h | 2 +- .../Include/GameLogic/Module/BodyModule.h | 4 +-- .../Include/GameLogic/Module/BoneFXDamage.h | 2 +- .../Include/GameLogic/Module/BridgeBehavior.h | 2 +- .../GameLogic/Module/BridgeScaffoldBehavior.h | 2 +- .../GameLogic/Module/CashHackSpecialPower.h | 2 +- .../GameLogic/Module/ChinookAIUpdate.h | 2 +- .../Include/GameLogic/Module/ContainModule.h | 6 ++-- .../Include/GameLogic/Module/CrateCollide.h | 4 +-- .../Include/GameLogic/Module/CrushDie.h | 2 +- .../Include/GameLogic/Module/DamageModule.h | 2 +- .../GameLogic/Module/DefectorSpecialPower.h | 2 +- .../GameLogic/Module/DeployStyleAIUpdate.h | 2 +- .../Include/GameLogic/Module/DozerAIUpdate.h | 6 ++-- .../GameLogic/Module/FireWeaponPower.h | 2 +- .../GameLogic/Module/FlammableUpdate.h | 2 +- .../Include/GameLogic/Module/HordeUpdate.h | 2 +- .../Include/GameLogic/Module/LaserUpdate.h | 2 +- .../GameLogic/Module/MaxHealthUpgrade.h | 2 +- .../GameLogic/Module/MissileAIUpdate.h | 2 +- .../GameLogic/Module/MobMemberSlavedUpdate.h | 4 +-- .../GameLogic/Module/ModelConditionUpgrade.h | 2 +- .../Module/NeutronMissileSlowDeathUpdate.h | 2 +- .../GameLogic/Module/NeutronMissileUpdate.h | 2 +- .../GameLogic/Module/OCLSpecialPower.h | 2 +- .../GameLogic/Module/POWTruckAIUpdate.h | 2 +- .../Module/ParticleUplinkCannonUpdate.h | 8 ++--- .../Include/GameLogic/Module/PhysicsUpdate.h | 4 +-- .../GameLogic/Module/ProductionUpdate.h | 6 ++-- .../GameLogic/Module/RiderChangeContain.h | 6 ++-- .../Include/GameLogic/Module/SlavedUpdate.h | 4 +-- .../GameLogic/Module/SlowDeathBehavior.h | 2 +- .../Include/GameLogic/Module/SpawnBehavior.h | 2 +- .../GameLogic/Module/SpecialAbilityUpdate.h | 2 +- .../Module/SpectreGunshipDeploymentUpdate.h | 8 ++--- .../GameLogic/Module/SpectreGunshipUpdate.h | 4 +-- .../Include/GameLogic/Module/StealthUpdate.h | 4 +-- .../Module/StructureCollapseUpdate.h | 2 +- .../GameLogic/Module/StructureToppleUpdate.h | 2 +- .../GameLogic/Module/TempWeaponBonusHelper.h | 2 +- .../Include/GameLogic/Module/UpdateModule.h | 8 ++--- .../GameLogic/Module/WeaponBonusUpdate.h | 2 +- .../GameEngine/Include/GameLogic/Object.h | 26 ++++++++-------- .../GameEngine/Include/GameLogic/ObjectIter.h | 2 +- .../GameLogic/ObjectScriptStatusBits.h | 2 +- .../Include/GameLogic/PartitionManager.h | 8 ++--- .../Include/GameLogic/ScriptActions.h | 2 +- .../Include/GameLogic/TerrainLogic.h | 2 +- .../GameEngine/Include/GameLogic/TurretAI.h | 4 +-- .../Include/GameLogic/VictoryConditions.h | 2 +- .../GameEngine/Include/GameLogic/Weapon.h | 14 ++++----- .../GameEngine/Include/GameLogic/WeaponSet.h | 12 ++++---- .../Include/GameLogic/WeaponSetType.h | 2 +- .../Include/GameLogic/WeaponStatus.h | 2 +- .../Include/GameNetwork/DisconnectManager.h | 2 +- .../Include/GameNetwork/FirewallHelper.h | 2 +- .../Include/GameNetwork/FrameData.h | 2 +- .../GameEngine/Include/GameNetwork/GameInfo.h | 2 +- .../Include/GameNetwork/GameSpy/LobbyUtils.h | 2 +- .../Include/GameNetwork/GameSpy/PeerDefs.h | 6 ++-- .../Include/GameNetwork/GameSpy/PeerThread.h | 6 ++-- .../GameSpy/PersistentStorageDefs.h | 2 +- .../Include/GameNetwork/GameSpyOverlay.h | 2 +- .../Include/GameNetwork/LANAPICallbacks.h | 2 +- .../Code/GameEngine/Include/GameNetwork/NAT.h | 4 +-- .../Include/GameNetwork/NetworkDefs.h | 10 +++---- .../Code/GameEngine/Include/GameNetwork/udp.h | 2 +- .../GUI/GUICallbacks/Menus/OptionsMenu.cpp | 4 +-- .../GUICallbacks/Menus/PopupLadderSelect.cpp | 2 +- .../Behavior/PropagandaTowerBehavior.cpp | 2 +- .../GameLogic/Object/ObjectCreationList.cpp | 2 +- .../Update/AIUpdate/ChinookAIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/DozerAIUpdate.cpp | 2 +- .../Object/Update/AIUpdate/JetAIUpdate.cpp | 4 +-- .../MilesAudioDevice/MilesAudioManager.h | 6 ++-- .../GameClient/Module/W3DModelDraw.h | 2 +- .../GameClient/Module/W3DScienceModelDraw.h | 2 +- .../W3DDevice/GameClient/W3DCustomScene.h | 2 +- .../W3DDevice/GameClient/W3DRoadBuffer.h | 2 +- .../Include/W3DDevice/GameClient/W3DScene.h | 2 +- .../W3DDevice/GameClient/W3DShaderManager.h | 12 ++++---- .../W3DDevice/GameClient/W3DTreeBuffer.h | 2 +- .../W3DDevice/GameClient/W3DWaterTracks.h | 2 +- .../GameClient/Drawable/Draw/W3DModelDraw.cpp | 8 ++--- .../GameClient/Shadow/W3DProjectedShadow.cpp | 2 +- .../W3DDevice/GameClient/W3DShaderManager.cpp | 2 +- .../GameClient/Water/W3DWaterTracks.cpp | 2 +- 170 files changed, 375 insertions(+), 375 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AcademyStats.h b/GeneralsMD/Code/GameEngine/Include/Common/AcademyStats.h index ca9eb920e6..12eba68c2b 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AcademyStats.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AcademyStats.h @@ -68,7 +68,7 @@ struct AcademyAdviceInfo UnsignedInt numTips; }; -enum AcademyClassificationType +enum AcademyClassificationType CPP_11(: int) { //Don't forget to update the strings too! ACT_NONE, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/ActionManager.h b/GeneralsMD/Code/GameEngine/Include/Common/ActionManager.h index c33a17c141..7c93886a4c 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/ActionManager.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/ActionManager.h @@ -44,12 +44,12 @@ class Object; class Player; class SpecialPowerTemplate; -enum SpecialPowerType; -enum WeaponSlotType; -enum CommandSourceType; -enum CanAttackResult; +enum SpecialPowerType CPP_11(: int); +enum WeaponSlotType CPP_11(: int); +enum CommandSourceType CPP_11(: int); +enum CanAttackResult CPP_11(: int); -enum CanEnterType +enum CanEnterType CPP_11(: int) { CHECK_CAPACITY, DONT_CHECK_CAPACITY, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h index 5294835f62..9f1225ac06 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioAffect.h @@ -34,7 +34,7 @@ // if it is set by the options panel, use the system setting parameter. Otherwise, this will be // appended to whatever the current system volume is. -enum AudioAffect +enum AudioAffect CPP_11(: int) { AudioAffect_Music = 0x01, AudioAffect_Sound = 0x02, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioEventInfo.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioEventInfo.h index b714bf8e92..940c707d0c 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioEventInfo.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioEventInfo.h @@ -41,7 +41,7 @@ struct FieldParse; // USEFUL DECLARATIONS //////////////////////////////////////////////////////////////////////////// -enum AudioType +enum AudioType CPP_11(: int) { AT_Music, AT_Streaming, @@ -49,7 +49,7 @@ enum AudioType }; extern const char *theAudioPriorityNames[]; -enum AudioPriority +enum AudioPriority CPP_11(: int) { AP_LOWEST, AP_LOW, @@ -59,7 +59,7 @@ enum AudioPriority }; extern const char *theSoundTypeNames[]; -enum SoundType +enum SoundType CPP_11(: int) { ST_UI = 0x0001, ST_WORLD = 0x0002, @@ -73,7 +73,7 @@ enum SoundType }; extern const char *theAudioControlNames[]; -enum AudioControl +enum AudioControl CPP_11(: int) { AC_LOOP = 0x0001, AC_RANDOM = 0x0002, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioEventRTS.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioEventRTS.h index 468de7862a..9640b8e00b 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioEventRTS.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioEventRTS.h @@ -38,7 +38,7 @@ // forward declarations /////////////////////////////////////////////////////////////////////////// struct AudioEventInfo; -enum OwnerType +enum OwnerType CPP_11(: int) { OT_Positional, OT_Drawable, @@ -47,7 +47,7 @@ enum OwnerType OT_INVALID }; -enum PortionToPlay +enum PortionToPlay CPP_11(: int) { PP_Attack, PP_Sound, @@ -55,7 +55,7 @@ enum PortionToPlay PP_Done }; -enum AudioPriority; +enum AudioPriority CPP_11(: int); // This is called AudioEventRTS because AudioEvent is a typedef in ww3d // You might want this to be memory pooled (I personally do), but it can't diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioHandleSpecialValues.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioHandleSpecialValues.h index 2718a99ca8..92e27ac4e9 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioHandleSpecialValues.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioHandleSpecialValues.h @@ -31,7 +31,7 @@ #ifndef _AUDIOHANDLESPECIALVALUES_H_ #define _AUDIOHANDLESPECIALVALUES_H_ -enum AudioHandleSpecialValues +enum AudioHandleSpecialValues CPP_11(: int) { AHSV_Error = 0x00, AHSV_NoSound, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/AudioRequest.h b/GeneralsMD/Code/GameEngine/Include/Common/AudioRequest.h index 730a49542a..e85866e1d2 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/AudioRequest.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/AudioRequest.h @@ -36,7 +36,7 @@ class AudioEventRTS; -enum RequestType +enum RequestType CPP_11(: int) { AR_Play, AR_Pause, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/BuildAssistant.h b/GeneralsMD/Code/GameEngine/Include/Common/BuildAssistant.h index 22c5eadc76..b83924d01e 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/BuildAssistant.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/BuildAssistant.h @@ -72,7 +72,7 @@ typedef ObjectSellList::iterator ObjectSellListIterator; //------------------------------------------------------------------------------------------------- /** Return codes for queries about being able to build */ //------------------------------------------------------------------------------------------------- -enum CanMakeType +enum CanMakeType CPP_11(: int) { CANMAKE_OK, CANMAKE_NO_PREREQ, @@ -86,7 +86,7 @@ enum CanMakeType //------------------------------------------------------------------------------------------------- /** Return codes for queries about legal build locations */ //------------------------------------------------------------------------------------------------- -enum LegalBuildCode +enum LegalBuildCode CPP_11(: int) { LBC_OK = 0, LBC_RESTRICTED_TERRAIN, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/DisabledTypes.h b/GeneralsMD/Code/GameEngine/Include/Common/DisabledTypes.h index a3f38a7b67..2366a4b428 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/DisabledTypes.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/DisabledTypes.h @@ -41,7 +41,7 @@ /** Kind of flags for determining groups of things that belong together * NOTE: You *MUST* keep this in the same order as the DisabledNames[] below */ //------------------------------------------------------------------------------------------------- -enum DisabledType +enum DisabledType CPP_11(: int) { DISABLED_DEFAULT, //Typical disable -- like systems, things that don't need to run. DISABLED_HACKED, //This unit has been hacked diff --git a/GeneralsMD/Code/GameEngine/Include/Common/DrawModule.h b/GeneralsMD/Code/GameEngine/Include/Common/DrawModule.h index 480edf3172..40c97c54f4 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/DrawModule.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/DrawModule.h @@ -55,8 +55,8 @@ class TracerDrawInterface; class RopeDrawInterface; class LaserDrawInterface; class FXList; -enum TerrainDecalType; -enum ShadowType; +enum TerrainDecalType CPP_11(: int); +enum ShadowType CPP_11(: int); //class ModelConditionFlags; diff --git a/GeneralsMD/Code/GameEngine/Include/Common/DynamicAudioEventInfo.h b/GeneralsMD/Code/GameEngine/Include/Common/DynamicAudioEventInfo.h index a3f5461f99..d60466430e 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/DynamicAudioEventInfo.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/DynamicAudioEventInfo.h @@ -87,7 +87,7 @@ class DynamicAudioEventInfo : public AudioEventInfo private: // List of fields we can override - enum OverriddenFields + enum OverriddenFields CPP_11(: int) { OVERRIDE_NAME = 0, OVERRIDE_LOOP_FLAG, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Errors.h b/GeneralsMD/Code/GameEngine/Include/Common/Errors.h index f146b350a6..90b38e766c 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Errors.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Errors.h @@ -54,7 +54,7 @@ to add to this list as necessary; however, there should generally be very few codes needed. */ -enum ErrorCode +enum ErrorCode CPP_11(: unsigned) { ERROR_BASE = 0xdead0001, // a nice, distinctive value diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameAudio.h b/GeneralsMD/Code/GameEngine/Include/Common/GameAudio.h index c4639758a5..92b1f5cba7 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameAudio.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameAudio.h @@ -61,8 +61,8 @@ class Object; class SoundManager; -enum AudioAffect; -enum AudioType; +enum AudioAffect CPP_11(: int); +enum AudioType CPP_11(: int); struct AudioEventInfo; struct AudioRequest; diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameCommon.h b/GeneralsMD/Code/GameEngine/Include/Common/GameCommon.h index 63f89c5931..ed60ae44a4 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameCommon.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameCommon.h @@ -138,7 +138,7 @@ enum }; //------------------------------------------------------------------------------------------------- -enum GameDifficulty +enum GameDifficulty CPP_11(: int) { DIFFICULTY_EASY, DIFFICULTY_NORMAL, @@ -148,7 +148,7 @@ enum GameDifficulty }; //------------------------------------------------------------------------------------------------- -enum PlayerType +enum PlayerType CPP_11(: int) { PLAYER_HUMAN, ///< player is human-controlled PLAYER_COMPUTER, ///< player is computer-controlled @@ -158,7 +158,7 @@ enum PlayerType //------------------------------------------------------------------------------------------------- /// A PartitionCell can be one of three states for Shroud -enum CellShroudStatus +enum CellShroudStatus CPP_11(: int) { CELLSHROUD_CLEAR, CELLSHROUD_FOGGED, @@ -169,7 +169,7 @@ enum CellShroudStatus //------------------------------------------------------------------------------------------------- /// Since an object can take up more than a single PartitionCell, this is a status that applies to the whole Object -enum ObjectShroudStatus +enum ObjectShroudStatus CPP_11(: int) { OBJECTSHROUD_INVALID, ///< indeterminate state, will recompute OBJECTSHROUD_CLEAR, ///< object is not shrouded at all (ie, completely visible) @@ -182,7 +182,7 @@ enum ObjectShroudStatus }; //------------------------------------------------------------------------------------------------- -enum GuardMode +enum GuardMode CPP_11(: int) { GUARDMODE_NORMAL, GUARDMODE_GUARD_WITHOUT_PURSUIT, // no pursuit out of guard area @@ -203,7 +203,7 @@ enum /// Veterancy level define needed by several files that don't need the full Experience code. // NOTE NOTE NOTE: Keep TheVeterencyNames in sync with these. -enum VeterancyLevel +enum VeterancyLevel CPP_11(: int) { LEVEL_REGULAR = 0, LEVEL_VETERAN, @@ -222,7 +222,7 @@ extern const char *TheVeterancyNames[]; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum CommandSourceType +enum CommandSourceType CPP_11(: int) { CMD_FROM_PLAYER = 0, @@ -234,7 +234,7 @@ enum CommandSourceType }; ///< the source of a command //------------------------------------------------------------------------------------------------- -enum AbleToAttackType +enum AbleToAttackType CPP_11(: int) { _ATTACK_FORCED = 0x01, _ATTACK_CONTINUED = 0x02, @@ -472,7 +472,7 @@ class DLINK_ITERATOR // ------------------------------------------------------------------------ -enum WhichTurretType +enum WhichTurretType CPP_11(: int) { TURRET_INVALID = -1, @@ -495,7 +495,7 @@ inline Real stdAngleDiff(Real a1, Real a2) // ------------------------------------------------------------------------ // NOTE NOTE NOTE: Keep TheRelationShipNames in sync with this enum -enum Relationship +enum Relationship CPP_11(: int) { ENEMIES = 0, NEUTRAL, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h b/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h index b7fb8a7f83..dea946a94c 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameLOD.h @@ -36,13 +36,13 @@ #ifndef _GAME_LOD_H_ #define _GAME_LOD_H_ -enum ParticlePriorityType; +enum ParticlePriorityType CPP_11(: int); #define MAX_LOD_PRESETS_PER_LEVEL 32 //number of hardware configs preset for each low,medium,high #define MAX_BENCH_PROFILES 16 //Make sure this enum stays in sync with GameLODNames[] -enum StaticGameLODLevel +enum StaticGameLODLevel CPP_11(: int) { STATIC_GAME_LOD_UNKNOWN=-1, STATIC_GAME_LOD_LOW, @@ -52,7 +52,7 @@ enum StaticGameLODLevel STATIC_GAME_LOD_COUNT }; -enum DynamicGameLODLevel +enum DynamicGameLODLevel CPP_11(: int) { DYNAMIC_GAME_LOD_UNKNOWN=-1, DYNAMIC_GAME_LOD_LOW, @@ -63,7 +63,7 @@ enum DynamicGameLODLevel }; //Make sure this stays in sync with CPUNames[] in gamelod.cpp -enum CpuType +enum CpuType CPP_11(: int) { XX, //unknown type P3, @@ -72,7 +72,7 @@ enum CpuType }; //Keep this in sync with VideoNames in Gamelod.cpp -enum ChipsetType +enum ChipsetType CPP_11(: int) { DC_UNKNOWN, DC_VOODOO2, DC_VOODOO3, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameState.h b/GeneralsMD/Code/GameEngine/Include/Common/GameState.h index 9271cd5e2f..e9d70713c6 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameState.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameState.h @@ -51,7 +51,7 @@ typedef void (*IterateSaveFileCallback)( AsciiString filename, void *userData ); * save/load menu initialization you can make that menu allow loading only, or allow * both saving and loading from the same menu */ // ------------------------------------------------------------------------------------------------ -enum SaveLoadLayoutType +enum SaveLoadLayoutType CPP_11(: int) { SLLT_INVALID = 0, SLLT_SAVE_AND_LOAD, @@ -82,7 +82,7 @@ struct SaveDate // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum SaveFileType +enum SaveFileType CPP_11(: int) { SAVE_FILE_TYPE_NORMAL, ///< a regular save game at any arbitrary point in the game SAVE_FILE_TYPE_MISSION, ///< a save game in between missions (a mission save) @@ -126,7 +126,7 @@ struct AvailableGameInfo // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum SaveCode +enum SaveCode CPP_11(: int) { SC_INVALID = -1, SC_OK, @@ -139,7 +139,7 @@ enum SaveCode SC_ERROR, }; -enum SnapshotType { +enum SnapshotType CPP_11(: int) { SNAPSHOT_SAVELOAD, SNAPSHOT_DEEPCRC_LOGICONLY, SNAPSHOT_DEEPCRC, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GameType.h b/GeneralsMD/Code/GameEngine/Include/Common/GameType.h index 7b95bd374a..90b46f1341 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GameType.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GameType.h @@ -38,21 +38,21 @@ #define DEFAULT_WORLD_HEIGHT 64 /// A unique, generic "identifier" used to access Objects. -enum ObjectID +enum ObjectID CPP_11(: int) { INVALID_ID = 0, FORCE_OBJECTID_TO_LONG_SIZE = 0x7ffffff }; /// A unique, generic "identifier" used to access Drawables. -enum DrawableID +enum DrawableID CPP_11(: int) { INVALID_DRAWABLE_ID = 0, FORCE_DRAWABLEID_TO_LONG_SIZE = 0x7ffffff }; /// A unique, generic "identifier" used to identify player specified formations. -enum FormationID +enum FormationID CPP_11(: int) { NO_FORMATION_ID = 0, // Unit is not a member of any formation FORCE_FORMATIONID_TO_LONG_SIZE = 0x7ffffff @@ -65,7 +65,7 @@ class INI; //------------------------------------------------------------------------------------------------- /** The time of day enumeration, keep in sync with TimeOfDayNames[] */ //------------------------------------------------------------------------------------------------- -enum TimeOfDay +enum TimeOfDay CPP_11(: int) { TIME_OF_DAY_INVALID = 0, TIME_OF_DAY_FIRST = 1, @@ -81,7 +81,7 @@ extern const char *TimeOfDayNames[]; // defined in Common/GameType.cpp //------------------------------------------------------------------------------------------------- -enum Weather +enum Weather CPP_11(: int) { WEATHER_NORMAL = 0, WEATHER_SNOWY = 1, @@ -91,7 +91,7 @@ enum Weather extern const char *WeatherNames[]; -enum Scorches +enum Scorches CPP_11(: int) { SCORCH_1 = 0, SCORCH_2 = 1, @@ -170,7 +170,7 @@ enum Scorches }; //------------------------------------------------------------------------------------------------- -enum WeaponSlotType +enum WeaponSlotType CPP_11(: int) { PRIMARY_WEAPON = 0, SECONDARY_WEAPON, @@ -188,7 +188,7 @@ enum WeaponSlotType // made of structures. // Note that the bridges just index in the pathfinder, so you don't actually // have a LAYER_BRIDGE_1 enum value. -enum PathfindLayerEnum {LAYER_INVALID = 0, LAYER_GROUND = 1, LAYER_WALL = 15, LAYER_LAST=15}; +enum PathfindLayerEnum CPP_11(: int) {LAYER_INVALID = 0, LAYER_GROUND = 1, LAYER_WALL = 15, LAYER_LAST=15}; //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Geometry.h b/GeneralsMD/Code/GameEngine/Include/Common/Geometry.h index fd35b89f9a..66f067f215 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Geometry.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Geometry.h @@ -46,7 +46,7 @@ class INI; * order of this geometry and the fact that the values start at 1 */ //------------------------------------------------------------------------------------------------- -enum GeometryType +enum GeometryType CPP_11(: int) { GEOMETRY_SPHERE = 0, ///< partition/collision testing as sphere. (majorRadius = radius) GEOMETRY_CYLINDER, ///< partition/collision testing as cylinder. (majorRadius = radius, height = height) @@ -68,7 +68,7 @@ static const char *GeometryNames[] = //------------------------------------------------------------------------------------------------- #if defined(_DEBUG) || defined(_INTERNAL) -enum ExtentModType +enum ExtentModType CPP_11(: int) { EXTENTMOD_INVALID = 0, EXTENTMOD_TYPE = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h index f83a9128ae..e4c9b84b5b 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h @@ -44,12 +44,12 @@ // FORWARD DECLARATIONS /////////////////////////////////////////////////////////////////////////// struct FieldParse; -enum _TerrainLOD; +enum _TerrainLOD CPP_11(: int); class GlobalData; class INI; class WeaponBonusSet; -enum BodyDamageType; -enum AIDebugOptions; +enum BodyDamageType CPP_11(: int); +enum AIDebugOptions CPP_11(: int); // PUBLIC ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Include/Common/INI.h b/GeneralsMD/Code/GameEngine/Include/Common/INI.h index 8ac4254796..29af7de808 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/INI.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/INI.h @@ -42,12 +42,12 @@ class INI; class Xfer; class File; -enum ScienceType; +enum ScienceType CPP_11(: int); //------------------------------------------------------------------------------------------------- /** These control the behavior of loading the INI data into items */ //------------------------------------------------------------------------------------------------- -enum INILoadType +enum INILoadType CPP_11(: int) { INI_LOAD_INVALID, ///< invalid load type INI_LOAD_OVERWRITE, ///< create new or load *over* existing data instance diff --git a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h index 42e60a328f..64c97d9ba7 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h @@ -41,7 +41,7 @@ /** Kind of flags for determining groups of things that belong together * NOTE: You *MUST* keep this in the same order as the KindOfNames[] below */ //------------------------------------------------------------------------------------------------- -enum KindOfType +enum KindOfType CPP_11(: int) { KINDOF_INVALID = -1, KINDOF_FIRST = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/MapObject.h b/GeneralsMD/Code/GameEngine/Include/Common/MapObject.h index 3fb98c81f2..51fda61468 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/MapObject.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/MapObject.h @@ -55,7 +55,7 @@ class WorldHeightMap; class RenderObjClass; class ThingTemplate; class Shadow; -enum WaypointID; +enum WaypointID CPP_11(: int); #define MAP_XY_FACTOR (10.0f) //How wide and tall each height map square is in world space. #define MAP_HEIGHT_SCALE (MAP_XY_FACTOR/16.0f) //divide all map heights by 8. diff --git a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h index 27b5755a4e..3fee189487 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h @@ -46,8 +46,8 @@ typedef UnsignedInt TranslatorID; ///< Unique identifiers for message str class Drawable; class GameMessageList; -enum ObjectID; -enum DrawableID; +enum ObjectID CPP_11(: int); +enum DrawableID CPP_11(: int); union GameMessageArgumentType ///< Union of possible data for given message type { @@ -65,7 +65,7 @@ union GameMessageArgumentType ///< Union of possible data for given WideChar wChar; }; -enum GameMessageArgumentDataType +enum GameMessageArgumentDataType CPP_11(: int) { ARGUMENTDATATYPE_INTEGER, ARGUMENTDATATYPE_REAL, @@ -716,7 +716,7 @@ class GameMessageList : public SubsystemInterface What to do with a GameMessage after a translator has handled it. Use a custom enum (rather than a Bool) to make the code more obvious. */ -enum GameMessageDisposition +enum GameMessageDisposition CPP_11(: int) { KEEP_MESSAGE, ///< continue processing this message thru other translators DESTROY_MESSAGE ///< destroy this message immediately and don't hand it to any other translators diff --git a/GeneralsMD/Code/GameEngine/Include/Common/ModelState.h b/GeneralsMD/Code/GameEngine/Include/Common/ModelState.h index 8579d2dcf7..bb03e0a99e 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/ModelState.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/ModelState.h @@ -90,7 +90,7 @@ // IMPORTANT NOTE: you should endeavor to set up states such that the most "normal" // state is defined by the bit being off. That is, the typical "normal" condition // has all condition flags set to zero. -enum ModelConditionFlagType +enum ModelConditionFlagType CPP_11(: int) { MODELCONDITION_INVALID = -1, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Module.h b/GeneralsMD/Code/GameEngine/Include/Common/Module.h index 93b6f5af5d..43a423cdda 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Module.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Module.h @@ -41,8 +41,8 @@ #include "Common/Snapshot.h" // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// -enum TimeOfDay; -enum StaticGameLODLevel; +enum TimeOfDay CPP_11(: int); +enum StaticGameLODLevel CPP_11(: int); class Drawable; class Object; class Player; @@ -55,7 +55,7 @@ struct FieldParse; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum ModuleType +enum ModuleType CPP_11(: int) { MODULETYPE_BEHAVIOR = 0, @@ -80,7 +80,7 @@ enum ModuleType //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum ModuleInterfaceType +enum ModuleInterfaceType CPP_11(: int) { MODULEINTERFACE_UPDATE = 0x00000001, MODULEINTERFACE_DIE = 0x00000002, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/NameKeyGenerator.h b/GeneralsMD/Code/GameEngine/Include/Common/NameKeyGenerator.h index 02e7b6d75c..52b05b90d5 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/NameKeyGenerator.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/NameKeyGenerator.h @@ -46,7 +46,7 @@ determined at runtime. (The generated code is basically identical, of course.) */ //------------------------------------------------------------------------------------------------- -enum NameKeyType +enum NameKeyType CPP_11(: int) { NAMEKEY_INVALID = 0, NAMEKEY_MAX = 1<<23, // max ordinal value of a NameKey (some code relies on these fitting into 24 bits safely) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/OSDisplay.h b/GeneralsMD/Code/GameEngine/Include/Common/OSDisplay.h index 2396ae6ade..6593c1c287 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/OSDisplay.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/OSDisplay.h @@ -35,7 +35,7 @@ class AsciiString; -enum OSDisplayButtonType +enum OSDisplayButtonType CPP_11(: unsigned) { OSDBT_OK = 0x00000001, OSDBT_CANCEL = 0x00000002, @@ -44,7 +44,7 @@ enum OSDisplayButtonType OSDBT_ERROR = 0x80000000 }; -enum OSDisplayOtherFlags +enum OSDisplayOtherFlags CPP_11(: unsigned) { OSDOF_SYSTEMMODAL = 0x00000001, OSDOF_APPLICATIONMODAL = 0x00000002, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/ObjectStatusTypes.h b/GeneralsMD/Code/GameEngine/Include/Common/ObjectStatusTypes.h index 7aaf7859e6..a6e22143d9 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/ObjectStatusTypes.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/ObjectStatusTypes.h @@ -40,7 +40,7 @@ //------------------------------------------------------------------------------------------------- /** Object status types */ //------------------------------------------------------------------------------------------------- -enum ObjectStatusTypes +enum ObjectStatusTypes CPP_11(: int) { //These are saved. Do not insert or remove any! diff --git a/GeneralsMD/Code/GameEngine/Include/Common/PartitionSolver.h b/GeneralsMD/Code/GameEngine/Include/Common/PartitionSolver.h index d1918cfa18..d7ba57ec2e 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/PartitionSolver.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/PartitionSolver.h @@ -59,7 +59,7 @@ typedef std::vector SpacesVec; // the first ObjectID is the id of the entry, while the second is the id of the hole typedef std::vector SolutionVec; -enum SolutionType +enum SolutionType CPP_11(: int) { PREFER_FAST_SOLUTION = 0, PREFER_CORRECT_SOLUTION = 0x7FFFFFFF diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Player.h b/GeneralsMD/Code/GameEngine/Include/Common/Player.h index fbeae3e2ee..ae2162b9a2 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Player.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Player.h @@ -85,11 +85,11 @@ class SpecialPowerModule; class BattlePlanBonuses; -enum BattlePlanStatus; -enum UpgradeStatusType; -enum CommandSourceType; +enum BattlePlanStatus CPP_11(: int); +enum UpgradeStatusType CPP_11(: int); +enum CommandSourceType CPP_11(: int); -enum ScienceAvailabilityType +enum ScienceAvailabilityType CPP_11(: int) { SCIENCE_AVAILABILITY_INVALID = -1, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/PlayerList.h b/GeneralsMD/Code/GameEngine/Include/Common/PlayerList.h index 5099ad586f..a47f1552e6 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/PlayerList.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/PlayerList.h @@ -60,7 +60,7 @@ class Team; class TeamFactory; //------------------------------------------------------------------------------------------------- -enum AllowPlayerRelationship +enum AllowPlayerRelationship CPP_11(: int) { ALLOW_SAME_PLAYER = 0x01, ///< allow only objects of the same player as m_obj ALLOW_ALLIES = 0x02, ///< allow objects that m_obj considers allies diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Radar.h b/GeneralsMD/Code/GameEngine/Include/Common/Radar.h index 8dc12d2276..3485c3c087 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Radar.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Radar.h @@ -61,7 +61,7 @@ enum /** These event types determine the colors radar events happen in to make it easier for us * to play events with a consistent color scheme */ //------------------------------------------------------------------------------------------------- -enum RadarEventType +enum RadarEventType CPP_11(: int) { RADAR_EVENT_INVALID = 0, RADAR_EVENT_CONSTRUCTION, @@ -126,7 +126,7 @@ class RadarObject : public MemoryPoolObject, //------------------------------------------------------------------------------------------------- /** Radar priorities. Keep this in sync with the priority names list below */ //------------------------------------------------------------------------------------------------- -enum RadarPriorityType +enum RadarPriorityType CPP_11(: int) { RADAR_PRIORITY_INVALID, // a priority that has not been set (in general it won't show up on the radar) RADAR_PRIORITY_NOT_ON_RADAR, // object specifically forbidden from being on the radar diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Recorder.h b/GeneralsMD/Code/GameEngine/Include/Common/Recorder.h index b232b1aabd..23fe1f0d10 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Recorder.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Recorder.h @@ -45,7 +45,7 @@ class ReplayGameInfo : public GameInfo } }; -enum RecorderModeType { +enum RecorderModeType CPP_11(: int) { RECORDERMODETYPE_RECORD, RECORDERMODETYPE_PLAYBACK, RECORDERMODETYPE_NONE // this is a valid state to be in on the shell map, or in saved games diff --git a/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h b/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h index d412e7fc47..bbbb51bb92 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h @@ -64,9 +64,9 @@ class STLSpecialAlloc; // FORWARD DECLARATIONS class Object; -enum NameKeyType; -enum ObjectID; -enum DrawableID; +enum NameKeyType CPP_11(: int); +enum ObjectID CPP_11(: int); +enum DrawableID CPP_11(: int); #include #include diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Science.h b/GeneralsMD/Code/GameEngine/Include/Common/Science.h index 445995a5f2..e87fa4a1ae 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Science.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Science.h @@ -40,7 +40,7 @@ class Player; //------------------------------------------------------------------------------------------------- -enum ScienceType +enum ScienceType CPP_11(: int) { SCIENCE_INVALID = -1 }; diff --git a/GeneralsMD/Code/GameEngine/Include/Common/SpecialPower.h b/GeneralsMD/Code/GameEngine/Include/Common/SpecialPower.h index 0ddadee7af..1fdcfa301a 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/SpecialPower.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/SpecialPower.h @@ -45,9 +45,9 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class ObjectCreationList; class Object; -enum ScienceType; +enum ScienceType CPP_11(: int); struct FieldParse; -enum AcademyClassificationType; +enum AcademyClassificationType CPP_11(: int); // For SpecialPowerType and SpecialPowerMaskType::s_bitNameList. Part of detangling. #include "Common/SpecialPowerType.h" diff --git a/GeneralsMD/Code/GameEngine/Include/Common/SpecialPowerType.h b/GeneralsMD/Code/GameEngine/Include/Common/SpecialPowerType.h index 44b3b3aa9a..a39753ad91 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/SpecialPowerType.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/SpecialPowerType.h @@ -37,7 +37,7 @@ // Note: these values are saved in save files, so you MUST NOT REMOVE OR CHANGE // existing values! // -enum SpecialPowerType +enum SpecialPowerType CPP_11(: int) { SPECIAL_INVALID, // don't forget to add new strings to SpecialPowerMaskType::s_bitNameList[] diff --git a/GeneralsMD/Code/GameEngine/Include/Common/StateMachine.h b/GeneralsMD/Code/GameEngine/Include/Common/StateMachine.h index 403c1540be..3f4d68a5a4 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/StateMachine.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/StateMachine.h @@ -64,7 +64,7 @@ typedef Bool (*StateTransFuncPtr)( State *state, void* userData ); /** * State return codes */ -enum StateReturnType +enum StateReturnType CPP_11(: int) { // note that all positive values are reserved for STATE_SLEEP! @@ -120,7 +120,7 @@ enum /** * Parameters for onExit(). */ -enum StateExitType +enum StateExitType CPP_11(: int) { EXIT_NORMAL, ///< state exited due to normal state transitioning EXIT_RESET ///< state exited due to state machine reset diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Team.h b/GeneralsMD/Code/GameEngine/Include/Common/Team.h index d7ea935591..59872d88ce 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Team.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Team.h @@ -110,7 +110,7 @@ class ThingTemplate; class Waypoint; class PlayerRelationMap; -enum AttitudeType; +enum AttitudeType CPP_11(: int); typedef struct { Int minUnits; diff --git a/GeneralsMD/Code/GameEngine/Include/Common/ThingSort.h b/GeneralsMD/Code/GameEngine/Include/Common/ThingSort.h index 197b2c4444..24cab13e66 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/ThingSort.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/ThingSort.h @@ -33,7 +33,7 @@ #define __THINGSORT_H_ //------------------------------------------------------------------------------------------------- -enum EditorSortingType +enum EditorSortingType CPP_11(: int) { ES_FIRST = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h b/GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h index 79f80649f3..fe50785096 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h @@ -60,10 +60,10 @@ class ProductionPrerequisite; struct FieldParse; class Player; class INI; -enum RadarPriorityType; -enum ScienceType; -enum EditorSortingType; -enum ShadowType; +enum RadarPriorityType CPP_11(: int); +enum ScienceType CPP_11(: int); +enum EditorSortingType CPP_11(: int); +enum ShadowType CPP_11(: int); class WeaponTemplateSet; class ArmorTemplateSet; class FXList; @@ -94,7 +94,7 @@ enum //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum ThingTemplateAudioType +enum ThingTemplateAudioType CPP_11(: int) { TTAUDIO_voiceSelect, ///< Response when unit is selected TTAUDIO_voiceGroupSelect, ///< Response when a group of this unit is selected @@ -195,7 +195,7 @@ class AudioArray //------------------------------------------------------------------------------------------------- /** Object class type enumeration */ //------------------------------------------------------------------------------------------------- -enum BuildCompletionType +enum BuildCompletionType CPP_11(: int) { BC_INVALID = 0, BC_APPEARS_AT_RALLY_POINT, ///< unit appears at rally point of its #1 prereq @@ -214,7 +214,7 @@ static const char *BuildCompletionNames[] = }; #endif // end DEFINE_BUILD_COMPLETION_NAMES -enum BuildableStatus +enum BuildableStatus CPP_11(: int) { // saved into savegames... do not change or remove values! BSTATUS_YES = 0, @@ -237,7 +237,7 @@ static const char *BuildableStatusNames[] = #endif // end DEFINE_BUILDABLE_STATUS_NAMES //------------------------------------------------------------------------------------------------- -enum ModuleParseMode +enum ModuleParseMode CPP_11(: int) { MODULEPARSE_NORMAL, MODULEPARSE_ADD_REMOVE_REPLACE, diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Upgrade.h b/GeneralsMD/Code/GameEngine/Include/Common/Upgrade.h index eaed50be50..7c6c3b36f9 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Upgrade.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Upgrade.h @@ -41,13 +41,13 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Player; class UpgradeTemplate; -enum NameKeyType; +enum NameKeyType CPP_11(: int); class Image; -enum AcademyClassificationType; +enum AcademyClassificationType CPP_11(: int); //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum UpgradeStatusType +enum UpgradeStatusType CPP_11(: int) { UPGRADE_STATUS_INVALID = 0, UPGRADE_STATUS_IN_PRODUCTION, @@ -145,7 +145,7 @@ class Upgrade : public MemoryPoolObject, //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum UpgradeType +enum UpgradeType CPP_11(: int) { UPGRADE_TYPE_PLAYER = 0, // upgrade applies to a player as a whole UPGRADE_TYPE_OBJECT, // upgrade applies to an object instance only diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Xfer.h b/GeneralsMD/Code/GameEngine/Include/Common/Xfer.h index e98ba4acbb..9c4b88155f 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Xfer.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Xfer.h @@ -41,10 +41,10 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Snapshot; typedef Int Color; -enum ObjectID; -enum DrawableID; -enum KindOfType; -enum ScienceType; +enum ObjectID CPP_11(: int); +enum DrawableID CPP_11(: int); +enum KindOfType CPP_11(: int); +enum ScienceType CPP_11(: int); class Matrix3D; // ------------------------------------------------------------------------------------------------ @@ -52,7 +52,7 @@ typedef UnsignedByte XferVersion; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum XferMode +enum XferMode CPP_11(: int) { XFER_INVALID = 0, @@ -65,7 +65,7 @@ enum XferMode //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum XferStatus +enum XferStatus CPP_11(: int) { XFER_STATUS_INVALID = 0, @@ -93,7 +93,7 @@ enum XferStatus // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum XferOptions +enum XferOptions CPP_11(: unsigned) { XO_NONE = 0x00000000, XO_NO_POST_PROCESSING = 0x00000001, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h index e55545d7e2..ef2f75ef47 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h @@ -40,7 +40,7 @@ class Image; // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum Anim2DMode +enum Anim2DMode CPP_11(: int) { ANIM_2D_INVALID = 0, @@ -120,7 +120,7 @@ class Anim2DTemplate : public MemoryPoolObject // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum Anim2DStatus +enum Anim2DStatus CPP_11(: int) { ANIM_2D_STATUS_NONE = 0x00, ANIM_2D_STATUS_FROZEN = 0x01, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/AnimateWindowManager.h b/GeneralsMD/Code/GameEngine/Include/GameClient/AnimateWindowManager.h index 67b761a3f8..702d410c58 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/AnimateWindowManager.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/AnimateWindowManager.h @@ -80,7 +80,7 @@ class ProcessAnimateWindow; // TYPE DEFINES /////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------- -enum AnimTypes +enum AnimTypes CPP_11(: int) { WIN_ANIMATION_NONE = 0, WIN_ANIMATION_SLIDE_RIGHT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h b/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h index b535cf5b2b..80e14932c9 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h @@ -32,7 +32,7 @@ #include "GameClient/InGameUI.h" -enum GUICommandType; +enum GUICommandType CPP_11(: int); //----------------------------------------------------------------------------- class CommandTranslator : public GameMessageTranslator @@ -72,7 +72,7 @@ class CommandTranslator : public GameMessageTranslator }; -enum FilterTypes +enum FilterTypes CPP_11(: int) { FT_NULL_FILTER=0, // The following are screen filter shaders, that modify the rendered viewport after it is drawn. @@ -83,7 +83,7 @@ enum FilterTypes FT_MAX }; -enum FilterModes +enum FilterModes CPP_11(: int) { FM_NULL_MODE = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h index fee923ff98..ea8d34d860 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h @@ -61,19 +61,19 @@ class ControlBarResizer; class GameWindowTransitionsHandler; class DisplayString; -enum ProductionID; +enum ProductionID CPP_11(: int); -enum CommandSourceType; -enum ProductionType; -enum GadgetGameMessage; -enum ScienceType; -enum TimeOfDay; -enum RadiusCursorType; +enum CommandSourceType CPP_11(: int); +enum ProductionType CPP_11(: int); +enum GadgetGameMessage CPP_11(: int); +enum ScienceType CPP_11(: int); +enum TimeOfDay CPP_11(: int); +enum RadiusCursorType CPP_11(: int); //------------------------------------------------------------------------------------------------- /** Command options */ //------------------------------------------------------------------------------------------------- -enum CommandOption +enum CommandOption CPP_11(: int) { COMMAND_OPTION_NONE = 0x00000000, NEED_TARGET_ENEMY_OBJECT = 0x00000001, // command now needs user to select enemy target @@ -166,7 +166,7 @@ const UnsignedInt COMMAND_OPTION_NEED_OBJECT_TARGET = * IMPORTANT: Make sure the GUICommandType enum and the TheGuiCommandNames[] have the same * entries in the same order */ //------------------------------------------------------------------------------------------------- -enum GUICommandType +enum GUICommandType CPP_11(: int) { GUI_COMMAND_NONE = 0, ///< invalid command GUI_COMMAND_DOZER_CONSTRUCT, ///< dozer construct @@ -270,7 +270,7 @@ static const char *TheGuiCommandNames[] = }; #endif // end DEFINE_GUI_COMMAND_NAMES -enum CommandButtonMappedBorderType +enum CommandButtonMappedBorderType CPP_11(: int) { COMMAND_BUTTON_BORDER_NONE = 0, COMMAND_BUTTON_BORDER_BUILD, @@ -576,7 +576,7 @@ class SideSelectWindowData * display of commands and information to the user based on what objects are selected * and their capabilities */ //------------------------------------------------------------------------------------------------- -enum ControlBarContext +enum ControlBarContext CPP_11(: int) { CB_CONTEXT_NONE, ///< default view for center bar and portrait window // CB_CONTEXT_PURCHASE_SCIENCE, @@ -598,7 +598,7 @@ enum ControlBarContext * hide and un-hide these windows and their interface controls in order to make * the control bar context sensitive to the object that is selected */ //------------------------------------------------------------------------------------------------- -enum ContextParent +enum ContextParent CPP_11(: int) { CP_MASTER, ///< *The* control bar window as a whole CP_PURCHASE_SCIENCE, @@ -615,7 +615,7 @@ enum ContextParent //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum CBCommandStatus +enum CBCommandStatus CPP_11(: int) { CBC_COMMAND_NOT_USED = 0, ///< gui control message was *not* used CBC_COMMAND_USED ///< gui control message was used @@ -626,7 +626,7 @@ enum CBCommandStatus * GUI button to be enabled/disabled/checked/unchecked to represent the current * state of that command availability */ // ------------------------------------------------------------------------------------------------ -enum CommandAvailability +enum CommandAvailability CPP_11(: int) { COMMAND_RESTRICTED, COMMAND_AVAILABLE, @@ -636,7 +636,7 @@ enum CommandAvailability COMMAND_CANT_AFFORD, }; -enum ControlBarStages +enum ControlBarStages CPP_11(: int) { CONTROL_BAR_STAGE_DEFAULT = 0, ///< full view for the world to see CONTROL_BAR_STAGE_SQUISHED, ///< squished just for expeirenced players diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h index 2712cbdf72..b7c42cedb3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h @@ -63,7 +63,7 @@ class AsciiString; class playerTemplate; class Image; -enum TimeOfDay; +enum TimeOfDay CPP_11(: int); //----------------------------------------------------------------------------- // TYPE DEFINES /////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/DisconnectMenu.h b/GeneralsMD/Code/GameEngine/Include/GameClient/DisconnectMenu.h index f52ff2cd08..80a0f751fe 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/DisconnectMenu.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/DisconnectMenu.h @@ -30,7 +30,7 @@ #include "GameNetwork/DisconnectManager.h" -enum DisconnectMenuStateType { +enum DisconnectMenuStateType CPP_11(: int) { DISCONNECTMENUSTATETYPE_SCREENON, DISCONNECTMENUSTATETYPE_SCREENOFF }; diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h index d08e5e3a6e..54dd3a2451 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Display.h @@ -51,7 +51,7 @@ class DebugDisplayInterface; class Radar; class Image; class DisplayString; -enum StaticGameLODLevel; +enum StaticGameLODLevel CPP_11(: int); /** * The Display class implements the Display interface */ diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h index ca38307b7d..11866f1f28 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h @@ -56,7 +56,7 @@ class ModuleInfo; class Anim2DTemplate; class Image; class DynamicAudioEventInfo; -enum BodyDamageType; +enum BodyDamageType CPP_11(: int); // this is a very worthwhile performance win. left conditionally defined for now, just // in case, but probably should be made permanent soon. (srj) @@ -77,7 +77,7 @@ enum BodyDamageType; // each time I add a new icon, and made the arrays dynamic... // CD: No so good, core engine components should not be made dynamic in this way -enum DrawableIconType +enum DrawableIconType CPP_11(: int) { /** NOTE: This enum MUST appear in the same order as TheDrawableIconNames array to be * indexed correctly using that array */ @@ -213,7 +213,7 @@ class TintEnvelope : public MemoryPoolObject, public Snapshot EMPTY_DTOR(TintEnvelope) //----------------------------------------------------------------------------- -enum StealthLookType +enum StealthLookType CPP_11(: int) { STEALTHLOOK_NONE, ///< unit is not stealthed at all STEALTHLOOK_VISIBLE_FRIENDLY, ///< unit is stealthed-but-visible due to friendly status @@ -228,7 +228,7 @@ enum StealthLookType // ------------------------------------------------------------------------------------------------ /** Drawable status bits */ // ------------------------------------------------------------------------------------------------ -enum DrawableStatus +enum DrawableStatus CPP_11(: int) { DRAWABLE_STATUS_NONE = 0x00000000, ///< no status DRAWABLE_STATUS_DRAWS_IN_MIRROR = 0x00000001, ///< drawable can reflect @@ -238,7 +238,7 @@ enum DrawableStatus DRAWABLE_STATUS_NO_SAVE = 0x00000010, ///< do *not* save this drawable (UI fluff only). ignored (error, actually) if attached to an object }; -enum TintStatus +enum TintStatus CPP_11(: int) { TINT_STATUS_DISABLED = 0x00000001,///< drawable tint color is deathly dark grey TINT_STATUS_IRRADIATED = 0x00000002,///< drawable tint color is sickly green @@ -254,7 +254,7 @@ enum TintStatus // Note: these values are saved in save files, so you MUST NOT REMOVE OR CHANGE // existing values! // -enum TerrainDecalType +enum TerrainDecalType CPP_11(: int) { #ifdef ALLOW_DEMORALIZE TERRAIN_DECAL_DEMORALIZED = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/EstablishConnectionsMenu.h b/GeneralsMD/Code/GameEngine/Include/GameClient/EstablishConnectionsMenu.h index 186c8b0661..81d67ec3a8 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/EstablishConnectionsMenu.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/EstablishConnectionsMenu.h @@ -27,7 +27,7 @@ #include "GameNetwork/NetworkDefs.h" #include "GameNetwork/NAT.h" -enum EstablishConnectionsMenuStateType { +enum EstablishConnectionsMenuStateType CPP_11(: int) { ESTABLISHCONNECTIONSMENUSTATETYPE_SCREENON, ESTABLISHCONNECTIONSMENUSTATETYPE_SCREENOFF }; diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Eva.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Eva.h index 61186c257c..5e9826e99b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Eva.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Eva.h @@ -38,7 +38,7 @@ class INI; //------------------------------------------------------------------------------------ Eva Messages // Keep in sync with TheEvaMessageNames AND Eva::s_shouldPlayFuncs -enum EvaMessage +enum EvaMessage CPP_11(: int) { EVA_Invalid = -1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ExtendedMessageBox.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ExtendedMessageBox.h index 3129336691..bdd3545cb7 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/ExtendedMessageBox.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ExtendedMessageBox.h @@ -36,7 +36,7 @@ #include "GameClient/GameWindowManager.h" // return codes for message box callbacks -enum MessageBoxReturnType { +enum MessageBoxReturnType CPP_11(: int) { MB_RETURN_CLOSE, MB_RETURN_KEEPOPEN }; diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/GUICallbacks.h b/GeneralsMD/Code/GameEngine/Include/GameClient/GUICallbacks.h index 8d3bfd23f5..0f6e309c6d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/GUICallbacks.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/GUICallbacks.h @@ -333,7 +333,7 @@ extern WindowMsgHandledType ReplayControlInput( GameWindow *window, UnsignedInt // InGame Chat Controls -------------------------------------------------------------------------------- extern WindowMsgHandledType InGameChatSystem( GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2 ); extern WindowMsgHandledType InGameChatInput( GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2 ); -enum InGameChatType +enum InGameChatType CPP_11(: int) { INGAME_CHAT_ALLIES, INGAME_CHAT_EVERYONE, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Gadget.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Gadget.h index 3e2a792196..19c254baab 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Gadget.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Gadget.h @@ -133,7 +133,7 @@ enum }; // Gadget game messages (sent to their owners) -enum GadgetGameMessage +enum GadgetGameMessage CPP_11(: int) { // Generic messages supported by all gadgets diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/GameWindow.h b/GeneralsMD/Code/GameEngine/Include/GameClient/GameWindow.h index fb212c0aad..d69f9e655e 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/GameWindow.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/GameWindow.h @@ -78,7 +78,7 @@ enum { WIN_COLOR_UNDEFINED = GAME_COLOR_UNDEFINED }; typedef UnsignedInt WindowMsgData; //----------------------------------------------------------------------------- -enum WindowMsgHandledType { MSG_IGNORED, MSG_HANDLED }; +enum WindowMsgHandledType CPP_11(: int) { MSG_IGNORED, MSG_HANDLED }; // callback types ------------------------------------------------------------- typedef void (*GameWinMsgBoxFunc)( void ); //used for the Message box callbacks. @@ -113,7 +113,7 @@ enum // Game window messages ------------------------------------------------------- //----------------------------------------------------------------------------- -enum GameWindowMessage +enum GameWindowMessage CPP_11(: int) { GWM_NONE = 0, @@ -141,7 +141,7 @@ enum GameWindowMessage /** These return codes are returned when after processing events through * the window system */ //----------------------------------------------------------------------------- -enum WinInputReturnCode +enum WinInputReturnCode CPP_11(: int) { WIN_INPUT_NOT_USED = 0, WIN_INPUT_USED, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h index c96fd88656..3fd20527e1 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h @@ -60,13 +60,13 @@ class WindowLayout; class Anim2DTemplate; class Anim2D; class Shadow; -enum LegalBuildCode; -enum KindOfType; -enum ShadowType; -enum CanAttackResult; +enum LegalBuildCode CPP_11(: int); +enum KindOfType CPP_11(: int); +enum ShadowType CPP_11(: int); +enum CanAttackResult CPP_11(: int); // ------------------------------------------------------------------------------------------------ -enum RadiusCursorType +enum RadiusCursorType CPP_11(: int) { RADIUSCURSOR_NONE = 0, RADIUSCURSOR_ATTACK_DAMAGE_AREA, @@ -288,7 +288,7 @@ enum /////////////////////////////////////////////////////////////////////////////////////////////////// // ------------------------------------------------------------------------------------------------ -enum WorldAnimationOptions +enum WorldAnimationOptions CPP_11(: int) { WORLD_ANIM_NO_OPTIONS = 0x00000000, WORLD_ANIM_FADE_ON_EXPIRE = 0x00000001, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h b/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h index 6dc472fa8d..ff59fe6b7d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h @@ -104,7 +104,7 @@ /** The key tables */ //============================================================================= -enum KeyDefType +enum KeyDefType CPP_11(: int) { // keypad keys ---------------------------------------------------------------- KEY_KP0 = DIK_NUMPAD0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/MetaEvent.h b/GeneralsMD/Code/GameEngine/Include/GameClient/MetaEvent.h index 566a0810da..8c4a995061 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/MetaEvent.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/MetaEvent.h @@ -34,7 +34,7 @@ #include "GameClient/InGameUI.h" -enum MappableKeyCategories +enum MappableKeyCategories CPP_11(: int) { CATEGORY_CONTROL = 0, CATEGORY_INFORMATION, @@ -67,7 +67,7 @@ static const LookupListRec CategoryListName[] = // in particular, "modifier" keys and keypad keys aren't // available. Note that MappableKeyType is a SUBSET of // KeyDefType; this is extremely important to maintain! -enum MappableKeyType +enum MappableKeyType CPP_11(: int) { MK_ESC = KEY_ESC, MK_BACKSPACE = KEY_BACKSPACE, @@ -250,7 +250,7 @@ static const LookupListRec KeyNames[] = }; // ------------------------------------------------------------------------------- -enum MappableKeyTransition +enum MappableKeyTransition CPP_11(: int) { DOWN, UP, @@ -267,7 +267,7 @@ static const LookupListRec TransitionNames[] = // ------------------------------------------------------------------------------- // an easier-to-type subset of the KEY_STATE stuff. -enum MappableKeyModState +enum MappableKeyModState CPP_11(: int) { NONE = 0, CTRL = KEY_STATE_LCONTROL, @@ -296,7 +296,7 @@ static const LookupListRec ModifierNames[] = // ------------------------------------------------------------------------------- // CommandUsableInType sets in what state the commands are allowed. -enum CommandUsableInType +enum CommandUsableInType CPP_11(: int) { COMMANDUSABLE_NONE = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h index d11ac28792..e14f29dd0c 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h @@ -61,7 +61,7 @@ // TYPE DEFINES /////////////////////////////////////////////////////////////// -enum MouseButtonState +enum MouseButtonState CPP_11(: int) { MBS_Up = 0, MBS_Down, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ParticleSys.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ParticleSys.h index e96e4c665a..d08501d7a5 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/ParticleSys.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ParticleSys.h @@ -56,7 +56,7 @@ class INI; class DebugWindowDialog; // really ParticleEditorDialog class RenderInfoClass; // ick -enum ParticleSystemID +enum ParticleSystemID CPP_11(: int) { INVALID_PARTICLE_SYSTEM_ID = 0 }; @@ -82,7 +82,7 @@ struct RGBColorKeyframe UnsignedInt frame; }; -enum ParticlePriorityType +enum ParticlePriorityType CPP_11(: int) { INVALID_PRIORITY = 0, PARTICLE_PRIORITY_LOWEST = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h b/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h index 3e211be7ae..91adc7fc92 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h @@ -34,7 +34,7 @@ #include "Common/GameType.h" #include "GameClient/Color.h" -enum ShadowType; +enum ShadowType CPP_11(: int); class Player; class Shadow; class RadiusDecalTemplate; diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h index e8f7efe1ad..ef79b18270 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h @@ -38,7 +38,7 @@ // // shadow bit flags, keep this in sync with TheShadowNames -enum ShadowType +enum ShadowType CPP_11(: int) { SHADOW_NONE = 0x00000000, SHADOW_DECAL = 0x00000001, //shadow decal applied via modulate blend diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Shell.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Shell.h index ac874dfa72..400d117b5d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Shell.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Shell.h @@ -105,7 +105,7 @@ class AnimateWindowManager; class GameWindow; class ShellMenuSchemeManager; -enum AnimTypes; +enum AnimTypes CPP_11(: int); //------------------------------------------------------------------------------------------------- /** This is the interface to the shell system to load, display, and diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainRoads.h b/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainRoads.h index 38841cd719..6b56f9d912 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainRoads.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainRoads.h @@ -46,7 +46,7 @@ class AsciiString; // ------------------------------------------------------------------------------------------------ /** Bridges have 4 towers around it that the player can attack or use to repair the bridge */ // ------------------------------------------------------------------------------------------------ -enum BridgeTowerType +enum BridgeTowerType CPP_11(: int) { BRIDGE_TOWER_FROM_LEFT = 0, BRIDGE_TOWER_FROM_RIGHT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainVisual.h b/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainVisual.h index 712f3e583f..e3c6653b02 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainVisual.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/TerrainVisual.h @@ -57,7 +57,7 @@ struct SeismicSimulationNode; // just a forward declaration folks, no cause for class SeismicSimulationFilterBase { public: - enum SeismicSimStatusCode + enum SeismicSimStatusCode CPP_11(: int) { SEISMIC_STATUS_INVALID, SEISMIC_STATUS_ACTIVE, @@ -170,7 +170,7 @@ class DomeStyleSeismicFilter : public SeismicSimulationFilterBase //------------------------------------------------------------------------------------------------- /** LOD values for terrain, keep this in sync with TerrainLODNames[] */ //------------------------------------------------------------------------------------------------- -typedef enum _TerrainLOD +typedef enum _TerrainLOD CPP_11(: int) { TERRAIN_LOD_INVALID = 0, TERRAIN_LOD_MIN = 1, // note that this is less than max diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h b/GeneralsMD/Code/GameEngine/Include/GameClient/View.h index a309f5d2cf..59f6d1a44b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/View.h @@ -53,7 +53,7 @@ class LookAtTranslator; // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum PickType +enum PickType CPP_11(: int) { PICK_TYPE_TERRAIN = COLL_TYPE_0, PICK_TYPE_SELECTABLE = COLL_TYPE_1, @@ -84,7 +84,7 @@ class View : public Snapshot }; // Return values for worldToScreenTriReturn - enum WorldToScreenReturn + enum WorldToScreenReturn CPP_11(: int) { WTS_INSIDE_FRUSTUM = 0, // On the screen (inside frustum of camera) WTS_OUTSIDE_FRUSTUM, // Return is valid but off the screen (outside frustum of camera) diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/WindowVideoManager.h b/GeneralsMD/Code/GameEngine/Include/GameClient/WindowVideoManager.h index 06aea0adfd..67de2ee9a9 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/WindowVideoManager.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/WindowVideoManager.h @@ -69,7 +69,7 @@ class VideoBuffer; //----------------------------------------------------------------------------- -enum WindowVideoPlayType +enum WindowVideoPlayType CPP_11(: int) { WINDOW_PLAY_MOVIE_ONCE = 0, WINDOW_PLAY_MOVIE_LOOP, @@ -78,7 +78,7 @@ enum WindowVideoPlayType WINDOW_PLAY_MOVIE_COUNT }; -enum WindowVideoStates +enum WindowVideoStates CPP_11(: int) { WINDOW_VIDEO_STATE_START = 0, WINDOW_VIDEO_STATE_STOP, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h index ecb7d34299..6f5a64bab3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/AI.h @@ -51,11 +51,11 @@ class PolygonTrigger; class UpgradeTemplate; class WeaponTemplate; -enum GUICommandType; -enum HackerAttackMode; -enum WeaponSetType; -enum WeaponLockType; -enum SpecialPowerType; +enum GUICommandType CPP_11(: int); +enum HackerAttackMode CPP_11(: int); +enum WeaponSetType CPP_11(: int); +enum WeaponLockType CPP_11(: int); +enum SpecialPowerType CPP_11(: int); typedef std::vector VecObjectID; typedef VecObjectID::iterator VecObjectIDIt; @@ -63,7 +63,7 @@ typedef VecObjectID::iterator VecObjectIDIt; typedef std::list ListObjectPtr; typedef ListObjectPtr::iterator ListObjectPtrIt; -enum AIDebugOptions +enum AIDebugOptions CPP_11(: int) { AI_DEBUG_NONE = 0, AI_DEBUG_PATHS, @@ -314,7 +314,7 @@ class Weapon; // TheSuperHackers @compile xezon 17/03/2025 Renames AI_PASSIVE to not conflict with macro in ws2def.h // Note - written out in save/load xfer and .map files, don't change these numbers. -enum AttitudeType +enum AttitudeType CPP_11(: int) { ATTITUDE_SLEEP = -2, ATTITUDE_PASSIVE=-1, @@ -324,7 +324,7 @@ enum AttitudeType ATTITUDE_INVALID=3 }; ///< AI "attitude" behavior modifiers -enum CommandSourceType; +enum CommandSourceType CPP_11(: int); typedef UnsignedInt CommandSourceMask; @@ -343,7 +343,7 @@ static const char *TheCommandSourceMaskNames[] = //------------------------------------------------------------------------------------------------------------ -enum AICommandType // Stored in save file, do not reorder/renumber. jba. +enum AICommandType CPP_11(: int) // Stored in save file, do not reorder/renumber. jba. { AICMD_NO_COMMAND = -1, AICMD_MOVE_TO_POSITION = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/AIStateMachine.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/AIStateMachine.h index 0a600ad122..c37b17e9c3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/AIStateMachine.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/AIStateMachine.h @@ -58,7 +58,7 @@ class Squad; * Each of these constants will be associated with an instance of a State class * in a given StateMachine. */ -enum AIStateType +enum AIStateType CPP_11(: int) { AI_IDLE, AI_MOVE_TO, ///< move to the GoalObject or GoalPosition @@ -196,7 +196,7 @@ class AttackStateMachine : public StateMachine public: // Attack states. -enum StateType +enum StateType CPP_11(: int) { CHASE_TARGET, ///< Chase a moving target (optionally following it) APPROACH_TARGET, ///< Approach a non-moving target. diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ArmorSet.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ArmorSet.h index 446a646f25..bc3bb6e933 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ArmorSet.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ArmorSet.h @@ -43,7 +43,7 @@ class INI; // IMPORTANT NOTE: you should endeavor to set up states such that the most "normal" // state is defined by the bit being off. That is, the typical "normal" condition // has all condition flags set to zero. -enum ArmorSetType +enum ArmorSetType CPP_11(: int) { // The access and use of this enum has the bit shifting built in, so this is a 0,1,2,3,4,5 enum ARMORSET_VETERAN = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/CrateSystem.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/CrateSystem.h index ed23e3e1b2..01dd12d64a 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/CrateSystem.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/CrateSystem.h @@ -36,7 +36,7 @@ #include "Common/Overridable.h" #include "Common/Override.h" -enum ScienceType; +enum ScienceType CPP_11(: int); struct crateCreationEntry { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Damage.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Damage.h index 9037570ade..c011f8468a 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Damage.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Damage.h @@ -47,7 +47,7 @@ class ThingTemplate; //------------------------------------------------------------------------------------------------- /** Damage types, keep this in sync with DamageTypeFlags::s_bitNameList[] */ //------------------------------------------------------------------------------------------------- -enum DamageType +enum DamageType CPP_11(: int) { DAMAGE_EXPLOSION = 0, DAMAGE_CRUSH = 1, @@ -164,7 +164,7 @@ void initDamageTypeFlags(); //------------------------------------------------------------------------------------------------- /** Death types, keep this in sync with TheDeathNames[] */ //------------------------------------------------------------------------------------------------- -enum DeathType +enum DeathType CPP_11(: int) { // note that these DELIBERATELY have (slightly) different names from the damage names, // since there isn't necessarily a one-to-one correspondence. e.g., DEATH_BURNED diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/GameLogic.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/GameLogic.h index dda843f3fe..4dec29752b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/GameLogic.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/GameLogic.h @@ -66,7 +66,7 @@ class WindowLayout; class TerrainLogic; class GhostObjectManager; class CommandButton; -enum BuildableStatus; +enum BuildableStatus CPP_11(: int); typedef const CommandButton* ConstCommandButtonPtr; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/GhostObject.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/GhostObject.h index 31f8e13abc..7283d711b6 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/GhostObject.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/GhostObject.h @@ -43,8 +43,8 @@ class Object; class PartitionData; -enum GeometryType; -enum ObjectID; +enum GeometryType CPP_11(: int); +enum ObjectID CPP_11(: int); class GhostObject : public Snapshot { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h index af1e388794..b267bf7cab 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h @@ -44,14 +44,14 @@ class Locomotor; class LocomotorTemplate; class INI; class PhysicsBehavior; -enum BodyDamageType; -enum PhysicsTurningType; +enum BodyDamageType CPP_11(: int); +enum PhysicsTurningType CPP_11(: int); // if we ever re-enable jets circling for landing, we need this. so keep in around just in case. (srj) #define NO_CIRCLE_FOR_LANDING //------------------------------------------------------------------------------------------------- -enum LocomotorAppearance +enum LocomotorAppearance CPP_11(: int) { LOCO_LEGS_TWO, LOCO_WHEELS_FOUR, @@ -64,7 +64,7 @@ enum LocomotorAppearance LOCO_MOTORCYCLE }; -enum LocomotorPriority +enum LocomotorPriority CPP_11(: int) { LOCO_MOVES_BACK=0, // In a group, this one moves toward the back LOCO_MOVES_MIDDLE=1, // In a group, this one stays in the middle @@ -89,7 +89,7 @@ static const char *TheLocomotorAppearanceNames[] = #endif //------------------------------------------------------------------------------------------------- -enum LocomotorBehaviorZ +enum LocomotorBehaviorZ CPP_11(: int) { Z_NO_Z_MOTIVE_FORCE, // does whatever physics tells it, but has no z-force of its own. Z_SEA_LEVEL, // keep at surface-of-water level diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h index ed73635b81..54dea3772b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h @@ -46,7 +46,7 @@ class LocomotorTemplate; // Note: these values are saved in save files, so you MUST NOT REMOVE OR CHANGE // existing values! // -enum LocomotorSurfaceType +enum LocomotorSurfaceType CPP_11(: int) { LOCOMOTORSURFACE_GROUND = (1 << 0), ///< clear, unobstructed ground LOCOMOTORSURFACE_WATER = (1 << 1), ///< water area diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h index 95556225a8..c00836bb5b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h @@ -59,8 +59,8 @@ class HackInternetAIInterface; class AssaultTransportAIInterface; class JetAIUpdate; -enum AIStateType; -enum ObjectID; +enum AIStateType CPP_11(: int); +enum ObjectID CPP_11(: int); //------------------------------------------------------------------------------------------------- @@ -71,7 +71,7 @@ const Real FAST_AS_POSSIBLE = 999999.0f; // Note: these values are saved in save files, so you MUST NOT REMOVE OR CHANGE // existing values! // -enum LocomotorSetType +enum LocomotorSetType CPP_11(: int) { LOCOMOTORSET_INVALID = -1, @@ -88,7 +88,7 @@ enum LocomotorSetType }; //------------------------------------------------------------------------------------------------- -enum GuardTargetType +enum GuardTargetType CPP_11(: int) { GUARDTARGET_LOCATION, // Guard a coord3d GUARDTARGET_OBJECT, // Guard an object @@ -112,7 +112,7 @@ static const char *TheLocomotorSetNames[] = }; #endif -enum AutoAcquireStates +enum AutoAcquireStates CPP_11(: int) { AAS_Idle = 0x01, AAS_Idle_Stealthed = 0x02, @@ -136,7 +136,7 @@ static const char *TheAutoAcquireEnemiesNames[] = //------------------------------------------------------------------------------------------------- -enum MoodMatrixParameters +enum MoodMatrixParameters CPP_11(: int) { // Controller_Player and Controller_AI are mutually exclusive MM_Controller_Player = 0x00000001, @@ -160,7 +160,7 @@ enum MoodMatrixParameters }; //------------------------------------------------------------------------------------------------- -enum MoodMatrixAction +enum MoodMatrixAction CPP_11(: int) { MM_Action_Idle, MM_Action_Move, @@ -169,7 +169,7 @@ enum MoodMatrixAction }; //------------------------------------------------------------------------------------------------- -enum MoodActionAdjustment +enum MoodActionAdjustment CPP_11(: int) { MAA_Action_Ok = 0x00000001, MAA_Action_To_Idle = 0x00000002, @@ -219,7 +219,7 @@ class AIUpdateModuleData : public UpdateModuleData }; //------------------------------------------------------------------------------------------------- -enum AIFreeToExitType // Note - written out in save/load xfer, don't change these numbers. jba. +enum AIFreeToExitType CPP_11(: int) // Note - written out in save/load xfer, don't change these numbers. jba. { FREE_TO_EXIT=0, NOT_FREE_TO_EXIT=1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AnimationSteeringUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AnimationSteeringUpdate.h index 1bc197c774..4006f2d5f3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AnimationSteeringUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AnimationSteeringUpdate.h @@ -35,7 +35,7 @@ // USER INCLUDES ////////////////////////////////////////////////////////////////////////////////// #include "GameLogic/Module/UpdateModule.h" -enum PhysicsTurningType; +enum PhysicsTurningType CPP_11(: int); //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h index 0499d49aab..dc9cc787bb 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AssaultTransportAIUpdate.h @@ -37,7 +37,7 @@ #include "GameLogic/Module/AIUpdate.h" //------------------------------------------------------------------------------------------------- -enum AssaultStateTypes +enum AssaultStateTypes CPP_11(: int) { IDLE, ///< Not doing anything. ASSAULTING, ///< Transport is waiting while troops do fighting. diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BaikonurLaunchPower.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BaikonurLaunchPower.h index 3530260b78..02528fb8cd 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BaikonurLaunchPower.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BaikonurLaunchPower.h @@ -53,7 +53,7 @@ class Object; class SpecialPowerTemplate; struct FieldParse; -enum ScienceType; +enum ScienceType CPP_11(: int); class BaikonurLaunchPowerModuleData : public SpecialPowerModuleData { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BattlePlanUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BattlePlanUpdate.h index 4eb28dbcf2..b03e12d419 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BattlePlanUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BattlePlanUpdate.h @@ -41,8 +41,8 @@ class SpecialPowerModule; class ParticleSystem; class FXList; class AudioEventRTS; -enum MaxHealthChangeType; -enum CommandOption; +enum MaxHealthChangeType CPP_11(: int); +enum CommandOption CPP_11(: int); //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- @@ -90,7 +90,7 @@ class BattlePlanUpdateModuleData : public ModuleData }; -enum TransitionStatus +enum TransitionStatus CPP_11(: int) { TRANSITIONSTATUS_IDLE, TRANSITIONSTATUS_UNPACKING, @@ -98,7 +98,7 @@ enum TransitionStatus TRANSITIONSTATUS_PACKING, }; -enum BattlePlanStatus +enum BattlePlanStatus CPP_11(: int) { PLANSTATUS_NONE, PLANSTATUS_BOMBARDMENT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BehaviorModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BehaviorModule.h index e16a021bca..1b63ce9ab3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BehaviorModule.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BehaviorModule.h @@ -207,7 +207,7 @@ inline BehaviorModule::BehaviorModule( Thing *thing, const ModuleData* moduleDat inline BehaviorModule::~BehaviorModule() { } -enum RunwayReservationType +enum RunwayReservationType CPP_11(: int) { RESERVATION_TAKEOFF, RESERVATION_LANDING, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BodyModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BodyModule.h index 81e1cbbf42..486eca093f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BodyModule.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BodyModule.h @@ -50,7 +50,7 @@ class WeaponTemplate; * enumeration being in sequential order */ //------------------------------------------------------------------------------------------------- -enum BodyDamageType +enum BodyDamageType CPP_11(: int) { BODY_PRISTINE, ///< unit should appear in pristine condition BODY_DAMAGED, ///< unit has been damaged @@ -72,7 +72,7 @@ static const char* TheBodyDamageTypeNames[] = }; #endif -enum MaxHealthChangeType +enum MaxHealthChangeType CPP_11(: int) { SAME_CURRENTHEALTH, PRESERVE_RATIO, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h index f6e61b3a4a..6e39dab0e6 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BoneFXDamage.h @@ -37,7 +37,7 @@ #include "GameLogic/Module/DamageModule.h" //#include "GameLogic/Module/BodyModule.h" -- Yikes... not necessary to include this! (KM) -enum BodyDamageType; //Ahhhh much better! +enum BodyDamageType CPP_11(: int); //Ahhhh much better! // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeBehavior.h index bda8f6d510..2f76d4676b 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeBehavior.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeBehavior.h @@ -41,7 +41,7 @@ #include "GameLogic/Module/UpdateModule.h" // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// -enum BridgeTowerType; +enum BridgeTowerType CPP_11(: int); class FXList; class ObjectCreationList; class Bridge; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeScaffoldBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeScaffoldBehavior.h index ddcfa68984..deb8e28039 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeScaffoldBehavior.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/BridgeScaffoldBehavior.h @@ -38,7 +38,7 @@ // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum ScaffoldTargetMotion +enum ScaffoldTargetMotion CPP_11(: int) { STM_STILL, STM_RISE, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CashHackSpecialPower.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CashHackSpecialPower.h index e23fc701e1..2fa6e3fc66 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CashHackSpecialPower.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CashHackSpecialPower.h @@ -39,7 +39,7 @@ class Object; class SpecialPowerTemplate; struct FieldParse; -enum ScienceType; +enum ScienceType CPP_11(: int); //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h index cdd11e8e57..5873e96d6d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ChinookAIUpdate.h @@ -67,7 +67,7 @@ class ChinookAIUpdateModuleData : public SupplyTruckAIUpdateModuleData }; //------------------------------------------------------------------------------------------------- -enum ChinookFlightStatus // Stored in save file, don't renumber. jba. +enum ChinookFlightStatus CPP_11(: int) // Stored in save file, don't renumber. jba. { CHINOOK_TAKING_OFF = 0, CHINOOK_FLYING = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h index 02f2b75bd9..e35c15c2a3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ContainModule.h @@ -42,10 +42,10 @@ class Player; class ExitInterface; class Matrix3D; class Weapon; -enum CommandSourceType; +enum CommandSourceType CPP_11(: int); //------------------------------------------------------------------------------------------------- -enum ObjectEnterExitType +enum ObjectEnterExitType CPP_11(: int) { WANTS_TO_ENTER, WANTS_TO_EXIT, @@ -53,7 +53,7 @@ enum ObjectEnterExitType }; -enum EvacDisposition +enum EvacDisposition CPP_11(: int) { EVAC_INVALID = 0, EVAC_TO_LEFT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrateCollide.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrateCollide.h index 0155c93ebb..132d6f7c25 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrateCollide.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrateCollide.h @@ -39,7 +39,7 @@ class Thing; class Anim2DTemplate; class FXList; -enum ScienceType; +enum ScienceType CPP_11(: int); //------------------------------------------------------------------------------------------------- class CrateCollideModuleData : public CollideModuleData @@ -72,7 +72,7 @@ class CrateCollide : public CollideModule public: -enum SabotageVictimType +enum SabotageVictimType CPP_11(: int) { SAB_VICTIM_GENERIC = 0, SAB_VICTIM_COMMAND_CENTER, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrushDie.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrushDie.h index ae1a1e0a32..b08a7a480d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrushDie.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CrushDie.h @@ -42,7 +42,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Thing; -enum CrushEnum +enum CrushEnum CPP_11(: int) { TOTAL_CRUSH, BACK_END_CRUSH, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DamageModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DamageModule.h index 6b42a52b29..9c5ae1b788 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DamageModule.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DamageModule.h @@ -36,7 +36,7 @@ #include "GameLogic/Damage.h" #include "GameLogic/Module/BehaviorModule.h" -enum BodyDamageType; +enum BodyDamageType CPP_11(: int); //------------------------------------------------------------------------------------------------- /** OBJECT DAMAGE MODULE base class */ diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DefectorSpecialPower.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DefectorSpecialPower.h index 0d69e1084c..031e9a1846 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DefectorSpecialPower.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DefectorSpecialPower.h @@ -42,7 +42,7 @@ class Object; class SpecialPowerTemplate; struct FieldParse; -enum ScienceType; +enum ScienceType CPP_11(: int); diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h index dfbded3e7f..d5b281ce18 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DeployStyleAIUpdate.h @@ -36,7 +36,7 @@ #include "GameLogic/Module/AIUpdate.h" //------------------------------------------------------------------------------------------------- -enum DeployStateTypes +enum DeployStateTypes CPP_11(: int) { READY_TO_MOVE, ///< Mobile, can't attack. DEPLOY, ///< Not mobile, can't attack, currently unpacking to attack diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h index 87e6f42756..2f5d0ebe16 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DozerAIUpdate.h @@ -68,7 +68,7 @@ class DozerPrimaryStateMachine : public StateMachine //------------------------------------------------------------------------------------------------- /** Dozer behaviors that use action sub state machines */ //------------------------------------------------------------------------------------------------- -enum DozerTask // These enums are saved in the game save file, so DO NOT renumber them. jba. +enum DozerTask CPP_11(: int) // These enums are saved in the game save file, so DO NOT renumber them. jba. { DOZER_TASK_INVALID = -1, DOZER_TASK_FIRST = 0, @@ -81,7 +81,7 @@ enum DozerTask // These enums are saved in the game save file, so DO NOT renumbe // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum DozerDockPoint // These enums are saved in the game save file, so DO NOT renumber them. jba. +enum DozerDockPoint CPP_11(: int) // These enums are saved in the game save file, so DO NOT renumber them. jba. { DOZER_DOCK_POINT_START = 0, DOZER_DOCK_POINT_ACTION = 1, @@ -91,7 +91,7 @@ enum DozerDockPoint // These enums are saved in the game save file, so DO NOT r // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum DozerBuildSubTask // These enums are saved in the game save file, so DO NOT renumber them. jba. +enum DozerBuildSubTask CPP_11(: int) // These enums are saved in the game save file, so DO NOT renumber them. jba. { DOZER_SELECT_BUILD_DOCK_LOCATION = 0, DOZER_MOVING_TO_BUILD_DOCK_LOCATION = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireWeaponPower.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireWeaponPower.h index e15c567d82..919d260fc3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireWeaponPower.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FireWeaponPower.h @@ -52,7 +52,7 @@ class Object; class SpecialPowerTemplate; struct FieldParse; -enum ScienceType; +enum ScienceType CPP_11(: int); class FireWeaponPowerModuleData : public SpecialPowerModuleData { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h index 9809365687..a5ddfc2c6d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/FlammableUpdate.h @@ -39,7 +39,7 @@ //------------------------------------------------------------------------------------------------- -enum FlammabilityStatusType +enum FlammabilityStatusType CPP_11(: int) { // These show the state I last noticed my object was in. FS_NORMAL = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h index 7562269c22..9f616ecbe9 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h @@ -44,7 +44,7 @@ class UpgradeTemplate; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -enum HordeActionType +enum HordeActionType CPP_11(: int) { HORDEACTION_HORDE = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/LaserUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/LaserUpdate.h index cbc70f1c40..5267064760 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/LaserUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/LaserUpdate.h @@ -39,7 +39,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Thing; class Vector3; -enum ParticleSystemID; +enum ParticleSystemID CPP_11(: int); //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MaxHealthUpgrade.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MaxHealthUpgrade.h index 9baf1771b7..b11a312f57 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MaxHealthUpgrade.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MaxHealthUpgrade.h @@ -37,7 +37,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Thing; -enum MaxHealthChangeType; +enum MaxHealthChangeType CPP_11(: int); // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h index 8b753cfc55..4e8810cd39 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MissileAIUpdate.h @@ -38,7 +38,7 @@ #include "Common/INI.h" #include "WWMath/matrix3d.h" -enum ParticleSystemID; +enum ParticleSystemID CPP_11(: int); class FXList; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MobMemberSlavedUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MobMemberSlavedUpdate.h index 5a7b6291b2..fcb5edc759 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MobMemberSlavedUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/MobMemberSlavedUpdate.h @@ -43,7 +43,7 @@ #include "Common/INI.h" #include "GameLogic/Module/UpdateModule.h" class DamageInfo; -enum ModelConditionFlagType; +enum ModelConditionFlagType CPP_11(: int); //------------------------------------------------------------------------------------------------- class MobMemberSlavedUpdateModuleData : public UpdateModuleData @@ -79,7 +79,7 @@ class MobMemberSlavedUpdateModuleData : public UpdateModuleData }; -enum MobStates +enum MobStates CPP_11(: int) { MOB_STATE_NONE, MOB_STATE_IDLE, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ModelConditionUpgrade.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ModelConditionUpgrade.h index c95a6066af..c909977b08 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ModelConditionUpgrade.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ModelConditionUpgrade.h @@ -34,7 +34,7 @@ #include "GameLogic/Module/UpgradeModule.h" -enum ModelConditionFlagType; +enum ModelConditionFlagType CPP_11(: int); //----------------------------------------------------------------------------- class ModelConditionUpgradeModuleData : public UpgradeModuleData { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileSlowDeathUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileSlowDeathUpdate.h index 2aea8e321f..a2110e71fb 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileSlowDeathUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileSlowDeathUpdate.h @@ -39,7 +39,7 @@ class FXList; // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum NeutronBlast +enum NeutronBlast CPP_11(: int) { NEUTRON_BLAST_1 = 0, NEUTRON_BLAST_2, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileUpdate.h index 3314c688be..9c0e3d1f16 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/NeutronMissileUpdate.h @@ -39,7 +39,7 @@ #include "Common/INI.h" #include "WWMath/matrix3d.h" -enum ParticleSystemID; +enum ParticleSystemID CPP_11(: int); class FXList; //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OCLSpecialPower.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OCLSpecialPower.h index 67bc738f94..37be96b250 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OCLSpecialPower.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/OCLSpecialPower.h @@ -39,7 +39,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class ObjectCreationList; -enum OCLCreateLocType +enum OCLCreateLocType CPP_11(: int) { CREATE_AT_EDGE_NEAR_SOURCE, CREATE_AT_EDGE_NEAR_TARGET, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h index 8e774295c9..d930e0917c 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/POWTruckAIUpdate.h @@ -56,7 +56,7 @@ class POWTruckAIUpdateModuleData : public AIUpdateModuleData // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ -enum POWTruckTask // Stored in save file, do not renumber. jba. +enum POWTruckTask CPP_11(: int) // Stored in save file, do not renumber. jba. { POW_TRUCK_TASK_WAITING = 0, ///< Waiting for something to do POW_TRUCK_TASK_FIND_TARGET = 1, ///< We need to search out a target to collect diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ParticleUplinkCannonUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ParticleUplinkCannonUpdate.h index 3a30fb1712..4b5aa97c23 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ParticleUplinkCannonUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ParticleUplinkCannonUpdate.h @@ -42,7 +42,7 @@ class SpecialPowerModule; class ParticleSystem; class FXList; class AudioEventRTS; -enum ParticleSystemID; +enum ParticleSystemID CPP_11(: int); #define MAX_OUTER_NODES 16 @@ -113,7 +113,7 @@ class ParticleUplinkCannonUpdateModuleData : public ModuleData }; -enum PUCStatus +enum PUCStatus CPP_11(: int) { STATUS_IDLE, STATUS_CHARGING, @@ -126,7 +126,7 @@ enum PUCStatus STATUS_PACKING, }; -enum LaserStatus +enum LaserStatus CPP_11(: int) { LASERSTATUS_NONE, LASERSTATUS_BORN, @@ -134,7 +134,7 @@ enum LaserStatus LASERSTATUS_DEAD, }; -enum IntensityTypes +enum IntensityTypes CPP_11(: int) { IT_LIGHT, IT_MEDIUM, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PhysicsUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PhysicsUpdate.h index f32d771028..3ef368bf29 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PhysicsUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/PhysicsUpdate.h @@ -37,9 +37,9 @@ #include "GameLogic/Module/UpdateModule.h" #include "GameLogic/Module/CollideModule.h" -enum ObjectID; +enum ObjectID CPP_11(: int); -enum PhysicsTurningType +enum PhysicsTurningType CPP_11(: int) { TURN_NEGATIVE = -1, TURN_NONE = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ProductionUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ProductionUpdate.h index 34ead41764..6e1240949c 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ProductionUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ProductionUpdate.h @@ -43,12 +43,12 @@ class ThingTemplate; class UpgradeTemplate; /////////////////////////////////////////////////////////////////////////////////////////////////// -enum ProductionID +enum ProductionID CPP_11(: int) { PRODUCTIONID_INVALID = 0 }; -enum ProductionType +enum ProductionType CPP_11(: int) { PRODUCTION_INVALID = 0, PRODUCTION_UNIT, @@ -141,7 +141,7 @@ class ProductionUpdateModuleData : public UpdateModuleData }; //------------------------------------------------------------------------------------------------- -enum CanMakeType; +enum CanMakeType CPP_11(: int); // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RiderChangeContain.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RiderChangeContain.h index 8f71366514..64cde50314 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RiderChangeContain.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/RiderChangeContain.h @@ -37,9 +37,9 @@ #define MAX_RIDERS 8 //***NOTE: If you change this, make sure you update the parsing section! -enum WeaponSetType; -enum ObjectStatusType; -enum LocomotorSetType; +enum WeaponSetType CPP_11(: int); +enum ObjectStatusType CPP_11(: int); +enum LocomotorSetType CPP_11(: int); struct RiderInfo { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlavedUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlavedUpdate.h index e67ccba7cf..4d4cd32023 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlavedUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlavedUpdate.h @@ -40,7 +40,7 @@ const Int SLAVED_UPDATE_RATE = LOGICFRAMES_PER_SECOND/4; ///< This is a low prio #include "Common/INI.h" #include "GameLogic/Module/UpdateModule.h" class DamageInfo; -enum ModelConditionFlagType; +enum ModelConditionFlagType CPP_11(: int); //------------------------------------------------------------------------------------------------- class SlavedUpdateModuleData : public UpdateModuleData @@ -123,7 +123,7 @@ class SlavedUpdateModuleData : public UpdateModuleData } }; -enum RepairStates +enum RepairStates CPP_11(: int) { REPAIRSTATE_NONE, REPAIRSTATE_UNPACKING, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlowDeathBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlowDeathBehavior.h index d39fd21fcc..2ab77f4ef7 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlowDeathBehavior.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SlowDeathBehavior.h @@ -48,7 +48,7 @@ typedef std::vector OCLVec; typedef std::vector WeaponTemplateVec; //------------------------------------------------------------------------------------------------- -enum SlowDeathPhaseType +enum SlowDeathPhaseType CPP_11(: int) { SDPHASE_INITIAL = 0, SDPHASE_MIDPOINT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpawnBehavior.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpawnBehavior.h index d6666a61cc..e0180fe202 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpawnBehavior.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpawnBehavior.h @@ -44,7 +44,7 @@ const Int SPAWN_UPDATE_RATE = LOGICFRAMES_PER_SECOND/2; ///< This is a low prior //------------------------------------------------------------------------------------------------- class ThingTemplate; -enum CanAttackResult; +enum CanAttackResult CPP_11(: int); //------------------------------------------------------------------------------------------------- class SpawnBehaviorModuleData : public BehaviorModuleData diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h index ebc3da4072..289164d08f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h @@ -42,7 +42,7 @@ class DamageInfo; class SpecialPowerTemplate; class SpecialPowerModule; class FXList; -enum SpecialPowerType; +enum SpecialPowerType CPP_11(: int); #define SPECIAL_ABILITY_HUGE_DISTANCE 10000000.0f diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipDeploymentUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipDeploymentUpdate.h index 03c07aa915..f962996e0f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipDeploymentUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipDeploymentUpdate.h @@ -41,15 +41,15 @@ class SpecialPowerModule; class ParticleSystem; class FXList; class AudioEventRTS; -enum ParticleSystemID; -enum ScienceType; +enum ParticleSystemID CPP_11(: int); +enum ScienceType CPP_11(: int); //#define MAX_OUTER_NODES 16 //#define PUCK -enum GunshipCreateLocType +enum GunshipCreateLocType CPP_11(: int) { CREATE_GUNSHIP_AT_EDGE_NEAR_SOURCE, CREATE_GUNSHIP_AT_EDGE_FARTHEST_FROM_SOURCE, @@ -88,7 +88,7 @@ class SpectreGunshipDeploymentUpdateModuleData : public ModuleData }; -enum GunshipDeployStatus +enum GunshipDeployStatus CPP_11(: int) { GUNSHIPDEPLOY_STATUS_INSERTING, GUNSHIPDEPLOY_STATUS_ORBITING, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipUpdate.h index 4d6ec6c259..966f0dafa3 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpectreGunshipUpdate.h @@ -41,7 +41,7 @@ class SpecialPowerModule; class ParticleSystem; class FXList; class AudioEventRTS; -enum ParticleSystemID; +enum ParticleSystemID CPP_11(: int); //#define MAX_OUTER_NODES 16 //#define TRACKERS @@ -79,7 +79,7 @@ class SpectreGunshipUpdateModuleData : public ModuleData }; -enum GunshipStatus +enum GunshipStatus CPP_11(: int) { GUNSHIP_STATUS_INSERTING, GUNSHIP_STATUS_ORBITING, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h index 20194d5a29..73b0f1d2d8 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StealthUpdate.h @@ -37,8 +37,8 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Thing; -enum StealthLookType; -enum EvaMessage; +enum StealthLookType CPP_11(: int); +enum EvaMessage CPP_11(: int); class FXList; enum diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureCollapseUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureCollapseUpdate.h index a80c9a6b56..b5838c4a9f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureCollapseUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureCollapseUpdate.h @@ -46,7 +46,7 @@ typedef std::vector FXVec; //------------------------------------------------------------------------------------------------- -enum StructureCollapsePhaseType +enum StructureCollapsePhaseType CPP_11(: int) { SCPHASE_INITIAL = 0, SCPHASE_DELAY, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h index a3a6dd14c2..e28b525831 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h @@ -64,7 +64,7 @@ struct AngleFXInfo typedef std::vector AngleFXInfoVector; //------------------------------------------------------------------------------------------------- -enum StructureTopplePhaseType +enum StructureTopplePhaseType CPP_11(: int) { STPHASE_INITIAL = 0, STPHASE_DELAY, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/TempWeaponBonusHelper.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/TempWeaponBonusHelper.h index ab6b4e2b5d..2cc92f0e1f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/TempWeaponBonusHelper.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/TempWeaponBonusHelper.h @@ -35,7 +35,7 @@ // INCLUDES /////////////////////////////////////////////////////////////////////////////////////// #include "GameLogic/Module/ObjectHelper.h" -enum WeaponBonusConditionType; +enum WeaponBonusConditionType CPP_11(: int); // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UpdateModule.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UpdateModule.h index 21b6e2085a..e02d903b1c 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UpdateModule.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UpdateModule.h @@ -62,10 +62,10 @@ class DamageInfo; class ParticleSystemTemplate; class CommandButton; class Waypoint; -enum CommandOption; +enum CommandOption CPP_11(: int); //------------------------------------------------------------------------------------------------- -enum UpdateSleepTime +enum UpdateSleepTime CPP_11(: int) { UPDATE_SLEEP_INVALID = 0, UPDATE_SLEEP_NONE = 1, @@ -82,7 +82,7 @@ enum UpdateSleepTime // in an efficient way while still maintaining order-dependency; you should // really never specify anything other than PHASE_NORMAL without very // careful deliberation. If you need to, talk it over with folks first. (srj) -enum SleepyUpdatePhase +enum SleepyUpdatePhase CPP_11(: int) { // reserve 2 bits for phase. this still leaves us 30 bits for frame counter, // which, at 30fps, will still run for ~414 days without overflowing... @@ -333,7 +333,7 @@ class DockUpdateInterface }; //------------------------------------------------------------------------------------------------- -enum ExitDoorType +enum ExitDoorType CPP_11(: int) { DOOR_1 = 0, DOOR_2 = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WeaponBonusUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WeaponBonusUpdate.h index 607b2a9ba5..747708edbe 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WeaponBonusUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/WeaponBonusUpdate.h @@ -60,7 +60,7 @@ //----------------------------------------------------------------------------- // FORWARD REFERENCES ///////////////////////////////////////////////////////// //----------------------------------------------------------------------------- -enum WeaponBonusConditionType; +enum WeaponBonusConditionType CPP_11(: int); //----------------------------------------------------------------------------- // TYPE DEFINES /////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h index 896e845ce5..e80998dccd 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h @@ -109,18 +109,18 @@ class TempWeaponBonusHelper; class ObjectWeaponStatusHelper; class ObjectDefectionHelper; -enum CommandSourceType; -enum HackerAttackMode; -enum NameKeyType; -enum SpecialPowerType; -enum WeaponBonusConditionType; -enum WeaponChoiceCriteria; -enum WeaponSetConditionType; -enum WeaponSetType; -enum ArmorSetType; -enum WeaponStatus; -enum RadarPriorityType; -enum CanAttackResult; +enum CommandSourceType CPP_11(: int); +enum HackerAttackMode CPP_11(: int); +enum NameKeyType CPP_11(: int); +enum SpecialPowerType CPP_11(: int); +enum WeaponBonusConditionType CPP_11(: int); +enum WeaponChoiceCriteria CPP_11(: int); +enum WeaponSetConditionType CPP_11(: int); +enum WeaponSetType CPP_11(: int); +enum ArmorSetType CPP_11(: int); +enum WeaponStatus CPP_11(: int); +enum RadarPriorityType CPP_11(: int); +enum CanAttackResult CPP_11(: int); // For ObjectStatusTypes #include "Common/ObjectStatusTypes.h" @@ -147,7 +147,7 @@ struct TTriggerInfo //---------------------------------------------------- -enum CrushSquishTestType +enum CrushSquishTestType CPP_11(: int) { TEST_CRUSH_ONLY, TEST_SQUISH_ONLY, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectIter.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectIter.h index 8faff0920a..5cba13e269 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectIter.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectIter.h @@ -39,7 +39,7 @@ class Object; //------------------------------------------------------------------------------------------- /** */ -enum IterOrderType +enum IterOrderType CPP_11(: int) { ITER_FASTEST, ///< iterate in arbitrary order ITER_SORTED_NEAR_TO_FAR, ///< iterate in nearest-to-farthest order (may be slower) diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectScriptStatusBits.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectScriptStatusBits.h index ae028a0491..f3cc5f49b0 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectScriptStatusBits.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ObjectScriptStatusBits.h @@ -33,7 +33,7 @@ //------------------------------------------------------------------------------------------------- /** Object status bits */ //------------------------------------------------------------------------------------------------- -enum ObjectScriptStatusBit +enum ObjectScriptStatusBit CPP_11(: int) { OBJECT_STATUS_SCRIPT_DISABLED = 0x01, ///< this object is disabled via script OBJECT_STATUS_SCRIPT_UNPOWERED = 0x02, ///< this object is unpowered via script diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h index 69fabd4822..2525eb3f39 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h @@ -96,10 +96,10 @@ class ThingTemplate; class GhostObject; class CommandButton; -enum CommandSourceType; +enum CommandSourceType CPP_11(: int); // ---------------------------------------------------------------------------------------------- -enum ValueOrThreat +enum ValueOrThreat CPP_11(: int) { VOT_CashValue = 1, VOT_ThreatValue, @@ -107,7 +107,7 @@ enum ValueOrThreat }; // ---------------------------------------------------------------------------------------------- -enum FindPositionFlags +enum FindPositionFlags CPP_11(: int) { FPF_NONE = 0x00000000, // no options, default behavior FPF_IGNORE_WATER = 0x00000001, // a position found underwater is ok @@ -150,7 +150,7 @@ struct FindPositionOptions //===================================== /** */ //===================================== -enum DistanceCalculationType +enum DistanceCalculationType CPP_11(: int) { FROM_CENTER_2D = 0, ///< measure from Object center in 2d. FROM_CENTER_3D = 1, ///< measure from Object center in 3d. diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScriptActions.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScriptActions.h index 0af9cec891..2749a5707f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScriptActions.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScriptActions.h @@ -37,7 +37,7 @@ class GameWindow; class Team; class View; -enum AudioAffect; +enum AudioAffect CPP_11(: int); //----------------------------------------------------------------------------- // ScriptActionsInterface diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/TerrainLogic.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/TerrainLogic.h index 98150831ab..a67cb8c0ee 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/TerrainLogic.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/TerrainLogic.h @@ -52,7 +52,7 @@ class Matrix3D; class WaterHandle; class Xfer; -enum WaypointID +enum WaypointID CPP_11(: int) { INVALID_WAYPOINT_ID = 0x7FFFFFFF }; diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/TurretAI.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/TurretAI.h index 5059da270b..75d5d0a225 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/TurretAI.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/TurretAI.h @@ -42,7 +42,7 @@ const Real DEFAULT_PITCH_RATE = 0.01f; * Each of these constants will be associated with an instance of a State class * in a given StateMachine. */ -enum TurretStateType +enum TurretStateType CPP_11(: int) { TURRETAI_IDLE, TURRETAI_IDLESCAN, @@ -248,7 +248,7 @@ class TurretAIData : public MemoryPoolObject EMPTY_DTOR(TurretAIData) //----------------------------------------------------------------------------------------------------- -enum TurretTargetType +enum TurretTargetType CPP_11(: int) { TARGET_NONE, TARGET_OBJECT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/VictoryConditions.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/VictoryConditions.h index adf3ae7bdf..902fe16468 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/VictoryConditions.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/VictoryConditions.h @@ -39,7 +39,7 @@ class Player; /* * bitfield for specifying which victory conditions will apply in multiplayer games */ -enum VictoryType +enum VictoryType CPP_11(: int) { VICTORY_NOBUILDINGS = 1, VICTORY_NOUNITS = 2, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Weapon.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Weapon.h index 20b2d829c1..2b3e6726c4 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Weapon.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Weapon.h @@ -50,13 +50,13 @@ class Weapon; class WeaponTemplate; class INI; class ParticleSystemTemplate; -enum NameKeyType; +enum NameKeyType CPP_11(: int); //------------------------------------------------------------------------------------------------- const Int NO_MAX_SHOTS_LIMIT = 0x7fffffff; //------------------------------------------------------------------------------------------------- -enum WeaponReloadType +enum WeaponReloadType CPP_11(: int) { AUTO_RELOAD, NO_RELOAD, @@ -74,7 +74,7 @@ static const char *TheWeaponReloadNames[] = #endif //------------------------------------------------------------------------------------------------- -enum WeaponPrefireType +enum WeaponPrefireType CPP_11(: int) { PREFIRE_PER_SHOT, ///< Use the prefire delay for every shot we make PREFIRE_PER_ATTACK, ///< Use the prefire delay each time we attack a new target @@ -94,7 +94,7 @@ static const char *TheWeaponPrefireNames[] = #endif //------------------------------------------------------------------------------------------------- -enum WeaponAntiMaskType +enum WeaponAntiMaskType CPP_11(: int) { WEAPON_ANTI_AIRBORNE_VEHICLE = 0x01, WEAPON_ANTI_GROUND = 0x02, @@ -107,7 +107,7 @@ enum WeaponAntiMaskType }; //------------------------------------------------------------------------------------------------- -enum WeaponAffectsMaskType +enum WeaponAffectsMaskType CPP_11(: int) { WEAPON_AFFECTS_SELF = 0x01, WEAPON_AFFECTS_ALLIES = 0x02, @@ -133,7 +133,7 @@ static const char *TheWeaponAffectsMaskNames[] = //#endif //------------------------------------------------------------------------------------------------- -enum WeaponCollideMaskType +enum WeaponCollideMaskType CPP_11(: int) { // all of these apply to *nontargeted* things that might just happen to get in the way... // the target can always be collided with, regardless of flags @@ -169,7 +169,7 @@ static const char *TheWeaponCollideMaskNames[] = // Note: these values are saved in save files, so you MUST NOT REMOVE OR CHANGE // existing values! // -enum WeaponBonusConditionType +enum WeaponBonusConditionType CPP_11(: int) { // The access and use of this enum has the bit shifting built in, so this is a 0,1,2,3,4,5 enum WEAPONBONUSCONDITION_INVALID = -1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSet.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSet.h index 802c3198df..0f2cebb228 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSet.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSet.h @@ -43,8 +43,8 @@ class Object; class Weapon; class WeaponTemplate; -enum CommandSourceType; -enum DamageType; +enum CommandSourceType CPP_11(: int); +enum DamageType CPP_11(: int); // for WeaponSetType. Part of detangling. #include "GameLogic/WeaponSetType.h" @@ -107,7 +107,7 @@ static const ModelConditionFlagType TheWeaponSetTypeToModelConditionTypeMap[WEAP #endif //------------------------------------------------------------------------------------------------- -enum WeaponSetConditionType +enum WeaponSetConditionType CPP_11(: int) { WSF_INVALID = -1, @@ -170,14 +170,14 @@ typedef std::vector WeaponTemplateSetVector; typedef SparseMatchFinder WeaponTemplateSetFinder; //------------------------------------------------------------------------------------------------- -enum WeaponChoiceCriteria +enum WeaponChoiceCriteria CPP_11(: int) { PREFER_MOST_DAMAGE, ///< choose the weapon that will do the most damage PREFER_LONGEST_RANGE ///< choose the weapon with the longest range (that will do nonzero damage) }; //------------------------------------------------------------------------------------------------- -enum WeaponLockType +enum WeaponLockType CPP_11(: int) { NOT_LOCKED, ///< Weapon is not locked LOCKED_TEMPORARILY, ///< Weapon is locked until clip is empty, or current "attack" state exits @@ -185,7 +185,7 @@ enum WeaponLockType }; //------------------------------------------------------------------------------------------------- -enum CanAttackResult +enum CanAttackResult CPP_11(: int) { //Worst scenario to best scenario -- These must be done this way now! ATTACKRESULT_NOT_POSSIBLE, //Can't possibly attack target. diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSetType.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSetType.h index 0cabef6b12..851a45ecd7 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSetType.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponSetType.h @@ -38,7 +38,7 @@ // IMPORTANT NOTE #2: if you add or modify this list, be sure to update TheWeaponSetNames, // *and* TheWeaponSetTypeToModelConditionTypeMap! // -enum WeaponSetType +enum WeaponSetType CPP_11(: int) { // The access and use of this enum has the bit shifting built in, so this is a 0,1,2,3,4,5 enum WEAPONSET_VETERAN = 0, diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponStatus.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponStatus.h index ab82393d85..637f64e538 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponStatus.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/WeaponStatus.h @@ -30,7 +30,7 @@ #ifndef __WEAPONSTATUS_H__ #define __WEAPONSTATUS_H__ -enum WeaponStatus +enum WeaponStatus CPP_11(: int) { READY_TO_FIRE, OUT_OF_AMMO, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/DisconnectManager.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/DisconnectManager.h index 1c083b9328..9a5c553b06 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/DisconnectManager.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/DisconnectManager.h @@ -32,7 +32,7 @@ #include "Lib/BaseType.h" //#include "GameNetwork/ConnectionManager.h" -enum DisconnectStateType { +enum DisconnectStateType CPP_11(: int) { DISCONNECTSTATETYPE_SCREENON, DISCONNECTSTATETYPE_SCREENOFF // DISCONNECTSTATETYPE_WAITINGFORPACKETROUTER diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/FirewallHelper.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/FirewallHelper.h index 240284d2a0..ff37b6c189 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/FirewallHelper.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/FirewallHelper.h @@ -69,7 +69,7 @@ struct SpareSocketStruct { UnsignedShort port; }; -enum FirewallDetectionState { +enum FirewallDetectionState CPP_11(: int) { DETECTIONSTATE_IDLE, DETECTIONSTATE_BEGIN, DETECTIONSTATE_TEST1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/FrameData.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/FrameData.h index 48ee8c6b9b..81bd6258f7 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/FrameData.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/FrameData.h @@ -31,7 +31,7 @@ #include "Lib/BaseType.h" #include "GameNetwork/NetCommandList.h" -enum FrameDataReturnType { +enum FrameDataReturnType CPP_11(: int) { FRAMEDATA_NOTREADY, FRAMEDATA_RESEND, FRAMEDATA_READY diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameInfo.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameInfo.h index 7568a31217..412dfb8f8e 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameInfo.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameInfo.h @@ -36,7 +36,7 @@ #include "GameNetwork/NetworkDefs.h" #include "GameNetwork/FirewallHelper.h" -enum SlotState +enum SlotState CPP_11(: int) { SLOT_OPEN, SLOT_CLOSED, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/LobbyUtils.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/LobbyUtils.h index 3cdd85cc62..b2116e2e11 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/LobbyUtils.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/LobbyUtils.h @@ -46,7 +46,7 @@ void ToggleGameListType( void ); void playerTemplateComboBoxTooltip(GameWindow *wndComboBox, WinInstanceData *instData, UnsignedInt mouse); void playerTemplateListBoxTooltip(GameWindow *wndListBox, WinInstanceData *instData, UnsignedInt mouse); -enum GameSortType +enum GameSortType CPP_11(: int) { GAMESORT_ALPHA_ASCENDING = 0, GAMESORT_ALPHA_DESCENDING, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerDefs.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerDefs.h index 289dfbc418..a858741532 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerDefs.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerDefs.h @@ -44,7 +44,7 @@ class PSPlayerStats; typedef std::set IgnoreList; typedef std::map SavedIgnoreMap; -enum RCItemType +enum RCItemType CPP_11(: int) { ITEM_BUDDY, ITEM_REQUEST, @@ -127,7 +127,7 @@ struct AsciiComparator typedef std::map PlayerInfoMap; -enum GameSpyColors { +enum GameSpyColors CPP_11(: int) { GSCOLOR_DEFAULT = 0, GSCOLOR_CURRENTROOM, GSCOLOR_ROOM, @@ -160,7 +160,7 @@ enum GameSpyColors { extern Color GameSpyColor[GSCOLOR_MAX]; -enum GameSpyBuddyStatus { +enum GameSpyBuddyStatus CPP_11(: int) { BUDDY_OFFLINE, BUDDY_ONLINE, BUDDY_LOBBY, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerThread.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerThread.h index ee45b41f44..009711d087 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerThread.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PeerThread.h @@ -34,7 +34,7 @@ #include "gamespy/peer/peer.h" #include "GameNetwork/NetworkDefs.h" -enum SerialAuthResult +enum SerialAuthResult CPP_11(: int) { SERIAL_NONEXISTENT, SERIAL_AUTHFAILED, @@ -176,7 +176,7 @@ class PeerRequest //------------------------------------------------------------------------- -enum DisconnectReason +enum DisconnectReason CPP_11(: int) { DISCONNECT_NICKTAKEN = 1, DISCONNECT_BADNICK, @@ -200,7 +200,7 @@ enum DisconnectReason DISCONNECT_MAX, }; -enum QMStatus +enum QMStatus CPP_11(: int) { QM_IDLE, QM_JOININGQMCHANNEL, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PersistentStorageDefs.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PersistentStorageDefs.h index a480f8a975..c5e77e7759 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PersistentStorageDefs.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpy/PersistentStorageDefs.h @@ -31,7 +31,7 @@ #ifndef __PERSISTENTSTORAGEDEFS_H__ #define __PERSISTENTSTORAGEDEFS_H__ -enum LocaleType +enum LocaleType CPP_11(: int) { LOC_UNKNOWN = 0, LOC_MIN = 1, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpyOverlay.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpyOverlay.h index d41f96a57a..7244145e58 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpyOverlay.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GameSpyOverlay.h @@ -44,7 +44,7 @@ void GSMessageBoxOkCancel(UnicodeString title, UnicodeString message, GameWinMsg void GSMessageBoxYesNo(UnicodeString title, UnicodeString message, GameWinMsgBoxFunc yesFunc, GameWinMsgBoxFunc noFunc); ///< Display a Message box with Yes/No buttons and track it void RaiseGSMessageBox( void ); ///< Bring GS message box to the foreground (if we transition screens while a message box is up) -enum GSOverlayType +enum GSOverlayType CPP_11(: int) { GSOVERLAY_PLAYERINFO, GSOVERLAY_MAPSELECT, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/LANAPICallbacks.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/LANAPICallbacks.h index 8372929104..fa732cf05d 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/LANAPICallbacks.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/LANAPICallbacks.h @@ -78,7 +78,7 @@ void updateGameOptions( void ); //Enum is used for the utility function so other windows do not need //to know about controls on LanGameOptions window. -enum PostToLanGameType{ SEND_GAME_OPTS = 0, +enum PostToLanGameType CPP_11(: int){ SEND_GAME_OPTS = 0, MAP_BACK, POST_TO_LAN_GAME_TYPE_COUNT }; //the utility function mentioned above diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/NAT.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/NAT.h index 5a010c5bbd..d48c6d778f 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/NAT.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/NAT.h @@ -39,7 +39,7 @@ class Transport; class GameSlot; -enum NATStateType { +enum NATStateType CPP_11(: int) { NATSTATE_IDLE, NATSTATE_DOCONNECTIONPATHS, NATSTATE_WAITFORSTATS, @@ -47,7 +47,7 @@ enum NATStateType { NATSTATE_FAILED }; -enum NATConnectionState { +enum NATConnectionState CPP_11(: int) { NATCONNECTIONSTATE_NOSTATE, NATCONNECTIONSTATE_WAITINGTOBEGIN, // NATCONNECTIONSTATE_NETGEARDELAY, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/NetworkDefs.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/NetworkDefs.h index 79fb7fce96..5e3035cd43 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/NetworkDefs.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/NetworkDefs.h @@ -45,7 +45,7 @@ extern Int FRAME_DATA_LENGTH; extern Int FRAMES_TO_KEEP; // This is the connection numbering: 1-8 are for players, 9 is a broadcast con. -enum ConnectionNumbers +enum ConnectionNumbers CPP_11(: int) { MAX_PLAYER = 7, // The index of the highest possible player number. This is 0 based, so the most players allowed in a game is MAX_PLAYER+1. NUM_CONNECTIONS @@ -112,7 +112,7 @@ struct DelayedTransportMessage /** * Message types */ -enum NetMessageFlag { +enum NetMessageFlag CPP_11(: int) { MSG_ACK = 1, MSG_NEEDACK = 2, MSG_SEQUENCED = 4, @@ -120,7 +120,7 @@ enum NetMessageFlag { }; typedef UnsignedByte NetMessageFlags; -enum NetCommandType { +enum NetCommandType CPP_11(: int) { NETCOMMANDTYPE_UNKNOWN = -1, NETCOMMANDTYPE_ACKBOTH = 0, NETCOMMANDTYPE_ACKSTAGE1, @@ -159,7 +159,7 @@ enum NetCommandType { NETCOMMANDTYPE_MAX }; -enum NetLocalStatus { +enum NetLocalStatus CPP_11(: int) { NETLOCALSTATUS_PREGAME = 0, NETLOCALSTATUS_INGAME, NETLOCALSTATUS_LEAVING, @@ -167,7 +167,7 @@ enum NetLocalStatus { NETLOCALSTATUS_POSTGAME }; -enum PlayerLeaveCode { +enum PlayerLeaveCode CPP_11(: int) { PLAYERLEAVECODE_CLIENT = 0, PLAYERLEAVECODE_LOCAL, PLAYERLEAVECODE_PACKETROUTER, diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/udp.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/udp.h index 4be29673c1..ab7436cd47 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/udp.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/udp.h @@ -74,7 +74,7 @@ class UDP public: // These defines specify a system independent way to // get error codes for socket services. - enum sockStat + enum sockStat CPP_11(: int) { OK = 0, // Everything's cool UNKNOWN = -1, // There was an error of unknown type diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp index 3ecfb04a78..6153466cc5 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp @@ -219,7 +219,7 @@ extern void DoResolutionDialog(); static Bool ignoreSelected = FALSE; WindowLayout *OptionsLayout = NULL; -enum Detail +enum Detail CPP_11(: int) { HIGHDETAIL = 0, MEDIUMDETAIL, @@ -1453,7 +1453,7 @@ void OptionsMenuInit( WindowLayout *layout, void *userData ) Color color = GameMakeColor(255,255,255,255); - enum AliasingMode + enum AliasingMode CPP_11(: int) { OFF = 0, LOW, diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupLadderSelect.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupLadderSelect.cpp index 3057171ab7..435aa115f7 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupLadderSelect.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupLadderSelect.cpp @@ -149,7 +149,7 @@ static void handleLadderSelection( Int ladderID ) } -enum PasswordMode +enum PasswordMode CPP_11(: int) { PASS_NONE, PASS_ENTRY, diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/PropagandaTowerBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/PropagandaTowerBehavior.cpp index 8b17f6bdf9..00183601d5 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/PropagandaTowerBehavior.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/PropagandaTowerBehavior.cpp @@ -52,7 +52,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// -enum ObjectID; +enum ObjectID CPP_11(: int); // ------------------------------------------------------------------------------------------------ /** This class is used to track objects as they exit our area of influence */ diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp index 19e2848423..3384d65c80 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp @@ -694,7 +694,7 @@ class ApplyRandomForceNugget : public ObjectCreationNugget EMPTY_DTOR(ApplyRandomForceNugget) //------------------------------------------------------------------------------------------------- -enum DebrisDisposition +enum DebrisDisposition CPP_11(: int) { LIKE_EXISTING = 0x00000001, ON_GROUND_ALIGNED = 0x00000002, diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp index fdcd48ee72..e4654b687b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp @@ -58,7 +58,7 @@ const Real BIGNUM = 99999.0f; #endif //------------------------------------------------------------------------------------------------- -enum ChinookAIStateType +enum ChinookAIStateType CPP_11(: int) { // note that these must be distinct (numerically) from AIStateType. ick. ChinookAIStateType_FIRST = 1000, diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp index 5524fee16a..4b9c8862cd 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp @@ -74,7 +74,7 @@ static const Real MIN_ACTION_TOLERANCE = 70.0f; //------------------------------------------------------------------------------------------------- /** Available Dozer actions */ //------------------------------------------------------------------------------------------------- -enum DozerActionType +enum DozerActionType CPP_11(: int) { DOZER_ACTION_PICK_ACTION_POS, ///< pick a location "around" the target to do our action DOZER_ACTION_MOVE_TO_ACTION_POS,///< move to our action pos we've picked diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index cf9886de26..1a11339e02 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -56,7 +56,7 @@ const Real BIGNUM = 99999.0f; #endif //------------------------------------------------------------------------------------------------- -enum TaxiType +enum TaxiType CPP_11(: int) { FROM_HANGAR, FROM_PARKING, @@ -64,7 +64,7 @@ enum TaxiType }; //------------------------------------------------------------------------------------------------- -enum JetAIStateType +enum JetAIStateType CPP_11(: int) { // note that these must be distinct (numerically) from AIStateType. ick. JETAISTATETYPE_FIRST = 1000, diff --git a/GeneralsMD/Code/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h b/GeneralsMD/Code/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h index 0e982e5977..c5ff39918b 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h @@ -28,7 +28,7 @@ class AudioEventRTS; enum { MAXPROVIDERS = 64 }; -enum PlayingAudioType +enum PlayingAudioType CPP_11(: int) { PAT_Sample, PAT_3DSample, @@ -36,14 +36,14 @@ enum PlayingAudioType PAT_INVALID }; -enum PlayingStatus +enum PlayingStatus CPP_11(: int) { PS_Playing, PS_Stopped, PS_Paused }; -enum PlayingWhich +enum PlayingWhich CPP_11(: int) { PW_Attack, PW_Sound, diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h index 9c775904c7..7f3151b559 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h @@ -62,7 +62,7 @@ class RenderObjClass; class Shadow; class TerrainTracksRenderObjClass; class HAnimClass; -enum GameLODLevel; +enum GameLODLevel CPP_11(: int); //------------------------------------------------------------------------------------------------- /** The default client update module */ //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DScienceModelDraw.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DScienceModelDraw.h index 6091822a7c..cb22479e49 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DScienceModelDraw.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DScienceModelDraw.h @@ -35,7 +35,7 @@ // INCLUDES /////////////////////////////////////////////////////////////////////////////////////// #include "W3DDevice/GameClient/Module/W3DModelDraw.h" -enum ScienceType; +enum ScienceType CPP_11(: int); //------------------------------------------------------------------------------------------------- class W3DScienceModelDrawModuleData : public W3DModelDrawModuleData diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DCustomScene.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DCustomScene.h index f9cbb08ad8..5c307f5439 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DCustomScene.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DCustomScene.h @@ -27,7 +27,7 @@ #ifndef __W3DCUSTOMSCENE_H_ #define __W3DCUSTOMSCENE_H_ -enum CustomScenePassModes +enum CustomScenePassModes CPP_11(: int) { SCENE_PASS_DEFAULT, SCENE_PASS_ALPHA_MASK diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DRoadBuffer.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DRoadBuffer.h index b85623a274..08a8542716 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DRoadBuffer.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DRoadBuffer.h @@ -103,7 +103,7 @@ struct TRoadSegInfo // The individual data for a road segment. enum {MAX_SEG_VERTEX=500, MAX_SEG_INDEX=2000}; -enum TCorner +enum TCorner CPP_11(: int) { SEGMENT, CURVE, diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DScene.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DScene.h index a685fe903c..e0156cd0a7 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DScene.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DScene.h @@ -49,7 +49,7 @@ class W3DDynamicLight; class LightClass; class Drawable; -enum CustomScenePassModes; +enum CustomScenePassModes CPP_11(: int); class MaterialPassClass; class W3DShroudMaterialPassClass; class W3DMaskMaterialPassClass; diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h index 0aad5043a7..794b135123 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h @@ -37,12 +37,12 @@ #define __W3DSHADERMANAGER_H_ #include "WW3D2/texture.h" -enum FilterTypes; -enum CustomScenePassModes; -enum StaticGameLODLevel; -enum ChipsetType; -enum CpuType; -enum GraphicsVenderID; +enum FilterTypes CPP_11(: int); +enum CustomScenePassModes CPP_11(: int); +enum StaticGameLODLevel CPP_11(: int); +enum ChipsetType CPP_11(: int); +enum CpuType CPP_11(: int); +enum GraphicsVenderID CPP_11(: int); class TextureClass; ///forward reference /** System for managing complex rendering settings which are either not handled by diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DTreeBuffer.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DTreeBuffer.h index 571a1ec04f..4d92e12b8a 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DTreeBuffer.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DTreeBuffer.h @@ -78,7 +78,7 @@ class W3DProjectedShadow; // Type Defines //----------------------------------------------------------------------------- -enum W3DToppleState +enum W3DToppleState CPP_11(: int) { TOPPLE_UPRIGHT = 0, TOPPLE_FALLING, diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DWaterTracks.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DWaterTracks.h index 4259f8e9ab..b6162b8cf2 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DWaterTracks.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DWaterTracks.h @@ -28,7 +28,7 @@ #ifndef __W3DWaterTracks_H_ #define __W3DWaterTracks_H_ -enum waveType; //forward reference +enum waveType CPP_11(: int); //forward reference /// Custom render object that draws animated tracks/waves on the water. /** diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp index cbf09f7a72..ea4d002f84 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp @@ -212,14 +212,14 @@ extern Real TheSkateDistOverride; #endif // flags that aren't read directly from INI, but set in response to various other situations -enum INIReadFlagsType +enum INIReadFlagsType CPP_11(: int) { ANIMS_COPIED_FROM_DEFAULT_STATE = 0, GOT_NONIDLE_ANIMS, GOT_IDLE_ANIMS, }; -enum ACBits +enum ACBits CPP_11(: int) { RANDOMIZE_START_FRAME = 0, START_FRAME_FIRST, @@ -1177,7 +1177,7 @@ const Vector3* W3DModelDrawModuleData::getAttachToDrawableBoneOffset(const Drawa #endif //------------------------------------------------------------------------------------------------- -enum ParseCondStateType +enum ParseCondStateType CPP_11(: int) { PARSE_NORMAL, PARSE_DEFAULT, @@ -1225,7 +1225,7 @@ void W3DModelDrawModuleData::buildFieldParse(MultiIniFieldParse& p) } //------------------------------------------------------------------------------------------------- -enum AnimParseType +enum AnimParseType CPP_11(: int) { ANIM_NORMAL, ANIM_IDLE diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp index 6be3483552..064f02425c 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp @@ -549,7 +549,7 @@ TextureClass *ground=NULL; #define TILE_HEIGHT 10.1f #define TILE_DIFFUSE 0x00b4b0a5 -enum BlendDirection +enum BlendDirection CPP_11(: int) { B_A, //visible on all sides B_R, //visible on right B_L, //visible on left diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp index 14f8203d94..3a2b30ce98 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp @@ -2905,7 +2905,7 @@ IDirect3DTexture8 *W3DShaderManager::getRenderTexture(void) return m_renderTexture; } -enum GraphicsVenderID +enum GraphicsVenderID CPP_11(: int) { DC_NVIDIA_VENDOR_ID = 0x10DE, DC_3DFX_VENDOR_ID = 0x121A, diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp index df259088ad..d765dab0b3 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp @@ -80,7 +80,7 @@ WaterTracksRenderSystem *TheWaterTracksRenderSystem=NULL; ///< singleton for tra static Bool pauseWaves=FALSE; -enum waveType +enum waveType CPP_11(: int) { WaveTypeFirst, WaveTypePond=WaveTypeFirst, From d89f254dcd357c57178bdd19d838cc43a0cca839 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 22:52:21 +0200 Subject: [PATCH 05/32] [ZH] Fix of missing forward declarations --- GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h | 1 + GeneralsMD/Code/GameEngine/Include/GameClient/View.h | 3 +++ GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h | 1 + .../Include/W3DDevice/GameClient/W3DBridgeBuffer.h | 2 ++ .../Include/W3DDevice/GameClient/W3DShaderManager.h | 1 + GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.h | 2 ++ GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.h | 1 + GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.h | 1 + 8 files changed, 12 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h index ef2f75ef47..dcea31afce 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Anim2D.h @@ -37,6 +37,7 @@ // FORWARD REFERENCES ///////////////////////////////////////////////////////////////////////////// class Image; +class Anim2DCollection; // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h b/GeneralsMD/Code/GameEngine/Include/GameClient/View.h index 59f6d1a44b..a4ed2c22ba 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/View.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/View.h @@ -50,6 +50,9 @@ class Thing; class Waypoint; class LookAtTranslator; +enum FilterModes CPP_11(: int); +enum FilterTypes CPP_11(: int); + // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h index 8b783d943d..bda2ba48f8 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h @@ -42,6 +42,7 @@ class Bridge; class Object; class Weapon; class PathfindZoneManager; +class PathfindCell; // How close is close enough when moving. diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DBridgeBuffer.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DBridgeBuffer.h index d14ddf76c6..b75413919b 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DBridgeBuffer.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DBridgeBuffer.h @@ -70,6 +70,8 @@ class W3DTerrainLogic; class W3DAssetManager; class SimpleSceneClass; +enum BodyDamageType CPP_11(: int); + //----------------------------------------------------------------------------- // Type Defines //----------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h index 794b135123..4294dad17c 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DShaderManager.h @@ -37,6 +37,7 @@ #define __W3DSHADERMANAGER_H_ #include "WW3D2/texture.h" +enum FilterModes CPP_11(: int); enum FilterTypes CPP_11(: int); enum CustomScenePassModes CPP_11(: int); enum StaticGameLODLevel CPP_11(: int); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.h index 8363d482e7..f34643e7dc 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.h @@ -84,6 +84,8 @@ class DX8PolygonRendererAttachClass; class DX8SkinFVFCategoryContainer; class GapFillerClass; +class MeshModelClass; + struct VertexFormatXYZNDUV2; /** diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.h index fe2b444b01..200ee2c58c 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.h @@ -67,6 +67,7 @@ class LoaderThreadClass; class TextureLoadTaskClass; class CubeTextureClass; class VolumeTextureClass; +class TextureClass; class TextureBaseClass : public RefCountClass { diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.h index b506281447..7a12148971 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.h @@ -51,6 +51,7 @@ class StringClass; struct IDirect3DTexture8; class TextureLoadTaskClass; +class TextureLoadTaskListClass; class TextureLoader { From 3c05bd8d242a6f903221c62efaf3f2df084b830f Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:03:59 +0200 Subject: [PATCH 06/32] [ZH] Fix of missing includes --- GeneralsMD/Code/GameEngine/Include/Common/Debug.h | 2 ++ GeneralsMD/Code/GameEngine/Include/Common/simpleplayer.h | 1 + GeneralsMD/Code/GameEngine/Include/Common/urllaunch.h | 2 ++ GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h | 1 + .../Code/GameEngine/Source/Common/Audio/simpleplayer.cpp | 3 +++ GeneralsMD/Code/GameEngine/Source/Common/Audio/urllaunch.cpp | 2 ++ .../Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp | 1 + .../Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp | 1 + .../Source/GameNetwork/GameSpy/Thread/PeerThread.cpp | 1 + .../GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp | 1 + .../Source/GameNetwork/GameSpy/Thread/PingThread.cpp | 1 + .../Include/W3DDevice/GameClient/WorldHeightMap.h | 1 + GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/w3d_dep.cpp | 2 ++ GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwmemlog.h | 2 ++ GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/wwmouse.h | 1 + GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp | 1 + GeneralsMD/Code/Libraries/Source/debug/debug_debug.h | 2 ++ GeneralsMD/Code/Libraries/Source/profile/internal.h | 1 + GeneralsMD/Code/Libraries/Source/profile/internal_funclevel.h | 2 ++ GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h | 2 ++ GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h | 2 ++ 21 files changed, 32 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Debug.h b/GeneralsMD/Code/GameEngine/Include/Common/Debug.h index b33806d100..7303a122ba 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/Debug.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/Debug.h @@ -207,6 +207,8 @@ DEBUG_EXTERN_C void ReleaseCrashLocalized(const AsciiString& p, const AsciiStrin #ifdef DEBUG_PROFILE +#include + class SimpleProfiler { private: diff --git a/GeneralsMD/Code/GameEngine/Include/Common/simpleplayer.h b/GeneralsMD/Code/GameEngine/Include/Common/simpleplayer.h index d24cde7874..e5b3b18d31 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/simpleplayer.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/simpleplayer.h @@ -21,6 +21,7 @@ #define SIMPLEPLAYER_H #include "wmsdk.h" +#include // // we preserve a list of "ready-to-free" list of wave headers for the diff --git a/GeneralsMD/Code/GameEngine/Include/Common/urllaunch.h b/GeneralsMD/Code/GameEngine/Include/Common/urllaunch.h index 136b6d1412..c580ef6883 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/urllaunch.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/urllaunch.h @@ -20,6 +20,8 @@ #ifndef URLLAUNCH_H #define URLLAUNCH_H +#include + HRESULT MakeEscapedURL( LPWSTR pszInURL, LPWSTR *ppszOutURL ); HRESULT LaunchURL( LPCWSTR pszURL ); diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h b/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h index ff59fe6b7d..9a23f46143 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h +++ b/GeneralsMD/Code/GameEngine/Include/GameClient/KeyDefs.h @@ -63,6 +63,7 @@ #endif #include +#include // USER INCLUDES ////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Source/Common/Audio/simpleplayer.cpp b/GeneralsMD/Code/GameEngine/Source/Common/Audio/simpleplayer.cpp index 8d134cb56f..5b3a4e2d45 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/Audio/simpleplayer.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/Audio/simpleplayer.cpp @@ -19,6 +19,9 @@ #include "Common/simpleplayer.h" #include "Common/urllaunch.h" +#include "Common/Debug.h" +#include +#include /////////////////////////////////////////////////////////////////////////////// diff --git a/GeneralsMD/Code/GameEngine/Source/Common/Audio/urllaunch.cpp b/GeneralsMD/Code/GameEngine/Source/Common/Audio/urllaunch.cpp index 2abe264ee4..250cff65ac 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/Audio/urllaunch.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/Audio/urllaunch.cpp @@ -18,6 +18,8 @@ #include "Common/urllaunch.h" +#include +#include #define FILE_PREFIX L"file://" diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp index 3fbec0117c..9c96d15cdb 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp @@ -40,6 +40,7 @@ #include "mutex.h" #include "thread.h" +#include #ifdef _INTERNAL // for occasional debugging... diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp index a08f9535ff..bab1d5b800 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp @@ -33,6 +33,7 @@ #include "GameNetwork/GameSpy/GameResultsThread.h" #include "mutex.h" #include "thread.h" +#include #include "Common/StackDump.h" #include "Common/SubsystemInterface.h" diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp index bad4c6c738..0c9bb47f51 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp @@ -45,6 +45,7 @@ #include "strtok_r.h" #include "mutex.h" #include "thread.h" +#include #include "Common/MiniLog.h" diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp index cd11b9e1b2..6063b2a9c2 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp @@ -38,6 +38,7 @@ #include "mutex.h" #include "thread.h" +#include #include "Common/StackDump.h" #include "Common/SubsystemInterface.h" diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PingThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PingThread.cpp index 75ea0c1058..8eb5aafb6f 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PingThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PingThread.cpp @@ -33,6 +33,7 @@ #include "GameNetwork/GameSpy/PingThread.h" #include "mutex.h" #include "thread.h" +#include #include "Common/StackDump.h" #include "Common/SubsystemInterface.h" diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/WorldHeightMap.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/WorldHeightMap.h index 26e6fbd345..b18e60b9fc 100644 --- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/WorldHeightMap.h +++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/WorldHeightMap.h @@ -36,6 +36,7 @@ #include "WWLib/refcount.h" #include "WWMath/vector3.h" #include "W3DDevice/GameClient/TileData.h" +#include "W3DDevice/GameClient/TerrainTex.h" #include "../../GameEngine/Include/Common/MapObject.h" #include "Common/STLTypedefs.h" diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/w3d_dep.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/w3d_dep.cpp index 49279e03ce..a6730332be 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/w3d_dep.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/w3d_dep.cpp @@ -48,6 +48,8 @@ * Make_W3D_Filename -- Converts a W3D object name into a W3D filename. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +#include + //----------------------------------------------------------------------------- // srj sez: hack festival :-( class STLSpecialAlloc diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwmemlog.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwmemlog.h index 18f77b69f6..417f676173 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwmemlog.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwmemlog.h @@ -44,6 +44,8 @@ #ifndef WWMEMLOG_H #define WWMEMLOG_H +#include + #define LOG_MEMORY // Comment this out to disable memlog compiling in class MemLogClass; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/wwmouse.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/wwmouse.h index db04825eaf..ccb32602fa 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/wwmouse.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/wwmouse.h @@ -39,6 +39,7 @@ #include "win.h" #include "xmouse.h" +#include class BSurface; diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp index f0f1edd608..2ac7b9c910 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp @@ -31,6 +31,7 @@ #include #include #include // needed for placement new prototype +#include // a little dummy variable that makes the linker actually include // us... diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.h b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.h index 4fcb53f834..6b5045e1a0 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.h +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.h @@ -32,6 +32,8 @@ #ifndef DEBUG_DEBUG_H // Include guard #define DEBUG_DEBUG_H +#include + /** \class Debug debug.h diff --git a/GeneralsMD/Code/Libraries/Source/profile/internal.h b/GeneralsMD/Code/Libraries/Source/profile/internal.h index 439152214c..8035fb90c0 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/internal.h +++ b/GeneralsMD/Code/Libraries/Source/profile/internal.h @@ -37,6 +37,7 @@ #include "internal_highlevel.h" #include "internal_cmd.h" #include "internal_result.h" +#include #if !(defined(_MSC_VER) && _MSC_VER < 1300) #include diff --git a/GeneralsMD/Code/Libraries/Source/profile/internal_funclevel.h b/GeneralsMD/Code/Libraries/Source/profile/internal_funclevel.h index e9b6f2e3d7..48ada00122 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/internal_funclevel.h +++ b/GeneralsMD/Code/Libraries/Source/profile/internal_funclevel.h @@ -32,6 +32,8 @@ #ifndef INTERNAL_FUNCLEVEL_H // Include guard #define INTERNAL_FUNCLEVEL_H +#include + class ProfileFuncLevelTracer { friend class ProfileCmdInterface; diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h b/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h index 64ee9db4a2..0b0351d5c1 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h +++ b/GeneralsMD/Code/Libraries/Source/profile/profile_funclevel.h @@ -32,6 +32,8 @@ #ifndef PROFILE_FUNCLEVEL_H // Include guard #define PROFILE_FUNCLEVEL_H +#include + /** \brief The function level profiler. diff --git a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h index 4697ef5552..23a52bae72 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h +++ b/GeneralsMD/Code/Libraries/Source/profile/profile_highlevel.h @@ -32,6 +32,8 @@ #ifndef PROFILE_HIGHLEVEL_H // Include guard #define PROFILE_HIGHLEVEL_H +#include + /// \internal internal Id representation class ProfileId; From 1a37f9449aee7ea663924e7e5cd1b7a4313e88c2 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 17:14:03 +0100 Subject: [PATCH 07/32] [ZH] Fix of accesses to parent class members --- .../Libraries/Source/WWVegas/WW3D2/dllist.h | 2 +- .../Source/WWVegas/WW3D2/meshmdl.cpp | 6 +-- .../Source/WWVegas/WW3D2/prim_anim.h | 16 ++++---- .../Source/WWVegas/WWAudio/AudioEvents.h | 12 +++--- .../Source/WWVegas/WWAudio/PriorityVector.h | 10 ++--- .../Libraries/Source/WWVegas/WWLib/Point.h | 38 +++++++++---------- .../Libraries/Source/WWVegas/WWLib/Vector.H | 26 ++++++------- .../Source/WWVegas/WWLib/multilist.h | 10 ++--- .../Source/WWVegas/WWLib/simplevec.h | 30 +++++++-------- .../Libraries/Source/WWVegas/WWLib/timer.h | 32 ++++++++-------- GeneralsMD/Code/Tools/WW3D/pluglib/Vector.H | 20 +++++----- 11 files changed, 101 insertions(+), 101 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dllist.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dllist.h index 7a2b56cbad..d101e252f0 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dllist.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dllist.h @@ -78,7 +78,7 @@ class DLDestroyListClass : public DLListClass public: virtual ~DLDestroyListClass() { - while (T* t=Head()) { + while (T* t=this->Head()) { delete t; } } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp index 531552433c..9e3687fdab 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/meshmdl.cpp @@ -133,9 +133,9 @@ MeshModelClass & MeshModelClass::operator = (const MeshModelClass & that) *DefMatDesc = *(that.DefMatDesc); CurMatDesc = DefMatDesc; - if (AlternateMatDesc != NULL) { - delete AlternateMatDesc; - AlternateMatDesc = NULL; + if (this->AlternateMatDesc != NULL) { + delete this->AlternateMatDesc; + this->AlternateMatDesc = NULL; } if (that.AlternateMatDesc != NULL) { diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h index 861cb92868..8f73663fdc 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h @@ -354,11 +354,11 @@ LERPAnimationChannelClass::Evaluate (float time) // // Don't interpolate past the last keyframe // - if (time < m_Data[key_count - 1].Get_Time ()) { + if (time < this->m_Data[key_count - 1].Get_Time ()) { // Check to see if the last key index is valid - if (time < m_Data[m_LastIndex].Get_Time ()) { - m_LastIndex = 0; + if (time < this->m_Data[this->m_LastIndex].Get_Time ()) { + this->m_LastIndex = 0; } KeyClass *key1 = &m_Data[m_LastIndex]; @@ -367,12 +367,12 @@ LERPAnimationChannelClass::Evaluate (float time) // // Search, using last_key as our starting point // - for (int keyidx = m_LastIndex; keyidx < (key_count - 1); keyidx ++) { + for (int keyidx = this->m_LastIndex; keyidx < (key_count - 1); keyidx ++) { - if (time < m_Data[keyidx+1].Get_Time ()) { - key1 = &m_Data[keyidx]; - key2 = &m_Data[keyidx+1]; - m_LastIndex = keyidx; + if (time < this->m_Data[keyidx+1].Get_Time ()) { + key1 = &this->m_Data[keyidx]; + key2 = &this->m_Data[keyidx+1]; + this->m_LastIndex = keyidx; break; } } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/AudioEvents.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/AudioEvents.h index 2cb849cb29..b79a8636f4 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/AudioEvents.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/AudioEvents.h @@ -175,7 +175,7 @@ class AudioCallbackListClass : public SimpleDynVecClass< AUDIO_CALLBACK_STRUCT void AudioCallbackListClass::Add_Callback (T pointer, uint32 user_data) { - Add ( AUDIO_CALLBACK_STRUCT (pointer, user_data)); + this->Add ( AUDIO_CALLBACK_STRUCT (pointer, user_data)); return ; } @@ -187,10 +187,10 @@ template T AudioCallbackListClass::Get_Callback (int index, uint32 *user_data) { if (user_data != NULL) { - (*user_data) = Vector[index].user_data; + (*user_data) = this->Vector[index].user_data; } - return Vector[index].callback_ptr; + return this->Vector[index].callback_ptr; } ///////////////////////////////////////////////////////////////////////////////// @@ -199,9 +199,9 @@ AudioCallbackListClass::Get_Callback (int index, uint32 *user_data) template void AudioCallbackListClass::Remove_Callback (T pointer) { - for (int index = 0; index < ActiveCount; index ++) { - if (Vector[index].callback_ptr == pointer) { - Delete (index); + for (int index = 0; index < this->ActiveCount; index ++) { + if (this->Vector[index].callback_ptr == pointer) { + this->Delete (index); break; } } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/PriorityVector.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/PriorityVector.h index 392d8e8418..b64328d1e7 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/PriorityVector.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/PriorityVector.h @@ -69,18 +69,18 @@ template __inline bool PriorityVectorClass::Process_Head (T &object) { bool retval = false; - if (Vector != NULL) { + if (this->Vector != NULL) { // Pass the object back to the caller - object = Vector[0]; + object = this->Vector[0]; // // Move the head object to the end of the list // - for (int index = 1; index < ActiveCount; index ++) { - Vector[index - 1] = Vector[index]; + for (int index = 1; index < this->ActiveCount; index ++) { + this->Vector[index - 1] = this->Vector[index]; } - Vector[ActiveCount - 1] = object; + this->Vector[this->ActiveCount - 1] = object; // Success! retval = true; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Point.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Point.h index a6577f5624..1d62b10fea 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Point.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Point.h @@ -139,39 +139,39 @@ class TPoint3D : public TPoint2D { TPoint3D(BASECLASS const & rvalue) : TPoint2D(rvalue), Z(0) {} // Equality comparison operators. - bool operator == (TPoint3D const & rvalue) const {return(X==rvalue.X && Y==rvalue.Y && Z==rvalue.Z);} - bool operator != (TPoint3D const & rvalue) const {return(X!=rvalue.X || Y!=rvalue.Y || Z!=rvalue.Z);} + bool operator == (TPoint3D const & rvalue) const {return(this->X==rvalue.X && this->Y==rvalue.Y && Z==rvalue.Z);} + bool operator != (TPoint3D const & rvalue) const {return(this->X!=rvalue.X || this->Y!=rvalue.Y || Z!=rvalue.Z);} // Addition and subtraction operators. - TPoint3D const & operator += (TPoint3D const & rvalue) {X += rvalue.X;Y += rvalue.Y;Z += rvalue.Z;return(*this);} + TPoint3D const & operator += (TPoint3D const & rvalue) {this->X += rvalue.X;this->Y += rvalue.Y;Z += rvalue.Z;return(*this);} TPoint2D const & operator += (TPoint2D const & rvalue) {BASECLASS::operator += (rvalue);return(*this);} - TPoint3D const & operator -= (TPoint3D const & rvalue) {X -= rvalue.X;Y -= rvalue.Y;Z -= rvalue.Z;return(*this);} + TPoint3D const & operator -= (TPoint3D const & rvalue) {this->X -= rvalue.X;this->Y -= rvalue.Y;Z -= rvalue.Z;return(*this);} TPoint2D const & operator -= (TPoint2D const & rvalue) {BASECLASS::operator -= (rvalue);return(*this);} - TPoint3D const operator - (TPoint3D const & rvalue) const {return(TPoint3D(X - rvalue.X, Y - rvalue.Y, Z - rvalue.Z));} - TPoint3D const operator - (TPoint2D const & rvalue) const {return(TPoint3D(X - rvalue.X, Y - rvalue.Y, Z));} - TPoint3D const operator + (TPoint3D const & rvalue) const {return(TPoint3D(X + rvalue.X, Y + rvalue.Y, Z + rvalue.Z));} - TPoint3D const operator + (TPoint2D const & rvalue) const {return(TPoint3D(X + rvalue.X, Y + rvalue.Y, Z));} + TPoint3D const operator - (TPoint3D const & rvalue) const {return(TPoint3D(this->X - rvalue.X, this->Y - rvalue.Y, Z - rvalue.Z));} + TPoint3D const operator - (TPoint2D const & rvalue) const {return(TPoint3D(this->X - rvalue.X, this->Y - rvalue.Y, Z));} + TPoint3D const operator + (TPoint3D const & rvalue) const {return(TPoint3D(this->X + rvalue.X, this->Y + rvalue.Y, Z + rvalue.Z));} + TPoint3D const operator + (TPoint2D const & rvalue) const {return(TPoint3D(this->X + rvalue.X, this->Y + rvalue.Y, Z));} // Scalar multiplication and division. - TPoint3D const operator * (T rvalue) const {return(TPoint3D(X * rvalue, Y * rvalue, Z * rvalue));} - TPoint3D const & operator *= (T rvalue) {X *= rvalue;Y *= rvalue;Z *= rvalue;return(*this);} - TPoint3D const operator / (T rvalue) const {if (rvalue == T(0)) return(TPoint3D(0,0,0));return(TPoint3D(X / rvalue, Y / rvalue, Z / rvalue));} - TPoint3D const & operator /= (T rvalue) {if (rvalue != T(0)) {X /= rvalue;Y /= rvalue;Z /= rvalue;}return(*this);} + TPoint3D const operator * (T rvalue) const {return(TPoint3D(this->X * rvalue, this->Y * rvalue, Z * rvalue));} + TPoint3D const & operator *= (T rvalue) {this->X *= rvalue;this->Y *= rvalue;Z *= rvalue;return(*this);} + TPoint3D const operator / (T rvalue) const {if (rvalue == T(0)) return(TPoint3D(0,0,0));return(TPoint3D(this->X / rvalue, this->Y / rvalue, Z / rvalue));} + TPoint3D const & operator /= (T rvalue) {if (rvalue != T(0)) {this->X /= rvalue;this->Y /= rvalue;Z /= rvalue;}return(*this);} // Dot and cross product. - TPoint3D const operator * (TPoint3D const & rvalue) const {return(TPoint3D(X * rvalue.X, Y * rvalue.Y, Z * rvalue.Z));} - TPoint3D const Dot_Product(TPoint3D const & rvalue) const {return(TPoint3D(X * rvalue.X, Y * rvalue.Y, Z * rvalue.Z));} - TPoint3D const Cross_Product(TPoint3D const & rvalue) const {return TPoint3D(Y * rvalue.Z - Z * rvalue.Y, Z * rvalue.X - X * rvalue.Z, X * rvalue.Y - Y * rvalue.X);} + TPoint3D const operator * (TPoint3D const & rvalue) const {return(TPoint3D(this->X * rvalue.X, this->Y * rvalue.Y, Z * rvalue.Z));} + TPoint3D const Dot_Product(TPoint3D const & rvalue) const {return(TPoint3D(this->X * rvalue.X, this->Y * rvalue.Y, Z * rvalue.Z));} + TPoint3D const Cross_Product(TPoint3D const & rvalue) const {return TPoint3D(this->Y * rvalue.Z - Z * rvalue.Y, Z * rvalue.X - this->X * rvalue.Z, this->X * rvalue.Y - this->Y * rvalue.X);} // Negation operator -- simple and effective - TPoint3D const operator - (void) const {return(TPoint3D(-X, -Y, -Z));} + TPoint3D const operator - (void) const {return(TPoint3D(-this->X, -this->Y, -Z));} // Vector support functions. - T Length(void) const {return(T(sqrt(X*X + Y*Y + Z*Z)));} + T Length(void) const {return(T(sqrt(this->X*this->X + this->Y*this->Y + Z*Z)));} TPoint3D const Normalize(void) const { - double len = sqrt(X*X + Y*Y + Z*Z); + double len = sqrt(this->X*this->X + this->Y*this->Y + Z*Z); if (len != 0.0) { - return(TPoint3D(X / len, Y / len, Z / len)); + return(TPoint3D(this->X / len, this->Y / len, Z / len)); } else { return(*this); } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Vector.H b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Vector.H index 4e331d2a18..4c6615082f 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Vector.H +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/Vector.H @@ -622,7 +622,7 @@ template bool DynamicVectorClass::Resize(int newsize, T const * array) { if (VectorClass::Resize(newsize, array)) { - if (Length() < ActiveCount) ActiveCount = Length(); + if (this->Length() < ActiveCount) ActiveCount = this->Length(); return(true); } return(false); @@ -677,9 +677,9 @@ int DynamicVectorClass::ID(T const & object) template bool DynamicVectorClass::Add(T const & object) { - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. @@ -723,9 +723,9 @@ bool DynamicVectorClass::Add(T const & object) template bool DynamicVectorClass::Add_Head(T const & object) { - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. @@ -775,9 +775,9 @@ bool DynamicVectorClass::Insert(int index,T const & object) if (index < 0) return false; if (index > ActiveCount) return false; - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. @@ -898,7 +898,7 @@ bool DynamicVectorClass::Delete_Index(int index) template void DynamicVectorClass::Delete_All(void) { - int len = VectorMax; + int len = this->VectorMax; Clear(); // Forces destructor call on each object. Resize(len); } @@ -926,10 +926,10 @@ void DynamicVectorClass::Delete_All(void) template T * DynamicVectorClass::Uninitialized_Add(void) { - if (ActiveCount >= Length()) { + if (ActiveCount >= this->Length()) { // if ((IsAllocated || !VectorMax) && GrowthStep > 0) { if (GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/multilist.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/multilist.h index f0e3aebaa9..016a1f83be 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/multilist.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/multilist.h @@ -501,7 +501,7 @@ class PriorityMultiListIterator : public MultiListIterator public: PriorityMultiListIterator(MultiListClass *list) : OriginalHead (NULL), - MultiListIterator(list) { First (); } + MultiListIterator(list) { this->First (); } bool Process_Head (ObjectType **object) @@ -510,14 +510,14 @@ class PriorityMultiListIterator : public MultiListIterator // Check to ensure we don't wrap around the list (stop after iterating // the list once). - if (CurNode != NULL && CurNode->Object != NULL && OriginalHead != CurNode) { - OriginalHead = (OriginalHead == NULL) ? CurNode : OriginalHead; - (*object) = (ObjectType *)CurNode->Object; + if (this->CurNode != NULL && this->CurNode->Object != NULL && OriginalHead != this->CurNode) { + OriginalHead = (OriginalHead == NULL) ? this->CurNode : OriginalHead; + (*object) = (ObjectType *)this->CurNode->Object; // Remove the node from the head of the list and // add it to the tail of the list - Remove_Current_Object(); + this->Remove_Current_Object(); ((MultiListClass *)PriorityMultiListIterator::List)->Add_Tail ((*object)); retval = true; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/simplevec.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/simplevec.h index 064d84e713..4b9a0f818e 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/simplevec.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/simplevec.h @@ -77,8 +77,8 @@ template class SimpleVecClass SimpleVecClass(int size = 0); virtual ~SimpleVecClass(void); - T & operator[](int index) { assert(index < VectorMax); return(Vector[index]); } - T const & operator[](int index) const { assert(index < VectorMax); return(Vector[index]); } + T & operator[](int index) { assert(index < VectorMax); return(this->Vector[index]); } + T const & operator[](int index) const { assert(index < VectorMax); return(this->Vector[index]); } int Length(void) const { return VectorMax; } virtual bool Resize(int newsize); @@ -266,8 +266,8 @@ template class SimpleDynVecClass : public SimpleVecClass // Array-like access (does not grow) int Count(void) const { return(ActiveCount); } - T & operator[](int index) { assert(index < ActiveCount); return(Vector[index]); } - T const & operator[](int index) const { assert(index < ActiveCount); return(Vector[index]); } + T & operator[](int index) { assert(index < ActiveCount); return(this->Vector[index]); } + T const & operator[](int index) const { assert(index < ActiveCount); return(this->Vector[index]); } // Change maximum size of vector virtual bool Resize(int newsize); @@ -330,9 +330,9 @@ inline SimpleDynVecClass::SimpleDynVecClass(int size) : template inline SimpleDynVecClass::~SimpleDynVecClass(void) { - if (Vector != NULL) { - delete[] Vector; - Vector = NULL; + if (this->Vector != NULL) { + delete[] this->Vector; + this->Vector = NULL; } } @@ -353,7 +353,7 @@ template inline bool SimpleDynVecClass::Resize(int newsize) { if (SimpleVecClass::Resize(newsize)) { - if (Length() < ActiveCount) ActiveCount = Length(); + if (this->Length() < ActiveCount) ActiveCount = this->Length(); return(true); } return(false); @@ -375,7 +375,7 @@ inline bool SimpleDynVecClass::Resize(int newsize) template inline bool SimpleDynVecClass::Add(T const & object,int new_size_hint) { - if (ActiveCount >= VectorMax) { + if (ActiveCount >= this->VectorMax) { /* ** We are out of space so tell the vector to grow @@ -411,7 +411,7 @@ inline T * SimpleDynVecClass::Add_Multiple( int number_to_add ) int index = ActiveCount; ActiveCount += number_to_add; - if (ActiveCount >= VectorMax) { + if (ActiveCount >= this->VectorMax) { /* ** We are out of space so tell the vector to grow @@ -419,7 +419,7 @@ inline T * SimpleDynVecClass::Add_Multiple( int number_to_add ) Grow( ActiveCount ); } - return &Vector[index]; + return &(this->Vector[index]); } @@ -450,7 +450,7 @@ inline bool SimpleDynVecClass::Delete(int index,bool allow_shrink) ** cannot be used for classes that cannot be memcopied!! */ if (index < ActiveCount-1) { - memmove(&(Vector[index]),&(Vector[index+1]),(ActiveCount - index - 1) * sizeof(T)); + memmove(&(this->Vector[index]),&(this->Vector[index+1]),(ActiveCount - index - 1) * sizeof(T)); } ActiveCount--; @@ -519,7 +519,7 @@ inline bool SimpleDynVecClass::Delete_Range(int start,int count,bool allow_sh ** cannot be used for classes that cannot be memcopied!! */ if (start < ActiveCount - count) { - memmove(&(Vector[start]),&(Vector[start + count]),(ActiveCount - start - count) * sizeof(T)); + memmove(&(this->Vector[start]),&(this->Vector[start + count]),(ActiveCount - start - count) * sizeof(T)); } ActiveCount -= count; @@ -582,7 +582,7 @@ inline bool SimpleDynVecClass::Grow(int new_size_hint) ** Vector should grow to 25% bigger, grow at least 4 elements, ** and grow at least up to the user's new_size_hint */ - int new_size = MAX(Length() + Length()/4,Length() + 4); + int new_size = MAX(this->Length() + this->Length()/4,this->Length() + 4); new_size = MAX(new_size,new_size_hint); return Resize(new_size); @@ -608,7 +608,7 @@ inline bool SimpleDynVecClass::Shrink(void) /* ** Shrink the array if it is wasting more than 25% */ - if (ActiveCount < VectorMax/4) { + if (ActiveCount < this->VectorMax/4) { return Resize(ActiveCount); } return true; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/timer.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/timer.h index d54a90a319..86836c4fc0 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/timer.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/timer.h @@ -288,7 +288,7 @@ template inline int TTimerClass::Value(void) const { int value = Accumulated; - if (Started != -1) { + if (this->Started != -1) { value += BasicTimerClass::Value(); } return(value); @@ -316,7 +316,7 @@ template inline TTimerClass::operator int(void) const { int value = Accumulated; - if (Started != -1) { + if (this->Started != -1) { value += BasicTimerClass::Value(); } return(value); @@ -344,7 +344,7 @@ template inline int TTimerClass::operator () (void) const { int value = Accumulated; - if (Started != -1) { + if (this->Started != -1) { value += BasicTimerClass::Value(); } return(value); @@ -370,9 +370,9 @@ inline int TTimerClass::operator () (void) const template void TTimerClass::Stop(void) { - if (Started != -1) { + if (this->Started != -1) { Accumulated += BasicTimerClass::Value(); - Started = -1; + this->Started = -1; } } @@ -394,8 +394,8 @@ void TTimerClass::Stop(void) template void TTimerClass::Start(void) { - if (Started == -1) { - Started = Timer(); + if (this->Started == -1) { + this->Started = this->Timer(); } } @@ -419,7 +419,7 @@ void TTimerClass::Start(void) template inline bool TTimerClass::Is_Active(void) const { - return(Started != -1); + return(this->Started != -1); } @@ -537,7 +537,7 @@ template inline int CDTimerClass::Value(void) const { int remain = DelayTime; - if (Started != -1) { + if (this->Started != -1) { int value = BasicTimerClass::Value(); if (value < remain) { return(remain - value); @@ -569,7 +569,7 @@ template inline CDTimerClass::operator int(void) const { int remain = DelayTime; - if (Started != 0xFFFFFFFFU) { + if (this->Started != 0xFFFFFFFFU) { int value = BasicTimerClass::Value(); if (value < remain) { return(remain - value); @@ -601,7 +601,7 @@ template inline int CDTimerClass::operator () (void) const { int remain = DelayTime; - if (Started != -1) { + if (this->Started != -1) { int value = BasicTimerClass::Value(); if (value < remain) { return(remain - value); @@ -632,9 +632,9 @@ inline int CDTimerClass::operator () (void) const template void CDTimerClass::Stop(void) { - if (Started != -1) { + if (this->Started != -1) { DelayTime = *this; - Started = -1; + this->Started = -1; } } @@ -657,8 +657,8 @@ void CDTimerClass::Stop(void) template void CDTimerClass::Start(void) { - if (Started == -1) { - Started = Timer(); + if (this->Started == -1) { + this->Started = this->Timer(); } } @@ -682,7 +682,7 @@ void CDTimerClass::Start(void) template inline bool CDTimerClass::Is_Active(void) const { - return(Started != -1); + return(this->Started != -1); } diff --git a/GeneralsMD/Code/Tools/WW3D/pluglib/Vector.H b/GeneralsMD/Code/Tools/WW3D/pluglib/Vector.H index fe08a4be65..39d3f45f55 100644 --- a/GeneralsMD/Code/Tools/WW3D/pluglib/Vector.H +++ b/GeneralsMD/Code/Tools/WW3D/pluglib/Vector.H @@ -598,7 +598,7 @@ template bool DynamicVectorClass::Resize(int newsize, T const * array) { if (VectorClass::Resize(newsize, array)) { - if (Length() < ActiveCount) ActiveCount = Length(); + if (this->Length() < ActiveCount) ActiveCount = this->Length(); return(true); } return(false); @@ -653,9 +653,9 @@ int DynamicVectorClass::ID(T const & object) template bool DynamicVectorClass::Add(T const & object) { - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. @@ -699,9 +699,9 @@ bool DynamicVectorClass::Add(T const & object) template bool DynamicVectorClass::Add_Head(T const & object) { - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. @@ -819,9 +819,9 @@ bool DynamicVectorClass::Delete(int index) template T * DynamicVectorClass::Uninitialized_Add(void) { - if (ActiveCount >= Length()) { - if ((IsAllocated || !VectorMax) && GrowthStep > 0) { - if (!Resize(Length() + GrowthStep)) { + if (ActiveCount >= this->Length()) { + if ((this->IsAllocated || !this->VectorMax) && GrowthStep > 0) { + if (!Resize(this->Length() + GrowthStep)) { /* ** Failure to increase the size of the vector is an error condition. From 3d4c893c458a5b25801f9437fac013529995c346 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:14:35 +0200 Subject: [PATCH 08/32] [ZH] Fixes of template specializations --- GeneralsMD/Code/GameEngine/Source/Common/BitFlags.cpp | 4 ++-- .../Code/GameEngine/Source/Common/RTS/SpecialPower.cpp | 2 +- .../GameEngine/Source/Common/System/DisabledTypes.cpp | 2 +- .../Code/GameEngine/Source/Common/System/KindOf.cpp | 2 +- .../GameEngine/Source/Common/System/ObjectStatusTypes.cpp | 2 +- .../Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp | 2 +- .../Code/GameEngine/Source/GameLogic/System/Damage.cpp | 2 +- .../Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h | 2 ++ GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/int.cpp | 8 ++++---- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mempool.h | 2 +- 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/BitFlags.cpp b/GeneralsMD/Code/GameEngine/Source/Common/BitFlags.cpp index fad98759a8..c7f3f3352f 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/BitFlags.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/BitFlags.cpp @@ -37,7 +37,7 @@ #include "Common/ModelState.h" #include "GameLogic/ArmorSet.h" -const char* ModelConditionFlags::s_bitNameList[] = +template<> const char* ModelConditionFlags::s_bitNameList[] = { "TOPPLED", "FRONTCRUSHED", @@ -174,7 +174,7 @@ const char* ModelConditionFlags::s_bitNameList[] = NULL }; -const char* ArmorSetFlags::s_bitNameList[] = +template<> const char* ArmorSetFlags::s_bitNameList[] = { "VETERAN", "ELITE", diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/SpecialPower.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/SpecialPower.cpp index 53a59a0c93..4f0e59cf20 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/SpecialPower.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/SpecialPower.cpp @@ -53,7 +53,7 @@ SpecialPowerStore *TheSpecialPowerStore = NULL; /////////////////////////////////////////////////////////////////////////////////////////////////// // Externs //////////////////////////////////////////////////////////////////////////////////////// -const char* SpecialPowerMaskType::s_bitNameList[] = +template<> const char* SpecialPowerMaskType::s_bitNameList[] = { "SPECIAL_INVALID", diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/DisabledTypes.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/DisabledTypes.cpp index 65797c548b..0985d9f8ed 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/DisabledTypes.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/DisabledTypes.cpp @@ -30,7 +30,7 @@ #include "Common/DisabledTypes.h" #include "Common/BitFlagsIO.h" -const char* DisabledMaskType::s_bitNameList[] = +template<> const char* DisabledMaskType::s_bitNameList[] = { "DEFAULT", "DISABLED_HACKED", diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp index 47ef9795f9..18fe3db070 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp @@ -31,7 +31,7 @@ #include "Common/KindOf.h" #include "Common/BitFlagsIO.h" -const char* KindOfMaskType::s_bitNameList[] = +template<> const char* KindOfMaskType::s_bitNameList[] = { "OBSTACLE", "SELECTABLE", diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/ObjectStatusTypes.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/ObjectStatusTypes.cpp index 02a099b3fb..ca1249bb84 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/ObjectStatusTypes.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/ObjectStatusTypes.cpp @@ -32,7 +32,7 @@ #include "Common/ObjectStatusTypes.h" #include "Common/BitFlagsIO.h" -const char* ObjectStatusMaskType::s_bitNameList[] = +template<> const char* ObjectStatusMaskType::s_bitNameList[] = { "NONE", "DESTROYED", diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp index 771c8a87ef..0b539798bf 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/WeaponSet.cpp @@ -63,7 +63,7 @@ // PUBLIC DATA //////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// -const char* WeaponSetFlags::s_bitNameList[] = +template<> const char* WeaponSetFlags::s_bitNameList[] = { "VETERAN", "ELITE", diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/Damage.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/Damage.cpp index 6012a3361e..55d23078f3 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/Damage.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/Damage.cpp @@ -39,7 +39,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// -const char* DamageTypeFlags::s_bitNameList[] = +template<> const char* DamageTypeFlags::s_bitNameList[] = { "EXPLOSION", "CRUSH", diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h index 5786b43314..94063ae106 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h @@ -193,6 +193,8 @@ class SoundSceneClass float distance2; }; + friend class AutoPoolClass; + typedef MultiListClass COLLECTED_SOUNDS; virtual void Collect_Audible_Sounds (Listener3DClass *listener, COLLECTED_SOUNDS &list); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/int.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/int.cpp index e4bd7f6e58..9e5fe09149 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/int.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/int.cpp @@ -39,10 +39,10 @@ #include "MPMATH.H" #include "rng.h" -int bignum::Error = 0; -bool bignum::Carry = false; -bool bignum::Borrow = false; -bignum bignum::Remainder; +template<> int bignum::Error = 0; +template<> bool bignum::Carry = false; +template<> bool bignum::Borrow = false; +template<> bignum bignum::Remainder = bignum(); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mempool.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mempool.h index 9b1c4e5902..74eeb07d21 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mempool.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mempool.h @@ -158,7 +158,7 @@ class AutoPoolClass ** the class. */ #define DEFINE_AUTO_POOL(T,BLOCKSIZE) \ -ObjectPoolClass AutoPoolClass::Allocator; +template<> ObjectPoolClass AutoPoolClass::Allocator = ObjectPoolClass(); /*********************************************************************************************** From 32c2234911ea9fccc8a93f577454c0a2a8d8aafb Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:19:07 +0200 Subject: [PATCH 09/32] [ZH] Removal of static keyword for enums --- .../Source/GameClient/MessageStream/GUICommandTranslator.cpp | 2 +- .../GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp | 2 +- .../Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp | 2 +- .../Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp | 2 +- .../GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/GUICommandTranslator.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/GUICommandTranslator.cpp index a1d656d9e7..354a371758 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/GUICommandTranslator.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/GUICommandTranslator.cpp @@ -54,7 +54,7 @@ #endif // PRIVATE //////////////////////////////////////////////////////////////////////////////////////// -static enum CommandStatus +enum CommandStatus { COMMAND_INCOMPLETE = 0, COMMAND_COMPLETE diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp index ccd835bfc7..83b195f47b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp @@ -52,7 +52,7 @@ LookAtTranslator *TheLookAtTranslator = NULL; -static enum +enum { DIR_UP = 0, DIR_DOWN, diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp index d1ef80fcbb..c22f8c660d 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp @@ -70,7 +70,7 @@ // PRIVATE DATA /////////////////////////////////////////////////////////////////////////////////// // Note: if you add more columns, you must modify the .wnd files and change the listbox properties (yuck!) -static enum { +enum { COLUMN_NAME = 0, COLUMN_MAP, COLUMN_LADDER, diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp index 9c96d15cdb..ae249e38fe 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cpp @@ -122,7 +122,7 @@ class BuddyThreadClass : public ThreadClass std::string m_nick, m_email, m_pass; }; -static enum CallbackType +enum CallbackType { CALLBACK_CONNECT, CALLBACK_ERROR, diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp index 0c9bb47f51..4872694d8a 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp @@ -514,7 +514,7 @@ Int PeerThreadClass::findServer( SBServer server ) return addServerToMap(server); } -static enum CallbackType +enum CallbackType { CALLBACK_CONNECT, CALLBACK_ERROR, From eaf937e6a314a4b272e8fc7eb5ac2901c131c7c4 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 16:23:24 +0100 Subject: [PATCH 10/32] [ZH] Fixed boolean redefinition --- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/bool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/bool.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/bool.h index 29b35a64d7..fec1294592 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/bool.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/bool.h @@ -50,7 +50,7 @@ #include "yvals.h" #define bool unsigned -#elif defined(_UNIX) +#elif defined(_UNIX) || defined(__GNUC__) /////#define bool unsigned From f5e72d95208ad9e20666f0e7a3057dfa4ac5becc Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:31:47 +0200 Subject: [PATCH 11/32] [ZH] Fix of non-static declarations with static definitions --- .../GUICallbacks/Menus/PopupPlayerInfo.cpp | 2 +- .../GUICallbacks/Menus/WOLBuddyOverlay.cpp | 2 +- .../GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp | 4 +-- .../GUI/GameWindowTransitionsStyles.cpp | 2 +- .../GameLogic/Object/PartitionManager.cpp | 32 +++++++++---------- .../GUI/GUICallbacks/W3DMainMenu.cpp | 2 +- .../Source/W3DDevice/GameClient/W3DView.cpp | 4 +-- .../GameClient/Water/W3DWaterTracks.cpp | 2 +- .../Source/WWVegas/WW3D2/missingtexture.cpp | 4 +-- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp index c86e3865a1..1e231672c8 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp @@ -1529,7 +1529,7 @@ WindowMsgHandledType GameSpyPlayerInfoOverlaySystem( GameWindow *window, Unsigne return MSG_HANDLED; }// GameSpyPlayerInfoOverlaySystem -static void messageBoxYes( void ) +void messageBoxYes( void ) { BuddyRequest breq; breq.buddyRequestType = BuddyRequest::BUDDYREQUEST_DELETEACCT; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLBuddyOverlay.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLBuddyOverlay.cpp index ff9afd41fd..fd6f29bb53 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLBuddyOverlay.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLBuddyOverlay.cpp @@ -347,7 +347,7 @@ WindowMsgHandledType BuddyControlSystem( GameWindow *window, UnsignedInt msg, } -static void insertChat( BuddyMessage msg ) +void insertChat( BuddyMessage msg ) { if (buddyControls.listboxChat) { diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp index a8490ad6c3..d0ae435a7b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLLobbyMenu.cpp @@ -865,7 +865,7 @@ static const char* getMessageString(Int t) /** refreshGameList The Bool is used to force refresh if the refresh button was hit.*/ //------------------------------------------------------------------------------------------------- -static void refreshGameList( Bool forceRefresh ) +void refreshGameList( Bool forceRefresh ) { Int refreshInterval = gameListRefreshInterval; @@ -888,7 +888,7 @@ static void refreshGameList( Bool forceRefresh ) /** refreshPlayerList The Bool is used to force refresh if the refresh button was hit.*/ //------------------------------------------------------------------------------------------------- -static void refreshPlayerList( Bool forceRefresh ) +void refreshPlayerList( Bool forceRefresh ) { Int refreshInterval = playerListRefreshInterval; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp index 3da8f36617..bae3221226 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GameWindowTransitionsStyles.cpp @@ -2174,7 +2174,7 @@ void PushButtonImageDrawThree(GameWindow *window, Int alpha ) } -static void drawTypeText( GameWindow *window, DisplayString *str) +void drawTypeText( GameWindow *window, DisplayString *str) { TextData *tData = (TextData *)window->winGetUserData(); Int textColor = window->winGetEnabledTextColor(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp index 7333506ac9..5b02bb3d76 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/PartitionManager.cpp @@ -337,14 +337,14 @@ inline Real maxReal(Real a, Real b) //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -static void hLineAddLooker(Int x1, Int x2, Int y, void *playerIndexVoid); -static void hLineRemoveLooker(Int x1, Int x2, Int y, void *playerIndexVoid); -static void hLineAddShrouder(Int x1, Int x2, Int y, void *playerIndexVoid); -static void hLineRemoveShrouder(Int x1, Int x2, Int y, void *playerIndexVoid); -static void hLineAddThreat(Int x1, Int x2, Int y, void *threatValueParms); -static void hLineRemoveThreat(Int x1, Int x2, Int y, void *threatValueParms); -static void hLineAddValue(Int x1, Int x2, Int y, void *threatValueParms); -static void hLineRemoveValue(Int x1, Int x2, Int y, void *threatValueParms); +void hLineAddLooker(Int x1, Int x2, Int y, void *playerIndexVoid); +void hLineRemoveLooker(Int x1, Int x2, Int y, void *playerIndexVoid); +void hLineAddShrouder(Int x1, Int x2, Int y, void *playerIndexVoid); +void hLineRemoveShrouder(Int x1, Int x2, Int y, void *playerIndexVoid); +void hLineAddThreat(Int x1, Int x2, Int y, void *threatValueParms); +void hLineRemoveThreat(Int x1, Int x2, Int y, void *threatValueParms); +void hLineAddValue(Int x1, Int x2, Int y, void *threatValueParms); +void hLineRemoveValue(Int x1, Int x2, Int y, void *threatValueParms); static void projectCoord3D(Coord3D *coord, const Coord3D *unitDir, Real dist); static void flipCoord3D(Coord3D *coord); @@ -5606,7 +5606,7 @@ static int cellValueProc(PartitionCell* cell, void* userData) } // ----------------------------------------------------------------------------- -static void hLineAddLooker(Int x1, Int x2, Int y, void *playerIndexVoid) +void hLineAddLooker(Int x1, Int x2, Int y, void *playerIndexVoid) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5623,7 +5623,7 @@ static void hLineAddLooker(Int x1, Int x2, Int y, void *playerIndexVoid) } // ----------------------------------------------------------------------------- -static void hLineRemoveLooker(Int x1, Int x2, Int y, void *playerIndexVoid) +void hLineRemoveLooker(Int x1, Int x2, Int y, void *playerIndexVoid) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5640,7 +5640,7 @@ static void hLineRemoveLooker(Int x1, Int x2, Int y, void *playerIndexVoid) } // ----------------------------------------------------------------------------- -static void hLineAddShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) +void hLineAddShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5657,7 +5657,7 @@ static void hLineAddShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) } // ----------------------------------------------------------------------------- -static void hLineRemoveShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) +void hLineRemoveShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5674,7 +5674,7 @@ static void hLineRemoveShrouder(Int x1, Int x2, Int y, void *playerIndexVoid) } // ----------------------------------------------------------------------------- -static void hLineAddThreat(Int x1, Int x2, Int y, void *threatValueParms) +void hLineAddThreat(Int x1, Int x2, Int y, void *threatValueParms) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5702,7 +5702,7 @@ static void hLineAddThreat(Int x1, Int x2, Int y, void *threatValueParms) } // ----------------------------------------------------------------------------- -static void hLineRemoveThreat(Int x1, Int x2, Int y, void *threatValueParms) +void hLineRemoveThreat(Int x1, Int x2, Int y, void *threatValueParms) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5730,7 +5730,7 @@ static void hLineRemoveThreat(Int x1, Int x2, Int y, void *threatValueParms) } // ----------------------------------------------------------------------------- -static void hLineAddValue(Int x1, Int x2, Int y, void *threatValueParms) +void hLineAddValue(Int x1, Int x2, Int y, void *threatValueParms) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; @@ -5758,7 +5758,7 @@ static void hLineAddValue(Int x1, Int x2, Int y, void *threatValueParms) } // ----------------------------------------------------------------------------- -static void hLineRemoveValue(Int x1, Int x2, Int y, void *threatValueParms) +void hLineRemoveValue(Int x1, Int x2, Int y, void *threatValueParms) { if (y < 0 || y >= ThePartitionManager->m_cellCountY || x1 >= ThePartitionManager->m_cellCountX || x2 < 0) return; diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp index d896161694..c060debdb5 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp @@ -778,7 +778,7 @@ void W3DMainMenuButtonDropShadowDraw( GameWindow *window, // drawButtonText ============================================================= /** Draw button text to the screen */ //============================================================================= -static void drawText( GameWindow *window, WinInstanceData *instData ) +void drawText( GameWindow *window, WinInstanceData *instData ) { ICoord2D origin, size, textPos; Int width, height; diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp index 906ebb2c1a..1e4e55997b 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp @@ -773,7 +773,7 @@ static void drawContainedDrawable( Object *obj, void *userData ) //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- -static void drawDrawableExtents( Drawable *draw, void *userData ) +void drawDrawableExtents( Drawable *draw, void *userData ) { UnsignedInt color = GameMakeColor( 0, 255, 0, 255 ); @@ -886,7 +886,7 @@ static void drawContainedAudioLocations( Object *obj, void *userData ) //------------------------------------------------------------------------------------------------- // Draw the location of audio objects in the world //------------------------------------------------------------------------------------------------- -static void drawAudioLocations( Drawable *draw, void *userData ) +void drawAudioLocations( Drawable *draw, void *userData ) { // draw audio for things that are contained by this Object *obj = draw->getObject(); diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp index d765dab0b3..3cff36f0e2 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp @@ -1102,7 +1102,7 @@ extern HWND ApplicationHWnd; //TODO: Fix editor so it actually draws the wave segment instead of line while editing //Could freeze all the water while editing? Or keep setting elapsed time on current segment. //Have to make it so seamless merge of segments at final position. -static void TestWaterUpdate(void) +void TestWaterUpdate(void) { static Int doInit=1; static WaterTracksObj *track=NULL,*track2=NULL; diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/missingtexture.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/missingtexture.cpp index 94bf2f82df..a18c881999 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/missingtexture.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/missingtexture.cpp @@ -162,7 +162,7 @@ void MissingTexture::_Deinit() _MissingTexture=0; } -static unsigned int missing_image_palette[]={ +unsigned int missing_image_palette[]={ 0x7F040204,0x7F048AC4,0x7F84829C,0x7FFC0204,0x7F0442AB,0x7FFCFE04,0x7F444244,0x7F0462FC, 0x7F84CEE4,0x7FC4C6CF,0x7F9CA6B2,0x7FC4E6F4,0x7F04FE04,0x7F4C82D4,0x7F2452A1,0x7F0442D4, 0x7F446AB0,0x7FA4A6B6,0x7F2C62C2,0x7FE4E6E9,0x7F646264,0x7F0402FC,0x7FC4D6E1,0x7F44B6DC, @@ -196,7 +196,7 @@ static unsigned int missing_image_palette[]={ 0x7FACDEEC,0x7F2CA6D4,0x7F0452E4,0x7FD4D6E4,0x7F849ED4,0x7FB4B6CC,0x7F4C7ACC,0x7FACC6FC, 0x7F9496B4,0x7F042AA4,0x7F1C62E4,0x7F74A6EC,0x7FE4EEFC,0x7F1C72FC,0x7FD4DEEC,0x7F2C5ABC}; -static unsigned int missing_image_pixels[]={ +unsigned int missing_image_pixels[]={ 0x03030303,0x03030303,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7, 0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7, 0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7,0xA7A7A7A7, From 862b45d51fbcd975eea4b1ba29ff8171ef4eda70 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:35:36 +0200 Subject: [PATCH 12/32] [ZH] Fix of function pointer catsts to void* --- .../Source/Common/System/FunctionLexicon.cpp | 498 +++++++++--------- .../Menus/SkirmishGameOptionsMenu.cpp | 2 +- .../Common/System/W3DFunctionLexicon.cpp | 104 ++-- .../Libraries/Source/debug/debug_debug.cpp | 4 +- 4 files changed, 304 insertions(+), 304 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/FunctionLexicon.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/FunctionLexicon.cpp index 2f6a9569dc..7384bdd04b 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/FunctionLexicon.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/FunctionLexicon.cpp @@ -63,8 +63,8 @@ extern WindowMsgHandledType ExtendedMessageBoxSystem( GameWindow *window, Unsign // game window draw table ----------------------------------------------------------------------- static FunctionLexicon::TableEntry gameWinDrawTable[] = { - { NAMEKEY_INVALID, "IMECandidateMainDraw", IMECandidateMainDraw }, - { NAMEKEY_INVALID, "IMECandidateTextAreaDraw", IMECandidateTextAreaDraw }, + { NAMEKEY_INVALID, "IMECandidateMainDraw", (void*)IMECandidateMainDraw }, + { NAMEKEY_INVALID, "IMECandidateTextAreaDraw", (void*)IMECandidateTextAreaDraw }, { NAMEKEY_INVALID, NULL, NULL } }; @@ -73,81 +73,81 @@ static FunctionLexicon::TableEntry gameWinSystemTable[] = { - { NAMEKEY_INVALID, "PassSelectedButtonsToParentSystem", PassSelectedButtonsToParentSystem }, - { NAMEKEY_INVALID, "PassMessagesToParentSystem", PassMessagesToParentSystem }, - - { NAMEKEY_INVALID, "GameWinDefaultSystem", GameWinDefaultSystem }, - { NAMEKEY_INVALID, "GadgetPushButtonSystem", GadgetPushButtonSystem }, - { NAMEKEY_INVALID, "GadgetCheckBoxSystem", GadgetCheckBoxSystem }, - { NAMEKEY_INVALID, "GadgetRadioButtonSystem", GadgetRadioButtonSystem }, - { NAMEKEY_INVALID, "GadgetTabControlSystem", GadgetTabControlSystem }, - { NAMEKEY_INVALID, "GadgetListBoxSystem", GadgetListBoxSystem }, - { NAMEKEY_INVALID, "GadgetComboBoxSystem", GadgetComboBoxSystem }, - { NAMEKEY_INVALID, "GadgetHorizontalSliderSystem", GadgetHorizontalSliderSystem }, - { NAMEKEY_INVALID, "GadgetVerticalSliderSystem", GadgetVerticalSliderSystem }, - { NAMEKEY_INVALID, "GadgetProgressBarSystem", GadgetProgressBarSystem }, - { NAMEKEY_INVALID, "GadgetStaticTextSystem", GadgetStaticTextSystem }, - { NAMEKEY_INVALID, "GadgetTextEntrySystem", GadgetTextEntrySystem }, - { NAMEKEY_INVALID, "MessageBoxSystem", MessageBoxSystem }, - { NAMEKEY_INVALID, "QuitMessageBoxSystem", QuitMessageBoxSystem }, - - { NAMEKEY_INVALID, "ExtendedMessageBoxSystem", ExtendedMessageBoxSystem }, - - { NAMEKEY_INVALID, "MOTDSystem", MOTDSystem }, - { NAMEKEY_INVALID, "MainMenuSystem", MainMenuSystem }, - { NAMEKEY_INVALID, "OptionsMenuSystem", OptionsMenuSystem }, - { NAMEKEY_INVALID, "SinglePlayerMenuSystem", SinglePlayerMenuSystem }, - { NAMEKEY_INVALID, "QuitMenuSystem", QuitMenuSystem }, - { NAMEKEY_INVALID, "MapSelectMenuSystem", MapSelectMenuSystem }, - { NAMEKEY_INVALID, "ReplayMenuSystem", ReplayMenuSystem }, - { NAMEKEY_INVALID, "CreditsMenuSystem", CreditsMenuSystem }, - { NAMEKEY_INVALID, "LanLobbyMenuSystem", LanLobbyMenuSystem }, - { NAMEKEY_INVALID, "LanGameOptionsMenuSystem", LanGameOptionsMenuSystem }, - { NAMEKEY_INVALID, "LanMapSelectMenuSystem", LanMapSelectMenuSystem }, - { NAMEKEY_INVALID, "SkirmishGameOptionsMenuSystem", SkirmishGameOptionsMenuSystem }, - { NAMEKEY_INVALID, "SkirmishMapSelectMenuSystem", SkirmishMapSelectMenuSystem }, - { NAMEKEY_INVALID, "ChallengeMenuSystem", ChallengeMenuSystem }, - { NAMEKEY_INVALID, "SaveLoadMenuSystem", SaveLoadMenuSystem }, - { NAMEKEY_INVALID, "PopupCommunicatorSystem", PopupCommunicatorSystem }, - { NAMEKEY_INVALID, "PopupBuddyNotificationSystem", PopupBuddyNotificationSystem }, - { NAMEKEY_INVALID, "PopupReplaySystem", PopupReplaySystem }, - { NAMEKEY_INVALID, "KeyboardOptionsMenuSystem", KeyboardOptionsMenuSystem }, - { NAMEKEY_INVALID, "WOLLadderScreenSystem", WOLLadderScreenSystem }, - { NAMEKEY_INVALID, "WOLLoginMenuSystem", WOLLoginMenuSystem }, - { NAMEKEY_INVALID, "WOLLocaleSelectSystem", WOLLocaleSelectSystem }, - { NAMEKEY_INVALID, "WOLLobbyMenuSystem", WOLLobbyMenuSystem }, - { NAMEKEY_INVALID, "WOLGameSetupMenuSystem", WOLGameSetupMenuSystem }, - { NAMEKEY_INVALID, "WOLMapSelectMenuSystem", WOLMapSelectMenuSystem }, - { NAMEKEY_INVALID, "WOLBuddyOverlaySystem", WOLBuddyOverlaySystem }, - { NAMEKEY_INVALID, "WOLBuddyOverlayRCMenuSystem", WOLBuddyOverlayRCMenuSystem }, - { NAMEKEY_INVALID, "RCGameDetailsMenuSystem", RCGameDetailsMenuSystem }, - { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlaySystem",GameSpyPlayerInfoOverlaySystem }, - { NAMEKEY_INVALID, "WOLMessageWindowSystem", WOLMessageWindowSystem }, - { NAMEKEY_INVALID, "WOLQuickMatchMenuSystem", WOLQuickMatchMenuSystem }, - { NAMEKEY_INVALID, "WOLWelcomeMenuSystem", WOLWelcomeMenuSystem }, - { NAMEKEY_INVALID, "WOLStatusMenuSystem", WOLStatusMenuSystem }, - { NAMEKEY_INVALID, "WOLQMScoreScreenSystem", WOLQMScoreScreenSystem }, - { NAMEKEY_INVALID, "WOLCustomScoreScreenSystem", WOLCustomScoreScreenSystem }, - { NAMEKEY_INVALID, "NetworkDirectConnectSystem", NetworkDirectConnectSystem }, - { NAMEKEY_INVALID, "PopupHostGameSystem", PopupHostGameSystem }, - { NAMEKEY_INVALID, "PopupJoinGameSystem", PopupJoinGameSystem }, - { NAMEKEY_INVALID, "PopupLadderSelectSystem", PopupLadderSelectSystem }, - { NAMEKEY_INVALID, "InGamePopupMessageSystem", InGamePopupMessageSystem }, - { NAMEKEY_INVALID, "ControlBarSystem", ControlBarSystem }, - { NAMEKEY_INVALID, "ControlBarObserverSystem", ControlBarObserverSystem }, - { NAMEKEY_INVALID, "IMECandidateWindowSystem", IMECandidateWindowSystem }, - { NAMEKEY_INVALID, "ReplayControlSystem", ReplayControlSystem }, - { NAMEKEY_INVALID, "InGameChatSystem", InGameChatSystem }, - { NAMEKEY_INVALID, "DisconnectControlSystem", DisconnectControlSystem }, - { NAMEKEY_INVALID, "DiplomacySystem", DiplomacySystem }, - { NAMEKEY_INVALID, "GeneralsExpPointsSystem", GeneralsExpPointsSystem }, - { NAMEKEY_INVALID, "DifficultySelectSystem", DifficultySelectSystem }, + { NAMEKEY_INVALID, "PassSelectedButtonsToParentSystem", (void*)PassSelectedButtonsToParentSystem }, + { NAMEKEY_INVALID, "PassMessagesToParentSystem", (void*)PassMessagesToParentSystem }, + + { NAMEKEY_INVALID, "GameWinDefaultSystem", (void*)GameWinDefaultSystem }, + { NAMEKEY_INVALID, "GadgetPushButtonSystem", (void*)GadgetPushButtonSystem }, + { NAMEKEY_INVALID, "GadgetCheckBoxSystem", (void*)GadgetCheckBoxSystem }, + { NAMEKEY_INVALID, "GadgetRadioButtonSystem", (void*)GadgetRadioButtonSystem }, + { NAMEKEY_INVALID, "GadgetTabControlSystem", (void*)GadgetTabControlSystem }, + { NAMEKEY_INVALID, "GadgetListBoxSystem", (void*)GadgetListBoxSystem }, + { NAMEKEY_INVALID, "GadgetComboBoxSystem", (void*)GadgetComboBoxSystem }, + { NAMEKEY_INVALID, "GadgetHorizontalSliderSystem", (void*)GadgetHorizontalSliderSystem }, + { NAMEKEY_INVALID, "GadgetVerticalSliderSystem", (void*)GadgetVerticalSliderSystem }, + { NAMEKEY_INVALID, "GadgetProgressBarSystem", (void*)GadgetProgressBarSystem }, + { NAMEKEY_INVALID, "GadgetStaticTextSystem", (void*)GadgetStaticTextSystem }, + { NAMEKEY_INVALID, "GadgetTextEntrySystem", (void*)GadgetTextEntrySystem }, + { NAMEKEY_INVALID, "MessageBoxSystem", (void*)MessageBoxSystem }, + { NAMEKEY_INVALID, "QuitMessageBoxSystem", (void*)QuitMessageBoxSystem }, + + { NAMEKEY_INVALID, "ExtendedMessageBoxSystem", (void*)ExtendedMessageBoxSystem }, + + { NAMEKEY_INVALID, "MOTDSystem", (void*)MOTDSystem }, + { NAMEKEY_INVALID, "MainMenuSystem", (void*)MainMenuSystem }, + { NAMEKEY_INVALID, "OptionsMenuSystem", (void*)OptionsMenuSystem }, + { NAMEKEY_INVALID, "SinglePlayerMenuSystem", (void*)SinglePlayerMenuSystem }, + { NAMEKEY_INVALID, "QuitMenuSystem", (void*)QuitMenuSystem }, + { NAMEKEY_INVALID, "MapSelectMenuSystem", (void*)MapSelectMenuSystem }, + { NAMEKEY_INVALID, "ReplayMenuSystem", (void*)ReplayMenuSystem }, + { NAMEKEY_INVALID, "CreditsMenuSystem", (void*)CreditsMenuSystem }, + { NAMEKEY_INVALID, "LanLobbyMenuSystem", (void*)LanLobbyMenuSystem }, + { NAMEKEY_INVALID, "LanGameOptionsMenuSystem", (void*)LanGameOptionsMenuSystem }, + { NAMEKEY_INVALID, "LanMapSelectMenuSystem", (void*)LanMapSelectMenuSystem }, + { NAMEKEY_INVALID, "SkirmishGameOptionsMenuSystem", (void*)SkirmishGameOptionsMenuSystem }, + { NAMEKEY_INVALID, "SkirmishMapSelectMenuSystem", (void*)SkirmishMapSelectMenuSystem }, + { NAMEKEY_INVALID, "ChallengeMenuSystem", (void*)ChallengeMenuSystem }, + { NAMEKEY_INVALID, "SaveLoadMenuSystem", (void*)SaveLoadMenuSystem }, + { NAMEKEY_INVALID, "PopupCommunicatorSystem", (void*)PopupCommunicatorSystem }, + { NAMEKEY_INVALID, "PopupBuddyNotificationSystem", (void*)PopupBuddyNotificationSystem }, + { NAMEKEY_INVALID, "PopupReplaySystem", (void*)PopupReplaySystem }, + { NAMEKEY_INVALID, "KeyboardOptionsMenuSystem", (void*)KeyboardOptionsMenuSystem }, + { NAMEKEY_INVALID, "WOLLadderScreenSystem", (void*)WOLLadderScreenSystem }, + { NAMEKEY_INVALID, "WOLLoginMenuSystem", (void*)WOLLoginMenuSystem }, + { NAMEKEY_INVALID, "WOLLocaleSelectSystem", (void*)WOLLocaleSelectSystem }, + { NAMEKEY_INVALID, "WOLLobbyMenuSystem", (void*)WOLLobbyMenuSystem }, + { NAMEKEY_INVALID, "WOLGameSetupMenuSystem", (void*)WOLGameSetupMenuSystem }, + { NAMEKEY_INVALID, "WOLMapSelectMenuSystem", (void*)WOLMapSelectMenuSystem }, + { NAMEKEY_INVALID, "WOLBuddyOverlaySystem", (void*)WOLBuddyOverlaySystem }, + { NAMEKEY_INVALID, "WOLBuddyOverlayRCMenuSystem", (void*)WOLBuddyOverlayRCMenuSystem }, + { NAMEKEY_INVALID, "RCGameDetailsMenuSystem", (void*)RCGameDetailsMenuSystem }, + { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlaySystem",(void*)GameSpyPlayerInfoOverlaySystem }, + { NAMEKEY_INVALID, "WOLMessageWindowSystem", (void*)WOLMessageWindowSystem }, + { NAMEKEY_INVALID, "WOLQuickMatchMenuSystem", (void*)WOLQuickMatchMenuSystem }, + { NAMEKEY_INVALID, "WOLWelcomeMenuSystem", (void*)WOLWelcomeMenuSystem }, + { NAMEKEY_INVALID, "WOLStatusMenuSystem", (void*)WOLStatusMenuSystem }, + { NAMEKEY_INVALID, "WOLQMScoreScreenSystem", (void*)WOLQMScoreScreenSystem }, + { NAMEKEY_INVALID, "WOLCustomScoreScreenSystem", (void*)WOLCustomScoreScreenSystem }, + { NAMEKEY_INVALID, "NetworkDirectConnectSystem", (void*)NetworkDirectConnectSystem }, + { NAMEKEY_INVALID, "PopupHostGameSystem", (void*)PopupHostGameSystem }, + { NAMEKEY_INVALID, "PopupJoinGameSystem", (void*)PopupJoinGameSystem }, + { NAMEKEY_INVALID, "PopupLadderSelectSystem", (void*)PopupLadderSelectSystem }, + { NAMEKEY_INVALID, "InGamePopupMessageSystem", (void*)InGamePopupMessageSystem }, + { NAMEKEY_INVALID, "ControlBarSystem", (void*)ControlBarSystem }, + { NAMEKEY_INVALID, "ControlBarObserverSystem", (void*)ControlBarObserverSystem }, + { NAMEKEY_INVALID, "IMECandidateWindowSystem", (void*)IMECandidateWindowSystem }, + { NAMEKEY_INVALID, "ReplayControlSystem", (void*)ReplayControlSystem }, + { NAMEKEY_INVALID, "InGameChatSystem", (void*)InGameChatSystem }, + { NAMEKEY_INVALID, "DisconnectControlSystem", (void*)DisconnectControlSystem }, + { NAMEKEY_INVALID, "DiplomacySystem", (void*)DiplomacySystem }, + { NAMEKEY_INVALID, "GeneralsExpPointsSystem", (void*)GeneralsExpPointsSystem }, + { NAMEKEY_INVALID, "DifficultySelectSystem", (void*)DifficultySelectSystem }, - { NAMEKEY_INVALID, "IdleWorkerSystem", IdleWorkerSystem }, - { NAMEKEY_INVALID, "EstablishConnectionsControlSystem", EstablishConnectionsControlSystem }, - { NAMEKEY_INVALID, "GameInfoWindowSystem", GameInfoWindowSystem }, - { NAMEKEY_INVALID, "ScoreScreenSystem", ScoreScreenSystem }, - { NAMEKEY_INVALID, "DownloadMenuSystem", DownloadMenuSystem }, + { NAMEKEY_INVALID, "IdleWorkerSystem", (void*)IdleWorkerSystem }, + { NAMEKEY_INVALID, "EstablishConnectionsControlSystem", (void*)EstablishConnectionsControlSystem }, + { NAMEKEY_INVALID, "GameInfoWindowSystem", (void*)GameInfoWindowSystem }, + { NAMEKEY_INVALID, "ScoreScreenSystem", (void*)ScoreScreenSystem }, + { NAMEKEY_INVALID, "DownloadMenuSystem", (void*)DownloadMenuSystem }, { NAMEKEY_INVALID, NULL, NULL } @@ -157,70 +157,70 @@ static FunctionLexicon::TableEntry gameWinSystemTable[] = static FunctionLexicon::TableEntry gameWinInputTable[] = { - { NAMEKEY_INVALID, "GameWinDefaultInput", GameWinDefaultInput }, - { NAMEKEY_INVALID, "GameWinBlockInput", GameWinBlockInput }, - { NAMEKEY_INVALID, "GadgetPushButtonInput", GadgetPushButtonInput }, - { NAMEKEY_INVALID, "GadgetCheckBoxInput", GadgetCheckBoxInput }, - { NAMEKEY_INVALID, "GadgetRadioButtonInput", GadgetRadioButtonInput }, - { NAMEKEY_INVALID, "GadgetTabControlInput", GadgetTabControlInput }, - { NAMEKEY_INVALID, "GadgetListBoxInput", GadgetListBoxInput }, - { NAMEKEY_INVALID, "GadgetListBoxMultiInput", GadgetListBoxMultiInput }, - { NAMEKEY_INVALID, "GadgetComboBoxInput", GadgetComboBoxInput }, - { NAMEKEY_INVALID, "GadgetHorizontalSliderInput", GadgetHorizontalSliderInput }, - { NAMEKEY_INVALID, "GadgetVerticalSliderInput", GadgetVerticalSliderInput }, - { NAMEKEY_INVALID, "GadgetStaticTextInput", GadgetStaticTextInput }, - { NAMEKEY_INVALID, "GadgetTextEntryInput", GadgetTextEntryInput }, - - { NAMEKEY_INVALID, "MainMenuInput", MainMenuInput }, - { NAMEKEY_INVALID, "MapSelectMenuInput", MapSelectMenuInput }, - { NAMEKEY_INVALID, "OptionsMenuInput", OptionsMenuInput }, - { NAMEKEY_INVALID, "SinglePlayerMenuInput", SinglePlayerMenuInput }, - { NAMEKEY_INVALID, "LanLobbyMenuInput", LanLobbyMenuInput }, - { NAMEKEY_INVALID, "ReplayMenuInput", ReplayMenuInput }, - { NAMEKEY_INVALID, "CreditsMenuInput", CreditsMenuInput }, - { NAMEKEY_INVALID, "KeyboardOptionsMenuInput", KeyboardOptionsMenuInput }, - { NAMEKEY_INVALID, "PopupCommunicatorInput", PopupCommunicatorInput }, - { NAMEKEY_INVALID, "LanGameOptionsMenuInput", LanGameOptionsMenuInput }, - { NAMEKEY_INVALID, "LanMapSelectMenuInput", LanMapSelectMenuInput }, - { NAMEKEY_INVALID, "SkirmishGameOptionsMenuInput", SkirmishGameOptionsMenuInput }, - { NAMEKEY_INVALID, "SkirmishMapSelectMenuInput", SkirmishMapSelectMenuInput }, - { NAMEKEY_INVALID, "ChallengeMenuInput", ChallengeMenuInput }, - { NAMEKEY_INVALID, "WOLLadderScreenInput", WOLLadderScreenInput }, - { NAMEKEY_INVALID, "WOLLoginMenuInput", WOLLoginMenuInput }, - { NAMEKEY_INVALID, "WOLLocaleSelectInput", WOLLocaleSelectInput }, - { NAMEKEY_INVALID, "WOLLobbyMenuInput", WOLLobbyMenuInput }, - { NAMEKEY_INVALID, "WOLGameSetupMenuInput", WOLGameSetupMenuInput }, - { NAMEKEY_INVALID, "WOLMapSelectMenuInput", WOLMapSelectMenuInput }, - { NAMEKEY_INVALID, "WOLBuddyOverlayInput", WOLBuddyOverlayInput }, - { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayInput", GameSpyPlayerInfoOverlayInput }, - { NAMEKEY_INVALID, "WOLMessageWindowInput", WOLMessageWindowInput }, - { NAMEKEY_INVALID, "WOLQuickMatchMenuInput", WOLQuickMatchMenuInput }, - { NAMEKEY_INVALID, "WOLWelcomeMenuInput", WOLWelcomeMenuInput }, - { NAMEKEY_INVALID, "WOLStatusMenuInput", WOLStatusMenuInput }, - { NAMEKEY_INVALID, "WOLQMScoreScreenInput", WOLQMScoreScreenInput }, - { NAMEKEY_INVALID, "WOLCustomScoreScreenInput", WOLCustomScoreScreenInput }, - { NAMEKEY_INVALID, "NetworkDirectConnectInput", NetworkDirectConnectInput }, - { NAMEKEY_INVALID, "PopupHostGameInput", PopupHostGameInput }, - { NAMEKEY_INVALID, "PopupJoinGameInput", PopupJoinGameInput }, - { NAMEKEY_INVALID, "PopupLadderSelectInput", PopupLadderSelectInput }, - { NAMEKEY_INVALID, "InGamePopupMessageInput", InGamePopupMessageInput }, - { NAMEKEY_INVALID, "ControlBarInput", ControlBarInput }, - { NAMEKEY_INVALID, "ReplayControlInput", ReplayControlInput }, - { NAMEKEY_INVALID, "InGameChatInput", InGameChatInput }, - { NAMEKEY_INVALID, "DisconnectControlInput", DisconnectControlInput }, - { NAMEKEY_INVALID, "DiplomacyInput", DiplomacyInput }, - { NAMEKEY_INVALID, "EstablishConnectionsControlInput", EstablishConnectionsControlInput }, - { NAMEKEY_INVALID, "LeftHUDInput", LeftHUDInput }, - { NAMEKEY_INVALID, "ScoreScreenInput", ScoreScreenInput }, - { NAMEKEY_INVALID, "SaveLoadMenuInput", SaveLoadMenuInput }, - { NAMEKEY_INVALID, "BeaconWindowInput", BeaconWindowInput }, - { NAMEKEY_INVALID, "DifficultySelectInput", DifficultySelectInput }, - { NAMEKEY_INVALID, "PopupReplayInput", PopupReplayInput }, - { NAMEKEY_INVALID, "GeneralsExpPointsInput", GeneralsExpPointsInput}, - - { NAMEKEY_INVALID, "DownloadMenuInput", DownloadMenuInput }, - - { NAMEKEY_INVALID, "IMECandidateWindowInput", IMECandidateWindowInput }, + { NAMEKEY_INVALID, "GameWinDefaultInput", (void*)GameWinDefaultInput }, + { NAMEKEY_INVALID, "GameWinBlockInput", (void*)GameWinBlockInput }, + { NAMEKEY_INVALID, "GadgetPushButtonInput", (void*)GadgetPushButtonInput }, + { NAMEKEY_INVALID, "GadgetCheckBoxInput", (void*)GadgetCheckBoxInput }, + { NAMEKEY_INVALID, "GadgetRadioButtonInput", (void*)GadgetRadioButtonInput }, + { NAMEKEY_INVALID, "GadgetTabControlInput", (void*)GadgetTabControlInput }, + { NAMEKEY_INVALID, "GadgetListBoxInput", (void*)GadgetListBoxInput }, + { NAMEKEY_INVALID, "GadgetListBoxMultiInput", (void*)GadgetListBoxMultiInput }, + { NAMEKEY_INVALID, "GadgetComboBoxInput", (void*)GadgetComboBoxInput }, + { NAMEKEY_INVALID, "GadgetHorizontalSliderInput", (void*)GadgetHorizontalSliderInput }, + { NAMEKEY_INVALID, "GadgetVerticalSliderInput", (void*)GadgetVerticalSliderInput }, + { NAMEKEY_INVALID, "GadgetStaticTextInput", (void*)GadgetStaticTextInput }, + { NAMEKEY_INVALID, "GadgetTextEntryInput", (void*)GadgetTextEntryInput }, + + { NAMEKEY_INVALID, "MainMenuInput", (void*)MainMenuInput }, + { NAMEKEY_INVALID, "MapSelectMenuInput", (void*)MapSelectMenuInput }, + { NAMEKEY_INVALID, "OptionsMenuInput", (void*)OptionsMenuInput }, + { NAMEKEY_INVALID, "SinglePlayerMenuInput", (void*)SinglePlayerMenuInput }, + { NAMEKEY_INVALID, "LanLobbyMenuInput", (void*)LanLobbyMenuInput }, + { NAMEKEY_INVALID, "ReplayMenuInput", (void*)ReplayMenuInput }, + { NAMEKEY_INVALID, "CreditsMenuInput", (void*)CreditsMenuInput }, + { NAMEKEY_INVALID, "KeyboardOptionsMenuInput", (void*)KeyboardOptionsMenuInput }, + { NAMEKEY_INVALID, "PopupCommunicatorInput", (void*)PopupCommunicatorInput }, + { NAMEKEY_INVALID, "LanGameOptionsMenuInput", (void*)LanGameOptionsMenuInput }, + { NAMEKEY_INVALID, "LanMapSelectMenuInput", (void*)LanMapSelectMenuInput }, + { NAMEKEY_INVALID, "SkirmishGameOptionsMenuInput", (void*)SkirmishGameOptionsMenuInput }, + { NAMEKEY_INVALID, "SkirmishMapSelectMenuInput", (void*)SkirmishMapSelectMenuInput }, + { NAMEKEY_INVALID, "ChallengeMenuInput", (void*)ChallengeMenuInput }, + { NAMEKEY_INVALID, "WOLLadderScreenInput", (void*)WOLLadderScreenInput }, + { NAMEKEY_INVALID, "WOLLoginMenuInput", (void*)WOLLoginMenuInput }, + { NAMEKEY_INVALID, "WOLLocaleSelectInput", (void*)WOLLocaleSelectInput }, + { NAMEKEY_INVALID, "WOLLobbyMenuInput", (void*)WOLLobbyMenuInput }, + { NAMEKEY_INVALID, "WOLGameSetupMenuInput", (void*)WOLGameSetupMenuInput }, + { NAMEKEY_INVALID, "WOLMapSelectMenuInput", (void*)WOLMapSelectMenuInput }, + { NAMEKEY_INVALID, "WOLBuddyOverlayInput", (void*)WOLBuddyOverlayInput }, + { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayInput", (void*)GameSpyPlayerInfoOverlayInput }, + { NAMEKEY_INVALID, "WOLMessageWindowInput", (void*)WOLMessageWindowInput }, + { NAMEKEY_INVALID, "WOLQuickMatchMenuInput", (void*)WOLQuickMatchMenuInput }, + { NAMEKEY_INVALID, "WOLWelcomeMenuInput", (void*)WOLWelcomeMenuInput }, + { NAMEKEY_INVALID, "WOLStatusMenuInput", (void*)WOLStatusMenuInput }, + { NAMEKEY_INVALID, "WOLQMScoreScreenInput", (void*)WOLQMScoreScreenInput }, + { NAMEKEY_INVALID, "WOLCustomScoreScreenInput", (void*)WOLCustomScoreScreenInput }, + { NAMEKEY_INVALID, "NetworkDirectConnectInput", (void*)NetworkDirectConnectInput }, + { NAMEKEY_INVALID, "PopupHostGameInput", (void*)PopupHostGameInput }, + { NAMEKEY_INVALID, "PopupJoinGameInput", (void*)PopupJoinGameInput }, + { NAMEKEY_INVALID, "PopupLadderSelectInput", (void*)PopupLadderSelectInput }, + { NAMEKEY_INVALID, "InGamePopupMessageInput", (void*)InGamePopupMessageInput }, + { NAMEKEY_INVALID, "ControlBarInput", (void*)ControlBarInput }, + { NAMEKEY_INVALID, "ReplayControlInput", (void*)ReplayControlInput }, + { NAMEKEY_INVALID, "InGameChatInput", (void*)InGameChatInput }, + { NAMEKEY_INVALID, "DisconnectControlInput", (void*)DisconnectControlInput }, + { NAMEKEY_INVALID, "DiplomacyInput", (void*)DiplomacyInput }, + { NAMEKEY_INVALID, "EstablishConnectionsControlInput", (void*)EstablishConnectionsControlInput }, + { NAMEKEY_INVALID, "LeftHUDInput", (void*)LeftHUDInput }, + { NAMEKEY_INVALID, "ScoreScreenInput", (void*)ScoreScreenInput }, + { NAMEKEY_INVALID, "SaveLoadMenuInput", (void*)SaveLoadMenuInput }, + { NAMEKEY_INVALID, "BeaconWindowInput", (void*)BeaconWindowInput }, + { NAMEKEY_INVALID, "DifficultySelectInput", (void*)DifficultySelectInput }, + { NAMEKEY_INVALID, "PopupReplayInput", (void*)PopupReplayInput }, + { NAMEKEY_INVALID, "GeneralsExpPointsInput", (void*)GeneralsExpPointsInput}, + + { NAMEKEY_INVALID, "DownloadMenuInput", (void*)DownloadMenuInput }, + + { NAMEKEY_INVALID, "IMECandidateWindowInput", (void*)IMECandidateWindowInput }, { NAMEKEY_INVALID, NULL, NULL } }; @@ -230,7 +230,7 @@ static FunctionLexicon::TableEntry gameWinTooltipTable[] = { - { NAMEKEY_INVALID, "GameWinDefaultTooltip", GameWinDefaultTooltip }, + { NAMEKEY_INVALID, "GameWinDefaultTooltip", (void*)GameWinDefaultTooltip }, { NAMEKEY_INVALID, NULL, NULL } @@ -240,49 +240,49 @@ static FunctionLexicon::TableEntry gameWinTooltipTable[] = static FunctionLexicon::TableEntry winLayoutInitTable[] = { - { NAMEKEY_INVALID, "MainMenuInit", MainMenuInit }, - { NAMEKEY_INVALID, "OptionsMenuInit", OptionsMenuInit }, - { NAMEKEY_INVALID, "SaveLoadMenuInit", SaveLoadMenuInit }, - { NAMEKEY_INVALID, "SaveLoadMenuFullScreenInit", SaveLoadMenuFullScreenInit }, - - { NAMEKEY_INVALID, "PopupCommunicatorInit", PopupCommunicatorInit }, - { NAMEKEY_INVALID, "KeyboardOptionsMenuInit", KeyboardOptionsMenuInit }, - { NAMEKEY_INVALID, "SinglePlayerMenuInit", SinglePlayerMenuInit }, - { NAMEKEY_INVALID, "MapSelectMenuInit", MapSelectMenuInit }, - { NAMEKEY_INVALID, "LanLobbyMenuInit", LanLobbyMenuInit }, - { NAMEKEY_INVALID, "ReplayMenuInit", ReplayMenuInit }, - { NAMEKEY_INVALID, "CreditsMenuInit", CreditsMenuInit }, - { NAMEKEY_INVALID, "LanGameOptionsMenuInit", LanGameOptionsMenuInit }, - { NAMEKEY_INVALID, "LanMapSelectMenuInit", LanMapSelectMenuInit }, - { NAMEKEY_INVALID, "SkirmishGameOptionsMenuInit", SkirmishGameOptionsMenuInit }, - { NAMEKEY_INVALID, "SkirmishMapSelectMenuInit", SkirmishMapSelectMenuInit }, - { NAMEKEY_INVALID, "ChallengeMenuInit", ChallengeMenuInit }, - { NAMEKEY_INVALID, "WOLLadderScreenInit", WOLLadderScreenInit }, - { NAMEKEY_INVALID, "WOLLoginMenuInit", WOLLoginMenuInit }, - { NAMEKEY_INVALID, "WOLLocaleSelectInit", WOLLocaleSelectInit }, - { NAMEKEY_INVALID, "WOLLobbyMenuInit", WOLLobbyMenuInit }, - { NAMEKEY_INVALID, "WOLGameSetupMenuInit", WOLGameSetupMenuInit }, - { NAMEKEY_INVALID, "WOLMapSelectMenuInit", WOLMapSelectMenuInit }, - { NAMEKEY_INVALID, "WOLBuddyOverlayInit", WOLBuddyOverlayInit }, - { NAMEKEY_INVALID, "WOLBuddyOverlayRCMenuInit", WOLBuddyOverlayRCMenuInit }, - { NAMEKEY_INVALID, "RCGameDetailsMenuInit", RCGameDetailsMenuInit }, - { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayInit", GameSpyPlayerInfoOverlayInit }, - { NAMEKEY_INVALID, "WOLMessageWindowInit", WOLMessageWindowInit }, - { NAMEKEY_INVALID, "WOLQuickMatchMenuInit", WOLQuickMatchMenuInit }, - { NAMEKEY_INVALID, "WOLWelcomeMenuInit", WOLWelcomeMenuInit }, - { NAMEKEY_INVALID, "WOLStatusMenuInit", WOLStatusMenuInit }, - { NAMEKEY_INVALID, "WOLQMScoreScreenInit", WOLQMScoreScreenInit }, - { NAMEKEY_INVALID, "WOLCustomScoreScreenInit", WOLCustomScoreScreenInit }, - { NAMEKEY_INVALID, "NetworkDirectConnectInit", NetworkDirectConnectInit }, - { NAMEKEY_INVALID, "PopupHostGameInit", PopupHostGameInit }, - { NAMEKEY_INVALID, "PopupJoinGameInit", PopupJoinGameInit }, - { NAMEKEY_INVALID, "PopupLadderSelectInit", PopupLadderSelectInit }, - { NAMEKEY_INVALID, "InGamePopupMessageInit", InGamePopupMessageInit }, - { NAMEKEY_INVALID, "GameInfoWindowInit", GameInfoWindowInit }, - { NAMEKEY_INVALID, "ScoreScreenInit", ScoreScreenInit }, - { NAMEKEY_INVALID, "DownloadMenuInit", DownloadMenuInit }, - { NAMEKEY_INVALID, "DifficultySelectInit", DifficultySelectInit }, - { NAMEKEY_INVALID, "PopupReplayInit", PopupReplayInit }, + { NAMEKEY_INVALID, "MainMenuInit", (void*)MainMenuInit }, + { NAMEKEY_INVALID, "OptionsMenuInit", (void*)OptionsMenuInit }, + { NAMEKEY_INVALID, "SaveLoadMenuInit", (void*)SaveLoadMenuInit }, + { NAMEKEY_INVALID, "SaveLoadMenuFullScreenInit", (void*)SaveLoadMenuFullScreenInit }, + + { NAMEKEY_INVALID, "PopupCommunicatorInit", (void*)PopupCommunicatorInit }, + { NAMEKEY_INVALID, "KeyboardOptionsMenuInit", (void*)KeyboardOptionsMenuInit }, + { NAMEKEY_INVALID, "SinglePlayerMenuInit", (void*)SinglePlayerMenuInit }, + { NAMEKEY_INVALID, "MapSelectMenuInit", (void*)MapSelectMenuInit }, + { NAMEKEY_INVALID, "LanLobbyMenuInit", (void*)LanLobbyMenuInit }, + { NAMEKEY_INVALID, "ReplayMenuInit", (void*)ReplayMenuInit }, + { NAMEKEY_INVALID, "CreditsMenuInit", (void*)CreditsMenuInit }, + { NAMEKEY_INVALID, "LanGameOptionsMenuInit", (void*)LanGameOptionsMenuInit }, + { NAMEKEY_INVALID, "LanMapSelectMenuInit", (void*)LanMapSelectMenuInit }, + { NAMEKEY_INVALID, "SkirmishGameOptionsMenuInit", (void*)SkirmishGameOptionsMenuInit }, + { NAMEKEY_INVALID, "SkirmishMapSelectMenuInit", (void*)SkirmishMapSelectMenuInit }, + { NAMEKEY_INVALID, "ChallengeMenuInit", (void*)ChallengeMenuInit }, + { NAMEKEY_INVALID, "WOLLadderScreenInit", (void*)WOLLadderScreenInit }, + { NAMEKEY_INVALID, "WOLLoginMenuInit", (void*)WOLLoginMenuInit }, + { NAMEKEY_INVALID, "WOLLocaleSelectInit", (void*)WOLLocaleSelectInit }, + { NAMEKEY_INVALID, "WOLLobbyMenuInit", (void*)WOLLobbyMenuInit }, + { NAMEKEY_INVALID, "WOLGameSetupMenuInit", (void*)WOLGameSetupMenuInit }, + { NAMEKEY_INVALID, "WOLMapSelectMenuInit", (void*)WOLMapSelectMenuInit }, + { NAMEKEY_INVALID, "WOLBuddyOverlayInit", (void*)WOLBuddyOverlayInit }, + { NAMEKEY_INVALID, "WOLBuddyOverlayRCMenuInit", (void*)WOLBuddyOverlayRCMenuInit }, + { NAMEKEY_INVALID, "RCGameDetailsMenuInit", (void*)RCGameDetailsMenuInit }, + { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayInit", (void*)GameSpyPlayerInfoOverlayInit }, + { NAMEKEY_INVALID, "WOLMessageWindowInit", (void*)WOLMessageWindowInit }, + { NAMEKEY_INVALID, "WOLQuickMatchMenuInit", (void*)WOLQuickMatchMenuInit }, + { NAMEKEY_INVALID, "WOLWelcomeMenuInit", (void*)WOLWelcomeMenuInit }, + { NAMEKEY_INVALID, "WOLStatusMenuInit", (void*)WOLStatusMenuInit }, + { NAMEKEY_INVALID, "WOLQMScoreScreenInit", (void*)WOLQMScoreScreenInit }, + { NAMEKEY_INVALID, "WOLCustomScoreScreenInit", (void*)WOLCustomScoreScreenInit }, + { NAMEKEY_INVALID, "NetworkDirectConnectInit", (void*)NetworkDirectConnectInit }, + { NAMEKEY_INVALID, "PopupHostGameInit", (void*)PopupHostGameInit }, + { NAMEKEY_INVALID, "PopupJoinGameInit", (void*)PopupJoinGameInit }, + { NAMEKEY_INVALID, "PopupLadderSelectInit", (void*)PopupLadderSelectInit }, + { NAMEKEY_INVALID, "InGamePopupMessageInit", (void*)InGamePopupMessageInit }, + { NAMEKEY_INVALID, "GameInfoWindowInit", (void*)GameInfoWindowInit }, + { NAMEKEY_INVALID, "ScoreScreenInit", (void*)ScoreScreenInit }, + { NAMEKEY_INVALID, "DownloadMenuInit", (void*)DownloadMenuInit }, + { NAMEKEY_INVALID, "DifficultySelectInit", (void*)DifficultySelectInit }, + { NAMEKEY_INVALID, "PopupReplayInit", (void*)PopupReplayInit }, { NAMEKEY_INVALID, NULL, NULL } // keep this last @@ -292,39 +292,39 @@ static FunctionLexicon::TableEntry winLayoutInitTable[] = static FunctionLexicon::TableEntry winLayoutUpdateTable[] = { - { NAMEKEY_INVALID, "MainMenuUpdate", MainMenuUpdate }, - { NAMEKEY_INVALID, "OptionsMenuUpdate", OptionsMenuUpdate }, - { NAMEKEY_INVALID, "SinglePlayerMenuUpdate", SinglePlayerMenuUpdate }, - { NAMEKEY_INVALID, "MapSelectMenuUpdate", MapSelectMenuUpdate }, - { NAMEKEY_INVALID, "LanLobbyMenuUpdate", LanLobbyMenuUpdate }, - { NAMEKEY_INVALID, "ReplayMenuUpdate", ReplayMenuUpdate }, - { NAMEKEY_INVALID, "SaveLoadMenuUpdate", SaveLoadMenuUpdate }, + { NAMEKEY_INVALID, "MainMenuUpdate", (void*)MainMenuUpdate }, + { NAMEKEY_INVALID, "OptionsMenuUpdate", (void*)OptionsMenuUpdate }, + { NAMEKEY_INVALID, "SinglePlayerMenuUpdate", (void*)SinglePlayerMenuUpdate }, + { NAMEKEY_INVALID, "MapSelectMenuUpdate", (void*)MapSelectMenuUpdate }, + { NAMEKEY_INVALID, "LanLobbyMenuUpdate", (void*)LanLobbyMenuUpdate }, + { NAMEKEY_INVALID, "ReplayMenuUpdate", (void*)ReplayMenuUpdate }, + { NAMEKEY_INVALID, "SaveLoadMenuUpdate", (void*)SaveLoadMenuUpdate }, - { NAMEKEY_INVALID, "CreditsMenuUpdate", CreditsMenuUpdate }, - { NAMEKEY_INVALID, "LanGameOptionsMenuUpdate", LanGameOptionsMenuUpdate }, - { NAMEKEY_INVALID, "LanMapSelectMenuUpdate", LanMapSelectMenuUpdate }, - { NAMEKEY_INVALID, "SkirmishGameOptionsMenuUpdate", SkirmishGameOptionsMenuUpdate }, - { NAMEKEY_INVALID, "SkirmishMapSelectMenuUpdate", SkirmishMapSelectMenuUpdate }, - { NAMEKEY_INVALID, "ChallengeMenuUpdate", ChallengeMenuUpdate }, - { NAMEKEY_INVALID, "WOLLadderScreenUpdate", WOLLadderScreenUpdate }, - { NAMEKEY_INVALID, "WOLLoginMenuUpdate", WOLLoginMenuUpdate }, - { NAMEKEY_INVALID, "WOLLocaleSelectUpdate", WOLLocaleSelectUpdate }, - { NAMEKEY_INVALID, "WOLLobbyMenuUpdate", WOLLobbyMenuUpdate }, - { NAMEKEY_INVALID, "WOLGameSetupMenuUpdate", WOLGameSetupMenuUpdate }, - { NAMEKEY_INVALID, "PopupHostGameUpdate", PopupHostGameUpdate }, - { NAMEKEY_INVALID, "WOLMapSelectMenuUpdate", WOLMapSelectMenuUpdate }, - { NAMEKEY_INVALID, "WOLBuddyOverlayUpdate", WOLBuddyOverlayUpdate }, - { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayUpdate",GameSpyPlayerInfoOverlayUpdate }, - { NAMEKEY_INVALID, "WOLMessageWindowUpdate", WOLMessageWindowUpdate }, - { NAMEKEY_INVALID, "WOLQuickMatchMenuUpdate", WOLQuickMatchMenuUpdate }, - { NAMEKEY_INVALID, "WOLWelcomeMenuUpdate", WOLWelcomeMenuUpdate }, - { NAMEKEY_INVALID, "WOLStatusMenuUpdate", WOLStatusMenuUpdate }, - { NAMEKEY_INVALID, "WOLQMScoreScreenUpdate", WOLQMScoreScreenUpdate }, - { NAMEKEY_INVALID, "WOLCustomScoreScreenUpdate", WOLCustomScoreScreenUpdate }, - { NAMEKEY_INVALID, "NetworkDirectConnectUpdate", NetworkDirectConnectUpdate }, - { NAMEKEY_INVALID, "ScoreScreenUpdate", ScoreScreenUpdate }, - { NAMEKEY_INVALID, "DownloadMenuUpdate", DownloadMenuUpdate }, - { NAMEKEY_INVALID, "PopupReplayUpdate", PopupReplayUpdate }, + { NAMEKEY_INVALID, "CreditsMenuUpdate", (void*)CreditsMenuUpdate }, + { NAMEKEY_INVALID, "LanGameOptionsMenuUpdate", (void*)LanGameOptionsMenuUpdate }, + { NAMEKEY_INVALID, "LanMapSelectMenuUpdate", (void*)LanMapSelectMenuUpdate }, + { NAMEKEY_INVALID, "SkirmishGameOptionsMenuUpdate", (void*)SkirmishGameOptionsMenuUpdate }, + { NAMEKEY_INVALID, "SkirmishMapSelectMenuUpdate", (void*)SkirmishMapSelectMenuUpdate }, + { NAMEKEY_INVALID, "ChallengeMenuUpdate", (void*)ChallengeMenuUpdate }, + { NAMEKEY_INVALID, "WOLLadderScreenUpdate", (void*)WOLLadderScreenUpdate }, + { NAMEKEY_INVALID, "WOLLoginMenuUpdate", (void*)WOLLoginMenuUpdate }, + { NAMEKEY_INVALID, "WOLLocaleSelectUpdate", (void*)WOLLocaleSelectUpdate }, + { NAMEKEY_INVALID, "WOLLobbyMenuUpdate", (void*)WOLLobbyMenuUpdate }, + { NAMEKEY_INVALID, "WOLGameSetupMenuUpdate", (void*)WOLGameSetupMenuUpdate }, + { NAMEKEY_INVALID, "PopupHostGameUpdate", (void*)PopupHostGameUpdate }, + { NAMEKEY_INVALID, "WOLMapSelectMenuUpdate", (void*)WOLMapSelectMenuUpdate }, + { NAMEKEY_INVALID, "WOLBuddyOverlayUpdate", (void*)WOLBuddyOverlayUpdate }, + { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayUpdate",(void*)GameSpyPlayerInfoOverlayUpdate }, + { NAMEKEY_INVALID, "WOLMessageWindowUpdate", (void*)WOLMessageWindowUpdate }, + { NAMEKEY_INVALID, "WOLQuickMatchMenuUpdate", (void*)WOLQuickMatchMenuUpdate }, + { NAMEKEY_INVALID, "WOLWelcomeMenuUpdate", (void*)WOLWelcomeMenuUpdate }, + { NAMEKEY_INVALID, "WOLStatusMenuUpdate", (void*)WOLStatusMenuUpdate }, + { NAMEKEY_INVALID, "WOLQMScoreScreenUpdate", (void*)WOLQMScoreScreenUpdate }, + { NAMEKEY_INVALID, "WOLCustomScoreScreenUpdate", (void*)WOLCustomScoreScreenUpdate }, + { NAMEKEY_INVALID, "NetworkDirectConnectUpdate", (void*)NetworkDirectConnectUpdate }, + { NAMEKEY_INVALID, "ScoreScreenUpdate", (void*)ScoreScreenUpdate }, + { NAMEKEY_INVALID, "DownloadMenuUpdate", (void*)DownloadMenuUpdate }, + { NAMEKEY_INVALID, "PopupReplayUpdate", (void*)PopupReplayUpdate }, { NAMEKEY_INVALID, NULL, NULL } // keep this last }; @@ -333,39 +333,39 @@ static FunctionLexicon::TableEntry winLayoutUpdateTable[] = static FunctionLexicon::TableEntry winLayoutShutdownTable[] = { - { NAMEKEY_INVALID, "MainMenuShutdown", MainMenuShutdown }, - { NAMEKEY_INVALID, "OptionsMenuShutdown", OptionsMenuShutdown }, - { NAMEKEY_INVALID, "SaveLoadMenuShutdown", SaveLoadMenuShutdown }, - { NAMEKEY_INVALID, "PopupCommunicatorShutdown", PopupCommunicatorShutdown }, - { NAMEKEY_INVALID, "KeyboardOptionsMenuShutdown", KeyboardOptionsMenuShutdown }, - { NAMEKEY_INVALID, "SinglePlayerMenuShutdown", SinglePlayerMenuShutdown }, - { NAMEKEY_INVALID, "MapSelectMenuShutdown", MapSelectMenuShutdown }, - { NAMEKEY_INVALID, "LanLobbyMenuShutdown", LanLobbyMenuShutdown }, - { NAMEKEY_INVALID, "ReplayMenuShutdown", ReplayMenuShutdown }, - { NAMEKEY_INVALID, "CreditsMenuShutdown", CreditsMenuShutdown }, - { NAMEKEY_INVALID, "LanGameOptionsMenuShutdown", LanGameOptionsMenuShutdown }, - { NAMEKEY_INVALID, "LanMapSelectMenuShutdown", LanMapSelectMenuShutdown }, - { NAMEKEY_INVALID, "SkirmishGameOptionsMenuShutdown",SkirmishGameOptionsMenuShutdown }, - { NAMEKEY_INVALID, "SkirmishMapSelectMenuShutdown", SkirmishMapSelectMenuShutdown }, - { NAMEKEY_INVALID, "ChallengeMenuShutdown", ChallengeMenuShutdown }, - { NAMEKEY_INVALID, "WOLLadderScreenShutdown", WOLLadderScreenShutdown }, - { NAMEKEY_INVALID, "WOLLoginMenuShutdown", WOLLoginMenuShutdown }, - { NAMEKEY_INVALID, "WOLLocaleSelectShutdown", WOLLocaleSelectShutdown }, - { NAMEKEY_INVALID, "WOLLobbyMenuShutdown", WOLLobbyMenuShutdown }, - { NAMEKEY_INVALID, "WOLGameSetupMenuShutdown", WOLGameSetupMenuShutdown }, - { NAMEKEY_INVALID, "WOLMapSelectMenuShutdown", WOLMapSelectMenuShutdown }, - { NAMEKEY_INVALID, "WOLBuddyOverlayShutdown", WOLBuddyOverlayShutdown }, - { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayShutdown",GameSpyPlayerInfoOverlayShutdown }, - { NAMEKEY_INVALID, "WOLMessageWindowShutdown", WOLMessageWindowShutdown }, - { NAMEKEY_INVALID, "WOLQuickMatchMenuShutdown", WOLQuickMatchMenuShutdown }, - { NAMEKEY_INVALID, "WOLWelcomeMenuShutdown", WOLWelcomeMenuShutdown }, - { NAMEKEY_INVALID, "WOLStatusMenuShutdown", WOLStatusMenuShutdown }, - { NAMEKEY_INVALID, "WOLQMScoreScreenShutdown", WOLQMScoreScreenShutdown }, - { NAMEKEY_INVALID, "WOLCustomScoreScreenShutdown", WOLCustomScoreScreenShutdown }, - { NAMEKEY_INVALID, "NetworkDirectConnectShutdown", NetworkDirectConnectShutdown }, - { NAMEKEY_INVALID, "ScoreScreenShutdown", ScoreScreenShutdown }, - { NAMEKEY_INVALID, "DownloadMenuShutdown", DownloadMenuShutdown }, - { NAMEKEY_INVALID, "PopupReplayShutdown", PopupReplayShutdown }, + { NAMEKEY_INVALID, "MainMenuShutdown", (void*)MainMenuShutdown }, + { NAMEKEY_INVALID, "OptionsMenuShutdown", (void*)OptionsMenuShutdown }, + { NAMEKEY_INVALID, "SaveLoadMenuShutdown", (void*)SaveLoadMenuShutdown }, + { NAMEKEY_INVALID, "PopupCommunicatorShutdown", (void*)PopupCommunicatorShutdown }, + { NAMEKEY_INVALID, "KeyboardOptionsMenuShutdown", (void*)KeyboardOptionsMenuShutdown }, + { NAMEKEY_INVALID, "SinglePlayerMenuShutdown", (void*)SinglePlayerMenuShutdown }, + { NAMEKEY_INVALID, "MapSelectMenuShutdown", (void*)MapSelectMenuShutdown }, + { NAMEKEY_INVALID, "LanLobbyMenuShutdown", (void*)LanLobbyMenuShutdown }, + { NAMEKEY_INVALID, "ReplayMenuShutdown", (void*)ReplayMenuShutdown }, + { NAMEKEY_INVALID, "CreditsMenuShutdown", (void*)CreditsMenuShutdown }, + { NAMEKEY_INVALID, "LanGameOptionsMenuShutdown", (void*)LanGameOptionsMenuShutdown }, + { NAMEKEY_INVALID, "LanMapSelectMenuShutdown", (void*)LanMapSelectMenuShutdown }, + { NAMEKEY_INVALID, "SkirmishGameOptionsMenuShutdown",(void*)SkirmishGameOptionsMenuShutdown }, + { NAMEKEY_INVALID, "SkirmishMapSelectMenuShutdown", (void*)SkirmishMapSelectMenuShutdown }, + { NAMEKEY_INVALID, "ChallengeMenuShutdown", (void*)ChallengeMenuShutdown }, + { NAMEKEY_INVALID, "WOLLadderScreenShutdown", (void*)WOLLadderScreenShutdown }, + { NAMEKEY_INVALID, "WOLLoginMenuShutdown", (void*)WOLLoginMenuShutdown }, + { NAMEKEY_INVALID, "WOLLocaleSelectShutdown", (void*)WOLLocaleSelectShutdown }, + { NAMEKEY_INVALID, "WOLLobbyMenuShutdown", (void*)WOLLobbyMenuShutdown }, + { NAMEKEY_INVALID, "WOLGameSetupMenuShutdown", (void*)WOLGameSetupMenuShutdown }, + { NAMEKEY_INVALID, "WOLMapSelectMenuShutdown", (void*)WOLMapSelectMenuShutdown }, + { NAMEKEY_INVALID, "WOLBuddyOverlayShutdown", (void*)WOLBuddyOverlayShutdown }, + { NAMEKEY_INVALID, "GameSpyPlayerInfoOverlayShutdown",(void*)GameSpyPlayerInfoOverlayShutdown }, + { NAMEKEY_INVALID, "WOLMessageWindowShutdown", (void*)WOLMessageWindowShutdown }, + { NAMEKEY_INVALID, "WOLQuickMatchMenuShutdown", (void*)WOLQuickMatchMenuShutdown }, + { NAMEKEY_INVALID, "WOLWelcomeMenuShutdown", (void*)WOLWelcomeMenuShutdown }, + { NAMEKEY_INVALID, "WOLStatusMenuShutdown", (void*)WOLStatusMenuShutdown }, + { NAMEKEY_INVALID, "WOLQMScoreScreenShutdown", (void*)WOLQMScoreScreenShutdown }, + { NAMEKEY_INVALID, "WOLCustomScoreScreenShutdown", (void*)WOLCustomScoreScreenShutdown }, + { NAMEKEY_INVALID, "NetworkDirectConnectShutdown", (void*)NetworkDirectConnectShutdown }, + { NAMEKEY_INVALID, "ScoreScreenShutdown", (void*)ScoreScreenShutdown }, + { NAMEKEY_INVALID, "DownloadMenuShutdown", (void*)DownloadMenuShutdown }, + { NAMEKEY_INVALID, "PopupReplayShutdown", (void*)PopupReplayShutdown }, { NAMEKEY_INVALID, NULL, NULL } // keep this last }; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp index b9aac9e512..a4f0bac01e 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp @@ -494,7 +494,7 @@ void CheckForCDAtGameStart( gameStartCallback callback ) { // popup a dialog asking for a CD ExMessageBoxOkCancel(TheGameText->fetch("GUI:InsertCDPrompt"), TheGameText->fetch("GUI:InsertCDMessage"), - callback, checkCDCallback, cancelStartBecauseOfNoCD); + (void *)callback, checkCDCallback, cancelStartBecauseOfNoCD); } else { diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp index 73d7f2e118..3ef8b760ee 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp @@ -43,57 +43,57 @@ static FunctionLexicon::TableEntry gameWinDrawTable [] = { - { NAMEKEY_INVALID, "GameWinDefaultDraw", GameWinDefaultDraw }, - { NAMEKEY_INVALID, "W3DGameWinDefaultDraw", W3DGameWinDefaultDraw }, - - { NAMEKEY_INVALID, "W3DGadgetPushButtonDraw", W3DGadgetPushButtonDraw }, - { NAMEKEY_INVALID, "W3DGadgetPushButtonImageDraw", W3DGadgetPushButtonImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetCheckBoxDraw", W3DGadgetCheckBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetCheckBoxImageDraw", W3DGadgetCheckBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetRadioButtonDraw", W3DGadgetRadioButtonDraw }, - { NAMEKEY_INVALID, "W3DGadgetRadioButtonImageDraw", W3DGadgetRadioButtonImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetTabControlDraw", W3DGadgetTabControlDraw }, - { NAMEKEY_INVALID, "W3DGadgetTabControlImageDraw", W3DGadgetTabControlImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetListBoxDraw", W3DGadgetListBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetListBoxImageDraw", W3DGadgetListBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetComboBoxDraw", W3DGadgetComboBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetComboBoxImageDraw", W3DGadgetComboBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderDraw", W3DGadgetHorizontalSliderDraw }, - { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderImageDraw", W3DGadgetHorizontalSliderImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetVerticalSliderDraw", W3DGadgetVerticalSliderDraw }, - { NAMEKEY_INVALID, "W3DGadgetVerticalSliderImageDraw", W3DGadgetVerticalSliderImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetProgressBarDraw", W3DGadgetProgressBarDraw }, - { NAMEKEY_INVALID, "W3DGadgetProgressBarImageDraw", W3DGadgetProgressBarImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetStaticTextDraw", W3DGadgetStaticTextDraw }, - { NAMEKEY_INVALID, "W3DGadgetStaticTextImageDraw", W3DGadgetStaticTextImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetTextEntryDraw", W3DGadgetTextEntryDraw }, - { NAMEKEY_INVALID, "W3DGadgetTextEntryImageDraw", W3DGadgetTextEntryImageDraw }, - - { NAMEKEY_INVALID, "W3DLeftHUDDraw", W3DLeftHUDDraw }, - { NAMEKEY_INVALID, "W3DCameoMovieDraw", W3DCameoMovieDraw }, - { NAMEKEY_INVALID, "W3DRightHUDDraw", W3DRightHUDDraw }, - { NAMEKEY_INVALID, "W3DPowerDraw", W3DPowerDraw }, - { NAMEKEY_INVALID, "W3DMainMenuDraw", W3DMainMenuDraw }, - { NAMEKEY_INVALID, "W3DMainMenuFourDraw", W3DMainMenuFourDraw }, - { NAMEKEY_INVALID, "W3DMetalBarMenuDraw", W3DMetalBarMenuDraw }, - { NAMEKEY_INVALID, "W3DCreditsMenuDraw", W3DCreditsMenuDraw }, - { NAMEKEY_INVALID, "W3DClockDraw", W3DClockDraw }, - { NAMEKEY_INVALID, "W3DMainMenuMapBorder", W3DMainMenuMapBorder }, - { NAMEKEY_INVALID, "W3DMainMenuButtonDropShadowDraw", W3DMainMenuButtonDropShadowDraw }, - { NAMEKEY_INVALID, "W3DMainMenuRandomTextDraw", W3DMainMenuRandomTextDraw }, - { NAMEKEY_INVALID, "W3DThinBorderDraw", W3DThinBorderDraw }, - { NAMEKEY_INVALID, "W3DShellMenuSchemeDraw", W3DShellMenuSchemeDraw }, - { NAMEKEY_INVALID, "W3DCommandBarBackgroundDraw", W3DCommandBarBackgroundDraw }, - { NAMEKEY_INVALID, "W3DCommandBarTopDraw", W3DCommandBarTopDraw }, - { NAMEKEY_INVALID, "W3DCommandBarGenExpDraw", W3DCommandBarGenExpDraw }, - { NAMEKEY_INVALID, "W3DCommandBarHelpPopupDraw", W3DCommandBarHelpPopupDraw }, - - { NAMEKEY_INVALID, "W3DCommandBarGridDraw", W3DCommandBarGridDraw }, - - - { NAMEKEY_INVALID, "W3DCommandBarForegroundDraw", W3DCommandBarForegroundDraw }, - { NAMEKEY_INVALID, "W3DNoDraw", W3DNoDraw }, - { NAMEKEY_INVALID, "W3DDrawMapPreview", W3DDrawMapPreview }, + { NAMEKEY_INVALID, "GameWinDefaultDraw", (void*)GameWinDefaultDraw }, + { NAMEKEY_INVALID, "W3DGameWinDefaultDraw", (void*)W3DGameWinDefaultDraw }, + + { NAMEKEY_INVALID, "W3DGadgetPushButtonDraw", (void*)W3DGadgetPushButtonDraw }, + { NAMEKEY_INVALID, "W3DGadgetPushButtonImageDraw", (void*)W3DGadgetPushButtonImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetCheckBoxDraw", (void*)W3DGadgetCheckBoxDraw }, + { NAMEKEY_INVALID, "W3DGadgetCheckBoxImageDraw", (void*)W3DGadgetCheckBoxImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetRadioButtonDraw", (void*)W3DGadgetRadioButtonDraw }, + { NAMEKEY_INVALID, "W3DGadgetRadioButtonImageDraw", (void*)W3DGadgetRadioButtonImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetTabControlDraw", (void*)W3DGadgetTabControlDraw }, + { NAMEKEY_INVALID, "W3DGadgetTabControlImageDraw", (void*)W3DGadgetTabControlImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetListBoxDraw", (void*)W3DGadgetListBoxDraw }, + { NAMEKEY_INVALID, "W3DGadgetListBoxImageDraw", (void*)W3DGadgetListBoxImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetComboBoxDraw", (void*)W3DGadgetComboBoxDraw }, + { NAMEKEY_INVALID, "W3DGadgetComboBoxImageDraw", (void*)W3DGadgetComboBoxImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderDraw", (void*)W3DGadgetHorizontalSliderDraw }, + { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderImageDraw", (void*)W3DGadgetHorizontalSliderImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetVerticalSliderDraw", (void*)W3DGadgetVerticalSliderDraw }, + { NAMEKEY_INVALID, "W3DGadgetVerticalSliderImageDraw", (void*)W3DGadgetVerticalSliderImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetProgressBarDraw", (void*)W3DGadgetProgressBarDraw }, + { NAMEKEY_INVALID, "W3DGadgetProgressBarImageDraw", (void*)W3DGadgetProgressBarImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetStaticTextDraw", (void*)W3DGadgetStaticTextDraw }, + { NAMEKEY_INVALID, "W3DGadgetStaticTextImageDraw", (void*)W3DGadgetStaticTextImageDraw }, + { NAMEKEY_INVALID, "W3DGadgetTextEntryDraw", (void*)W3DGadgetTextEntryDraw }, + { NAMEKEY_INVALID, "W3DGadgetTextEntryImageDraw", (void*)W3DGadgetTextEntryImageDraw }, + + { NAMEKEY_INVALID, "W3DLeftHUDDraw", (void*)W3DLeftHUDDraw }, + { NAMEKEY_INVALID, "W3DCameoMovieDraw", (void*)W3DCameoMovieDraw }, + { NAMEKEY_INVALID, "W3DRightHUDDraw", (void*)W3DRightHUDDraw }, + { NAMEKEY_INVALID, "W3DPowerDraw", (void*)W3DPowerDraw }, + { NAMEKEY_INVALID, "W3DMainMenuDraw", (void*)W3DMainMenuDraw }, + { NAMEKEY_INVALID, "W3DMainMenuFourDraw", (void*)W3DMainMenuFourDraw }, + { NAMEKEY_INVALID, "W3DMetalBarMenuDraw", (void*)W3DMetalBarMenuDraw }, + { NAMEKEY_INVALID, "W3DCreditsMenuDraw", (void*)W3DCreditsMenuDraw }, + { NAMEKEY_INVALID, "W3DClockDraw", (void*)W3DClockDraw }, + { NAMEKEY_INVALID, "W3DMainMenuMapBorder", (void*)W3DMainMenuMapBorder }, + { NAMEKEY_INVALID, "W3DMainMenuButtonDropShadowDraw", (void*)W3DMainMenuButtonDropShadowDraw }, + { NAMEKEY_INVALID, "W3DMainMenuRandomTextDraw", (void*)W3DMainMenuRandomTextDraw }, + { NAMEKEY_INVALID, "W3DThinBorderDraw", (void*)W3DThinBorderDraw }, + { NAMEKEY_INVALID, "W3DShellMenuSchemeDraw", (void*)W3DShellMenuSchemeDraw }, + { NAMEKEY_INVALID, "W3DCommandBarBackgroundDraw", (void*)W3DCommandBarBackgroundDraw }, + { NAMEKEY_INVALID, "W3DCommandBarTopDraw", (void*)W3DCommandBarTopDraw }, + { NAMEKEY_INVALID, "W3DCommandBarGenExpDraw", (void*)W3DCommandBarGenExpDraw }, + { NAMEKEY_INVALID, "W3DCommandBarHelpPopupDraw", (void*)W3DCommandBarHelpPopupDraw }, + + { NAMEKEY_INVALID, "W3DCommandBarGridDraw", (void*)W3DCommandBarGridDraw }, + + + { NAMEKEY_INVALID, "W3DCommandBarForegroundDraw", (void*)W3DCommandBarForegroundDraw }, + { NAMEKEY_INVALID, "W3DNoDraw", (void*)W3DNoDraw }, + { NAMEKEY_INVALID, "W3DDrawMapPreview", (void*)W3DDrawMapPreview }, { NAMEKEY_INVALID, NULL, NULL }, @@ -103,7 +103,7 @@ static FunctionLexicon::TableEntry gameWinDrawTable [] = static FunctionLexicon::TableEntry layoutInitTable [] = { - { NAMEKEY_INVALID, "W3DMainMenuInit", W3DMainMenuInit }, + { NAMEKEY_INVALID, "W3DMainMenuInit", (void*)W3DMainMenuInit }, { NAMEKEY_INVALID, NULL, NULL }, diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp index 2ac7b9c910..85f45729b8 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp @@ -45,9 +45,9 @@ bool __DebugIncludeInLink1; // and end of this list (B and Y respectively since the A and Z segments // contain list delimiters). #pragma data_seg(".CRT$XCB") -void *Debug::PreStatic=&Debug::PreStaticInit; +void *Debug::PreStatic=(void*)&Debug::PreStaticInit; #pragma data_seg(".CRT$XCY") -void *Debug::PostStatic=&Debug::PostStaticInit; +void *Debug::PostStatic=(void*)&Debug::PostStaticInit; #pragma data_seg() Debug::LogDescription::LogDescription(const char *fileOrGroup, const char *description) From 337a01df1594bc4bd77bc846f3cfaf5c8e9aef96 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:41:05 +0200 Subject: [PATCH 13/32] [ZH] Fix of direct constructor calls --- .../Source/W3DDevice/GameClient/W3DInGameUI.cpp | 2 +- .../Source/W3DDevice/GameClient/W3DStatusCircle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp index 747512e025..689343159d 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp @@ -194,7 +194,7 @@ void DebugHintObject::initData(void) m_vertexMaterialClass = VertexMaterialClass::Get_Preset(VertexMaterialClass::PRELIT_DIFFUSE); //use a multi-texture shader: (text1*diffuse)*text2. - m_shaderClass = ShaderClass::ShaderClass(SC_ALPHA); + m_shaderClass = ShaderClass(SC_ALPHA); } void DebugHintObject::setLocAndColorAndSize(const Coord3D *loc, Int argb, Int size) diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp index 4bb04cd769..f858bc611b 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp @@ -174,7 +174,7 @@ Int W3DStatusCircle::initData(void) //go with a preset material for now. m_vertexMaterialClass=VertexMaterialClass::Get_Preset(VertexMaterialClass::PRELIT_DIFFUSE); - m_shaderClass = ShaderClass::ShaderClass(SC_ALPHA);// _PresetOpaque2DShader;//; //_PresetOpaqueShader; + m_shaderClass = ShaderClass(SC_ALPHA);// _PresetOpaque2DShader;//; //_PresetOpaqueShader; return 0; From d8fb8312f3f375a7e5541e95c8e7bbee7382986f Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 23:45:58 +0200 Subject: [PATCH 14/32] [ZH] Fix of unsigned values in signed arrays --- .../GameEngine/Include/Common/BorderColors.h | 16 ++--- .../GameEngine/Source/Common/System/Trig.cpp | 12 ++-- .../GameClient/Win32DIKeyboard.cpp | 62 +++++++++---------- .../Libraries/Source/WWVegas/WWLib/RANDOM.H | 4 +- .../Libraries/Source/WWVegas/WWLib/random.cpp | 8 +-- 5 files changed, 51 insertions(+), 51 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/BorderColors.h b/GeneralsMD/Code/GameEngine/Include/Common/BorderColors.h index 88618b370b..1a0cf71508 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/BorderColors.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/BorderColors.h @@ -28,14 +28,14 @@ struct BorderColor const BorderColor BORDER_COLORS[] = { - { "Orange", 0xFFFF8700, }, - { "Green", 0xFF00FF00, }, - { "Blue", 0xFF0000FF, }, - { "Cyan", 0xFF00FFFF, }, - { "Magenta", 0xFFFF00FF, }, - { "Yellow", 0xFFFFFF00, }, - { "Purple", 0xFF9E00FF, }, - { "Pink", 0xFFFF8670, }, + { "Orange", (long)0xFFFF8700, }, + { "Green", (long)0xFF00FF00, }, + { "Blue", (long)0xFF0000FF, }, + { "Cyan", (long)0xFF00FFFF, }, + { "Magenta", (long)0xFFFF00FF, }, + { "Yellow", (long)0xFFFFFF00, }, + { "Purple", (long)0xFF9E00FF, }, + { "Pink", (long)0xFFFF8670, }, }; const long BORDER_COLORS_SIZE = sizeof(BORDER_COLORS) / sizeof (BORDER_COLORS[0]); diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/Trig.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/Trig.cpp index c44a3cbc24..01cebd358e 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/Trig.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/Trig.cpp @@ -51,7 +51,7 @@ // on Feb 12, 2002. To regenerate, define REGENERATE_TRIG_TABLES, run the program, and copy the // resulting trig.txt file here. -static Int sinLookup[TRIG_RES] = { +static UnsignedInt sinLookup[TRIG_RES] = { 0x00000000, 0x00000006, 0x0000000C, 0x00000012, 0x00000019, 0x0000001F, 0x00000025, 0x0000002B, 0x00000032, 0x00000038, 0x0000003E, 0x00000045, 0x0000004B, 0x00000051, 0x00000057, 0x0000005E, 0x00000064, 0x0000006A, 0x00000071, 0x00000077, 0x0000007D, 0x00000083, 0x0000008A, 0x00000090, @@ -566,7 +566,7 @@ static Int sinLookup[TRIG_RES] = { 0xFFFFFFCE, 0xFFFFFFD5, 0xFFFFFFDB, 0xFFFFFFE1, 0xFFFFFFE7, 0xFFFFFFEE, 0xFFFFFFF4, 0xFFFFFFFA }; -static Int arcCosLookup[2 * INT_ONE] = { +static UnsignedInt arcCosLookup[2 * INT_ONE] = { 0x00003243, 0x000031E9, 0x000031C3, 0x000031A7, 0x0000318E, 0x00003179, 0x00003166, 0x00003154, 0x00003143, 0x00003134, 0x00003125, 0x00003117, 0x0000310A, 0x000030FD, 0x000030F1, 0x000030E5, 0x000030D9, 0x000030CE, 0x000030C3, 0x000030B9, 0x000030AF, 0x000030A5, 0x0000309B, 0x00003091, @@ -1603,7 +1603,7 @@ static Int intArcCos( Int c ) if (c >= 2 * INT_ONE) c = (2 * INT_ONE)-1; - return arcCosLookup[c]; + return (Int)arcCosLookup[c]; } static Int intSin( Int angle ) @@ -1614,7 +1614,7 @@ static Int intSin( Int angle ) while (angle >= INT_TWOPI) angle -= INT_TWOPI; - return sinLookup[(angle * TRIG_RES)/INT_TWOPI]; + return (Int)sinLookup[(angle * TRIG_RES)/INT_TWOPI]; } static Int intTan( Int angle ) @@ -1694,7 +1694,7 @@ void initTrig( void ) static int columns = 8; int column = 0; FILE *fp = fopen("trig.txt", "w"); - fprintf(fp, "static Int sinLookup[TRIG_RES] = {\n"); + fprintf(fp, "static UnsignedInt sinLookup[TRIG_RES] = {\n"); for( i=0; i> 16; temp = itmpl * itmpl + ~(itmph * itmph); temp = (temp >> 16) | (temp << 16); - hiword = loword ^ ((temp ^ Mix2[i]) + itmpl * itmph); + hiword = loword ^ ((temp ^ (int)Mix2[i]) + itmpl * itmph); loword = hihold; } return(hiword); From be8d67b0094d23b59a293a4c8548a6af9c855b23 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 00:14:22 +0200 Subject: [PATCH 15/32] [ZH] COM related fixes --- Dependencies/Utility/Utility/CppMacros.h | 7 +++++++ .../GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h | 6 +++--- GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp | 2 +- .../Source/GameNetwork/WOLBrowser/WebBrowser.cpp | 6 +++--- .../Source/W3DDevice/GameClient/W3DWebBrowser.cpp | 4 ++++ .../Libraries/Source/EABrowserDispatch/BrowserDispatch.idl | 2 +- .../Libraries/Source/EABrowserEngine/BrowserEngine.idl | 1 + 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Dependencies/Utility/Utility/CppMacros.h b/Dependencies/Utility/Utility/CppMacros.h index 7333477066..3f26570cb4 100644 --- a/Dependencies/Utility/Utility/CppMacros.h +++ b/Dependencies/Utility/Utility/CppMacros.h @@ -9,6 +9,13 @@ #define NOEXCEPT_17 #endif +// noexcept for methods of IUNKNOWN interface +#if defined(_MSC_VER) +#define IUNKNOWN_NOEXCEPT NOEXCEPT_17 +#else +#define IUNKNOWN_NOEXCEPT +#endif + #if __cplusplus >= 201103L #define CPP_11(code) code #else diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h index 5e5bff6e5c..075df2e479 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h +++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h @@ -113,9 +113,9 @@ class WebBrowser : // IUnknown methods //--------------------------------------------------------------------------- protected: - HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) NOEXCEPT_17; - ULONG STDMETHODCALLTYPE AddRef(void) NOEXCEPT_17; - ULONG STDMETHODCALLTYPE Release(void) NOEXCEPT_17; + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) IUNKNOWN_NOEXCEPT; + ULONG STDMETHODCALLTYPE AddRef(void) IUNKNOWN_NOEXCEPT; + ULONG STDMETHODCALLTYPE Release(void) IUNKNOWN_NOEXCEPT; //--------------------------------------------------------------------------- // IBrowserDispatch methods diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp index f31ea220cd..afd0e0c42a 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp @@ -190,7 +190,7 @@ GameEngine::GameEngine( void ) m_quitting = FALSE; m_isActive = FALSE; - _Module.Init(NULL, ApplicationHInstance); + _Module.Init(NULL, ApplicationHInstance, NULL); } //------------------------------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/WOLBrowser/WebBrowser.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/WOLBrowser/WebBrowser.cpp index 4989e40480..40db96ca70 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/WOLBrowser/WebBrowser.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/WOLBrowser/WebBrowser.cpp @@ -237,7 +237,7 @@ WebBrowserURL * WebBrowser::makeNewURL(AsciiString tag) * ******************************************************************************/ -STDMETHODIMP WebBrowser::QueryInterface(REFIID iid, void** ppv) NOEXCEPT_17 +STDMETHODIMP WebBrowser::QueryInterface(REFIID iid, void** ppv) IUNKNOWN_NOEXCEPT { *ppv = NULL; @@ -270,7 +270,7 @@ STDMETHODIMP WebBrowser::QueryInterface(REFIID iid, void** ppv) NOEXCEPT_17 * ******************************************************************************/ -ULONG STDMETHODCALLTYPE WebBrowser::AddRef(void) NOEXCEPT_17 +ULONG STDMETHODCALLTYPE WebBrowser::AddRef(void) IUNKNOWN_NOEXCEPT { return ++mRefCount; } @@ -290,7 +290,7 @@ ULONG STDMETHODCALLTYPE WebBrowser::AddRef(void) NOEXCEPT_17 * ******************************************************************************/ -ULONG STDMETHODCALLTYPE WebBrowser::Release(void) NOEXCEPT_17 +ULONG STDMETHODCALLTYPE WebBrowser::Release(void) IUNKNOWN_NOEXCEPT { DEBUG_ASSERTCRASH(mRefCount > 0, ("Negative reference count")); --mRefCount; diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp index 3b6631e8d5..c25b70847e 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp @@ -57,7 +57,11 @@ Bool W3DWebBrowser::createBrowserWindow(const char *tag, GameWindow *win) return FALSE; } +#ifdef __GNUC__ + CComQIIDPtr idisp(m_dispatch); +#else CComQIPtr idisp(m_dispatch); +#endif if (m_dispatch == NULL) { return FALSE; diff --git a/GeneralsMD/Code/Libraries/Source/EABrowserDispatch/BrowserDispatch.idl b/GeneralsMD/Code/Libraries/Source/EABrowserDispatch/BrowserDispatch.idl index a18c72cb69..73f9d29efa 100644 --- a/GeneralsMD/Code/Libraries/Source/EABrowserDispatch/BrowserDispatch.idl +++ b/GeneralsMD/Code/Libraries/Source/EABrowserDispatch/BrowserDispatch.idl @@ -25,6 +25,6 @@ library BROWSERDISPATCHLib ] interface IBrowserDispatch : IUnknown { - [id(1), helpstring("method TestMethod")] HRESULT TestMethod(Int num1); + [id(1), helpstring("method TestMethod")] HRESULT TestMethod(int num1); }; }; diff --git a/GeneralsMD/Code/Libraries/Source/EABrowserEngine/BrowserEngine.idl b/GeneralsMD/Code/Libraries/Source/EABrowserEngine/BrowserEngine.idl index 312a07d03c..7de762ac0d 100644 --- a/GeneralsMD/Code/Libraries/Source/EABrowserEngine/BrowserEngine.idl +++ b/GeneralsMD/Code/Libraries/Source/EABrowserEngine/BrowserEngine.idl @@ -2,6 +2,7 @@ // // typelib filename: +import "oaidl.idl"; [ uuid(6EE45698-21BA-420D-AD40-1B547699BEFB), version(1.0) From 11928ee79439007a14f867fe7e1337eb8cc6673c Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 00:20:55 +0200 Subject: [PATCH 16/32] [ZH] Fixes of test main methods --- GeneralsMD/Code/Libraries/Source/debug/test1/test1.cpp | 3 ++- GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp | 3 ++- GeneralsMD/Code/Libraries/Source/debug/test4/test4.cpp | 3 ++- GeneralsMD/Code/Libraries/Source/debug/test5/test5.cpp | 3 ++- GeneralsMD/Code/Libraries/Source/debug/test6/test6.cpp | 3 ++- GeneralsMD/Code/Libraries/Source/profile/test1/test1.cpp | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/debug/test1/test1.cpp b/GeneralsMD/Code/Libraries/Source/debug/test1/test1.cpp index 56d693e63b..a9ac493dc0 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test1/test1.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test1/test1.cpp @@ -44,6 +44,7 @@ bool crash(void) bool thisWillCrash=crash(); -void main(void) +int main(void) { + return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp b/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp index 9460786002..2bb78972f9 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test3/test3.cpp @@ -30,7 +30,7 @@ unsigned divByNull; -void main(void) +int main(void) { // switch to debug group Debug::Command("debug."); @@ -58,4 +58,5 @@ void main(void) // and now let's crash! divByNull/=divByNull; + return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/debug/test4/test4.cpp b/GeneralsMD/Code/Libraries/Source/debug/test4/test4.cpp index 3ade3ad486..1b096e7803 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test4/test4.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test4/test4.cpp @@ -28,7 +28,7 @@ ////////////////////////////////////////////////////////////////////////////// #include "../debug.h" -void main(void) +int main(void) { for (int i=0;i<30;i++) DCHECK_MSG(i>100,"run#" << i); @@ -39,4 +39,5 @@ void main(void) DASSERT_MSG(k<1,"k must be less than 1..."); Debug::Command("list a"); } + return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/debug/test5/test5.cpp b/GeneralsMD/Code/Libraries/Source/debug/test5/test5.cpp index 103c324214..87c49bf418 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test5/test5.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test5/test5.cpp @@ -33,11 +33,12 @@ const char *DebugGetDefaultCommands(void) return "!debug.io con add"; } -void main(void) +int main(void) { // turn on all logs Debug::Command("add l + *"); for (int k=0;k<16;k++) DLOG("Testing: " << Debug::Format("0x%04x (%c)",k,'A'+k) << "\n"); + return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/debug/test6/test6.cpp b/GeneralsMD/Code/Libraries/Source/debug/test6/test6.cpp index 38d8ebd387..8c4d3a4716 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/test6/test6.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/test6/test6.cpp @@ -46,7 +46,7 @@ void func3(void) func2(); } -void main(void) +int main(void) { try { @@ -56,4 +56,5 @@ void main(void) { printf("This catch clause should not be executed.\n"); } + return 0; } diff --git a/GeneralsMD/Code/Libraries/Source/profile/test1/test1.cpp b/GeneralsMD/Code/Libraries/Source/profile/test1/test1.cpp index 7a5fc24750..b7e301e466 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/test1/test1.cpp +++ b/GeneralsMD/Code/Libraries/Source/profile/test1/test1.cpp @@ -78,7 +78,7 @@ void showResults(void) printf("%-16s%-6s %s\n",id.GetName(),id.GetTotalValue(),id.GetUnit()); } -void main(void) +int main(void) { for (int k=0;k<100;k++) if (k%2&&k>80) @@ -89,6 +89,7 @@ void main(void) recursionShell(); showResults(); + return 0; } int q; From 95e806436bebfdc3bd3b95b68cc3e5b5341ae113 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 00:41:37 +0200 Subject: [PATCH 17/32] [ZH] Fix to do stack trace only when support is enabled --- GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp index c909b08b9d..dfaf0ea27a 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp @@ -683,12 +683,14 @@ void ReleaseCrash(const char *reason) if (theReleaseCrashLogFile) { fprintf(theReleaseCrashLogFile, "Release Crash at %s; Reason %s\n", getCurrentTimeString(), reason); +#if defined(DEBUG_STACKTRACE) || defined(IG_DEBUG_STACKTRACE) fprintf(theReleaseCrashLogFile, "\nLast error:\n%s\n\nCurrent stack:\n", g_LastErrorDump.str()); const int STACKTRACE_SIZE = 12; const int STACKTRACE_SKIP = 6; void* stacktrace[STACKTRACE_SIZE]; ::FillStackAddresses(stacktrace, STACKTRACE_SIZE, STACKTRACE_SKIP); ::StackDumpFromAddresses(stacktrace, STACKTRACE_SIZE, releaseCrashLogOutput); +#endif fflush(theReleaseCrashLogFile); fclose(theReleaseCrashLogFile); @@ -773,11 +775,13 @@ void ReleaseCrashLocalized(const AsciiString& p, const AsciiString& m) { fprintf(theReleaseCrashLogFile, "Release Crash at %s; Reason %ls\n", getCurrentTimeString(), mesg.str()); +#if defined(DEBUG_STACKTRACE) || defined(IG_DEBUG_STACKTRACE) const int STACKTRACE_SIZE = 12; const int STACKTRACE_SKIP = 6; void* stacktrace[STACKTRACE_SIZE]; ::FillStackAddresses(stacktrace, STACKTRACE_SIZE, STACKTRACE_SKIP); ::StackDumpFromAddresses(stacktrace, STACKTRACE_SIZE, releaseCrashLogOutput); +#endif fflush(theReleaseCrashLogFile); fclose(theReleaseCrashLogFile); From ed1a5dd3f7833aa193fc1355d0e24773881f3f17 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 15:38:43 +0100 Subject: [PATCH 18/32] [ZH] Fix of unsigned short casts --- .../Source/WWVegas/WW3D2/ddsfile.cpp | 36 +++++++++---------- .../Source/WWVegas/WW3D2/dx8indexbuffer.cpp | 4 +-- .../Source/WWVegas/WW3D2/dx8renderer.cpp | 8 ++--- .../Source/WWVegas/WW3D2/motchan.cpp | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ddsfile.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ddsfile.cpp index 6d1373f69e..ce29968e57 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ddsfile.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/ddsfile.cpp @@ -399,8 +399,8 @@ void DDSFileClass::Copy_Level_To_Surface for (unsigned y=0;y>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -420,8 +420,8 @@ void DDSFileClass::Copy_Level_To_Surface *dest_ptr++=*src_ptr++; // Bytes 1-4 of alpha block *dest_ptr++=*src_ptr++; // Bytes 5-8 of alpha block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -461,8 +461,8 @@ void DDSFileClass::Copy_Level_To_Surface // *dest_ptr++=*src_ptr++; // Bytes 1-4 of color block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -555,8 +555,8 @@ void DDSFileClass::Copy_CubeMap_Level_To_Surface for (unsigned x=0;x>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -579,8 +579,8 @@ void DDSFileClass::Copy_CubeMap_Level_To_Surface *dest_ptr++=*src_ptr++; // Bytes 1-4 of alpha block *dest_ptr++=*src_ptr++; // Bytes 5-8 of alpha block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -628,8 +628,8 @@ void DDSFileClass::Copy_CubeMap_Level_To_Surface // *dest_ptr++=*src_ptr++; // Bytes 1-4 of color block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -728,8 +728,8 @@ void DDSFileClass::Copy_Volume_Level_To_Surface for (unsigned x=0;x>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -752,8 +752,8 @@ void DDSFileClass::Copy_Volume_Level_To_Surface *dest_ptr++=*src_ptr++; // Bytes 1-4 of alpha block *dest_ptr++=*src_ptr++; // Bytes 5-8 of alpha block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); @@ -801,8 +801,8 @@ void DDSFileClass::Copy_Volume_Level_To_Surface // *dest_ptr++=*src_ptr++; // Bytes 1-4 of color block unsigned cols=*src_ptr++; // Bytes 1-4 of color block - unsigned col0=RGB565_To_ARGB8888(unsigned short(cols>>16)); - unsigned col1=RGB565_To_ARGB8888(unsigned short(cols&0xffff)); + unsigned col0=RGB565_To_ARGB8888((unsigned short)(cols>>16)); + unsigned col1=RGB565_To_ARGB8888((unsigned short)(cols&0xffff)); Recolor(col0,hsv_shift); Recolor(col1,hsv_shift); col0=ARGB8888_To_RGB565(col0); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp index 68cadbba20..3366dd9806 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp @@ -142,14 +142,14 @@ void IndexBufferClass::Copy(unsigned int* indices,unsigned first_index,unsigned DX8IndexBufferClass::AppendLockClass l(this,first_index,count); unsigned short* inds=l.Get_Index_Array(); for (unsigned v=0;v Date: Sat, 29 Mar 2025 16:19:12 +0100 Subject: [PATCH 19/32] [ZH] typename fixes --- GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h index 8f73663fdc..568d2f9b99 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/prim_anim.h @@ -186,7 +186,7 @@ int PrimitiveAnimationChannelClass::Get_Key_Count (void) const // Set_Key_Value ///////////////////////////////////////////////////////// template -typename const PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const +const typename PrimitiveAnimationChannelClass::KeyClass &PrimitiveAnimationChannelClass::Get_Key (int index) const { return m_Data[index]; } @@ -361,8 +361,8 @@ LERPAnimationChannelClass::Evaluate (float time) this->m_LastIndex = 0; } - KeyClass *key1 = &m_Data[m_LastIndex]; - KeyClass *key2 = &m_Data[key_count - 1]; + typename PrimitiveAnimationChannelClass::KeyClass *key1 = &m_Data[m_LastIndex]; + typename PrimitiveAnimationChannelClass::KeyClass *key2 = &m_Data[key_count - 1]; // // Search, using last_key as our starting point From 81f4234f2bb6ae8a8ffac898ee157dcc3b435de9 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 19:10:59 +0100 Subject: [PATCH 20/32] [ZH] Fix of virtual method declarations --- GeneralsMD/Code/GameEngine/Include/Common/file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Include/Common/file.h b/GeneralsMD/Code/GameEngine/Include/Common/file.h index c81c8c247a..8e6fc2ff49 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/file.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/file.h @@ -129,15 +129,15 @@ class File : public MemoryPoolObject virtual Bool open( const Char *filename, Int access = 0 ); ///< Open a file for access virtual void close( void ); ///< Close the file !!! File object no longer valid after this call !!! - virtual Int read( void *buffer, Int bytes ) = NULL ; /**< Read the specified number of bytes from the file in to the + virtual Int read( void *buffer, Int bytes ) = 0 ; /**< Read the specified number of bytes from the file in to the * memory pointed at by buffer. Returns the number of bytes read. * Returns -1 if an error occured. */ - virtual Int write( const void *buffer, Int bytes ) = NULL ; /**< Write the specified number of bytes from the + virtual Int write( const void *buffer, Int bytes ) = 0 ; /**< Write the specified number of bytes from the * memory pointed at by buffer to the file. Returns the number of bytes written. * Returns -1 if an error occured. */ - virtual Int seek( Int bytes, seekMode mode = CURRENT ) = NULL; /**< Sets the file position of the next read/write operation. Returns the new file + virtual Int seek( Int bytes, seekMode mode = CURRENT ) = 0; /**< Sets the file position of the next read/write operation. Returns the new file * position as the number of bytes from the start of the file. * Returns -1 if an error occured. * From 4cb8d7cb84e32c889ba624ac657b0622c6fd4af4 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 19:38:51 +0100 Subject: [PATCH 21/32] [ZH] Fix of sizeof operators --- .../GameEngine/Source/Common/System/GameMemory.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/GameMemory.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/GameMemory.cpp index 6c57bdde75..47120b0733 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/GameMemory.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/GameMemory.cpp @@ -1560,7 +1560,7 @@ MemoryPoolBlob* MemoryPool::createBlob(Int allocationCount) { DEBUG_ASSERTCRASH(allocationCount > 0 && allocationCount%MEM_BOUND_ALIGNMENT==0, ("bad allocationCount (must be >0 and evenly divisible by %d)",MEM_BOUND_ALIGNMENT)); - MemoryPoolBlob* blob = new (::sysAllocateDoNotZero(sizeof MemoryPoolBlob)) MemoryPoolBlob; // will throw on failure + MemoryPoolBlob* blob = new (::sysAllocateDoNotZero(sizeof (MemoryPoolBlob))) MemoryPoolBlob; // will throw on failure blob->initBlob(this, allocationCount); // will throw on failure @@ -2665,7 +2665,7 @@ MemoryPool *MemoryPoolFactory::createMemoryPool(const char *poolName, Int alloca throw ERROR_OUT_OF_MEMORY; } - pool = new (::sysAllocateDoNotZero(sizeof MemoryPool)) MemoryPool; // will throw on failure + pool = new (::sysAllocateDoNotZero(sizeof (MemoryPool))) MemoryPool; // will throw on failure pool->init(this, poolName, allocationSize, initialAllocationCount, overflowAllocationCount); // will throw on failure pool->addToList(&m_firstPoolInFactory); @@ -2720,7 +2720,7 @@ DynamicMemoryAllocator *MemoryPoolFactory::createDynamicMemoryAllocator(Int numS { DynamicMemoryAllocator *dma; - dma = new (::sysAllocateDoNotZero(sizeof DynamicMemoryAllocator)) DynamicMemoryAllocator; // will throw on failure + dma = new (::sysAllocateDoNotZero(sizeof (DynamicMemoryAllocator))) DynamicMemoryAllocator; // will throw on failure dma->init(this, numSubPools, pParms); // will throw on failure dma->addToList(&m_firstDmaInFactory); @@ -3411,7 +3411,7 @@ void initMemoryManager() Int numSubPools; const PoolInitRec *pParms; userMemoryManagerGetDmaParms(&numSubPools, &pParms); - TheMemoryPoolFactory = new (::sysAllocateDoNotZero(sizeof MemoryPoolFactory)) MemoryPoolFactory; // will throw on failure + TheMemoryPoolFactory = new (::sysAllocateDoNotZero(sizeof (MemoryPoolFactory))) MemoryPoolFactory; // will throw on failure TheMemoryPoolFactory->init(); // will throw on failure TheDynamicMemoryAllocator = TheMemoryPoolFactory->createDynamicMemoryAllocator(numSubPools, pParms); // will throw on failure userMemoryManagerInitPools(); @@ -3486,7 +3486,7 @@ static void preMainInitMemoryManager() Int numSubPools; const PoolInitRec *pParms; userMemoryManagerGetDmaParms(&numSubPools, &pParms); - TheMemoryPoolFactory = new (::sysAllocateDoNotZero(sizeof MemoryPoolFactory)) MemoryPoolFactory; // will throw on failure + TheMemoryPoolFactory = new (::sysAllocateDoNotZero(sizeof (MemoryPoolFactory))) MemoryPoolFactory; // will throw on failure TheMemoryPoolFactory->init(); // will throw on failure TheDynamicMemoryAllocator = TheMemoryPoolFactory->createDynamicMemoryAllocator(numSubPools, pParms); // will throw on failure From 10738558a79268b8ed621d42ed86e0233ed2b163 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sun, 30 Mar 2025 00:43:48 +0100 Subject: [PATCH 22/32] [ZH] Fix of forgotten BitTest macro usage --- .../Source/Win32Device/GameClient/Win32DIMouse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp index d8b9cb4949..204c8599e5 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp @@ -148,7 +148,7 @@ void DirectInputMouse::openMouse( void ) // keep some data about the mouse we care about m_numButtons = (UnsignedByte)diDevCaps.dwButtons; m_numAxes = (UnsignedByte)diDevCaps.dwAxes; - m_forceFeedback = BitTest( diDevCaps.dwFlags, DIDC_FORCEFEEDBACK ); + m_forceFeedback = BitIsSet( diDevCaps.dwFlags, DIDC_FORCEFEEDBACK ); DEBUG_LOG(( "OK - Mouse info: Buttons = '%d', Force Feedback = '%s', Axes = '%d'\n", m_numButtons, m_forceFeedback ? "Yes" : "No", m_numAxes )); From ef1d8408c12938e799b5da9b9e76e088c68bdb72 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sun, 30 Mar 2025 00:55:03 +0100 Subject: [PATCH 23/32] [ZH] Fix making use of proper MouseButtonState constants --- .../Source/Win32Device/GameClient/Win32DIMouse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp index 204c8599e5..8520c4f2bd 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/Win32Device/GameClient/Win32DIMouse.cpp @@ -201,7 +201,7 @@ UnsignedByte DirectInputMouse::getMouseEvent( MouseIO *result, Bool flush ) DWORD num; /* set these to defaults */ - result->leftState = result->middleState = result->rightState = FALSE; + result->leftState = result->middleState = result->rightState = MBS_Up; result->leftFrame = result->middleFrame = result->rightFrame = 0; result->pos.x = result->pos.y = result->wheelPos = 0; @@ -282,17 +282,17 @@ void DirectInputMouse::mapDirectInputMouse( MouseIO *mouse, switch( mdat->dwOfs ) { case DIMOFS_BUTTON0: - mouse->leftState = (( mdat->dwData & 0x0080 ) ? TRUE : FALSE); + mouse->leftState = (( mdat->dwData & 0x0080 ) ? MBS_Down : MBS_Up); mouse->leftFrame = mdat->dwSequence; break; case DIMOFS_BUTTON1: - mouse->rightState = (( mdat->dwData & 0x0080 ) ? TRUE : FALSE); + mouse->rightState = (( mdat->dwData & 0x0080 ) ? MBS_Down : MBS_Up); mouse->rightFrame = mdat->dwSequence; break; case DIMOFS_BUTTON2: - mouse->middleState = (( mdat->dwData & 0x0080 ) ? TRUE : FALSE); + mouse->middleState = (( mdat->dwData & 0x0080 ) ? MBS_Down : MBS_Up); mouse->middleFrame = mdat->dwSequence; break; From cd6be773d88209c53eca636ed2f25d8348352d75 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 18:34:29 +0100 Subject: [PATCH 24/32] [ZH] Fix to avoid unsupported __try and __except on GCC --- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/thread.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/thread.cpp index c6c1f20561..5511753e03 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/thread.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/thread.cpp @@ -52,7 +52,7 @@ void __cdecl ThreadClass::Internal_Thread_Function(void* params) tc->running=true; tc->ThreadID = GetCurrentThreadId(); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) Register_Thread_ID(tc->ThreadID, tc->ThreadName); if (tc->ExceptionHandler != NULL) { @@ -67,7 +67,7 @@ void __cdecl ThreadClass::Internal_Thread_Function(void* params) tc->Thread_Function(); #endif //_WIN32 -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) Unregister_Thread_ID(tc->ThreadID, tc->ThreadName); #endif // _WIN32 tc->handle=0; From 9edf0f4151809b2a469f0892da4efc18e6fe68ea Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 1 Apr 2025 02:08:37 +0200 Subject: [PATCH 25/32] [ZH] Fix to avoid VS specific new operators on GCC --- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h index 4e392a9fb8..960a2d17b5 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/always.h @@ -101,7 +101,7 @@ #endif -#if (defined(_DEBUG) || defined(_INTERNAL)) +#if (defined(_DEBUG) || defined(_INTERNAL)) && !defined(__GNUC__) #define MSGW3DNEW(MSG) new( MSG, 0 ) #define MSGW3DNEWARRAY(MSG) new( MSG, 0 ) #define W3DNEW new("W3D_" __FILE__, 0) From 63ec6ddbf72f0563b22bf7787ad5238215e3c45e Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 17:27:32 +0100 Subject: [PATCH 26/32] [ZH] Fix of loop counter scope --- GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp index 423396bd77..117441acff 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp @@ -1220,7 +1220,8 @@ WWAudioClass::Remove_From_Playlist (AudibleSoundClass *sound_obj) if (sound_obj != NULL) { // Loop through all the entries in the playlist - for (int index = 0; (index < m_Playlist.Count ()) && (retval == false); index ++) { + int index = 0; + for (; (index < m_Playlist.Count ()) && (retval == false); index ++) { // Is this the entry we are looking for? if (sound_obj == m_Playlist[index]) { From aa307556edcb66b4f4fed954eb01b5600fad8612 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 16:55:21 +0100 Subject: [PATCH 27/32] [ZH] Fix of calls with excess argument --- GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textdraw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textdraw.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textdraw.cpp index f9644b71c0..3757754c6c 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textdraw.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textdraw.cpp @@ -274,7 +274,7 @@ float TextDrawClass::Print( Font3DInstanceClass *font, char ch, float screen_x, /* ** Set the triangles' texture */ - Set_Texture( font->Peek_Texture( ch ) ); + Set_Texture( font->Peek_Texture(/* ch */) ); /* ** Draw the quad @@ -338,7 +338,7 @@ void TextDrawClass::Show_Font( Font3DInstanceClass *font, float screen_x, float float size_x = PixelSize.X * 256; float size_y = PixelSize.Y * 256; - Set_Texture( font->Peek_Texture('A') ); + Set_Texture( font->Peek_Texture(/* 'A' */) ); Quad( screen_x, screen_y, screen_x + size_x, screen_y + size_y * WWMath::Sign( -TranslateScale.Y ) ); } From 23a34a900629bfda4edd512093628d3d0023a35e Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sun, 30 Mar 2025 03:17:27 +0200 Subject: [PATCH 28/32] [ZH] Removal of duplicit strtrim --- GeneralsMD/Code/Main/WinMain.cpp | 36 +------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/GeneralsMD/Code/Main/WinMain.cpp b/GeneralsMD/Code/Main/WinMain.cpp index 716fe8536b..ab2f3175d7 100644 --- a/GeneralsMD/Code/Main/WinMain.cpp +++ b/GeneralsMD/Code/Main/WinMain.cpp @@ -61,6 +61,7 @@ #include "GameClient/IMEManager.h" #include "Win32Device/GameClient/Win32Mouse.h" #include "Win32Device/Common/Win32GameEngine.h" +#include "WWLib/trim.h" #include "Common/version.h" #include "BuildVersion.h" #include "GeneratedVersion.h" @@ -777,41 +778,6 @@ void checkProtection(void) #endif } -// strtrim ==================================================================== -/** Trim leading and trailing whitespace from a character string (in place). */ -//============================================================================= -static char* strtrim(char* buffer) -{ - if (buffer != NULL) { - // Strip leading white space from the string. - char * source = buffer; - while ((*source != 0) && ((unsigned char)*source <= 32)) - { - source++; - } - - if (source != buffer) - { - strcpy(buffer, source); - } - - // Clip trailing white space from the string. - for (int index = strlen(buffer)-1; index >= 0; index--) - { - if ((*source != 0) && ((unsigned char)buffer[index] <= 32)) - { - buffer[index] = '\0'; - } - else - { - break; - } - } - } - - return buffer; -} - char *nextParam(char *newSource, const char *seps) { static char *source = NULL; From b117146d4d373ff3f5a1b5b5c8d0456a24ffcfcb Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Sat, 29 Mar 2025 17:57:39 +0100 Subject: [PATCH 29/32] [ZH] Fix of strtok_r redefinition on mingw --- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.cpp | 2 +- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.cpp index d7cb2d73a2..61a72683a5 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.cpp @@ -49,7 +49,7 @@ // but the fact that you can't call a function that uses strtok() // during a series of strtok() calls is really annoying. // -#ifndef _UNIX +#if !defined(_UNIX) && !defined(__MINGW32__) char *strtok_r(char *strptr, const char *delimiters, char **lasts) { if (strptr) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.h index a509f98c61..096ae09f61 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/strtok_r.h @@ -44,7 +44,7 @@ #ifndef __STRTOK_R_H__ #define __STRTOK_R_H__ -#ifndef _UNIX +#if !defined(_UNIX) && !defined(__MINGW32__) char *strtok_r(char *strptr, const char *delimiters, char **lasts); #endif From feba1d312e4656f289f360fdd4e3b65b11640097 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 01:59:32 +0200 Subject: [PATCH 30/32] [ZH] Use feature testing macros for std::atomic_flag::{wait,notify_one} --- GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mutex.h | 4 ++++ GeneralsMD/Code/Libraries/Source/profile/internal.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mutex.h b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mutex.h index e95e56fde6..488b2a112e 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mutex.h +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWLib/mutex.h @@ -185,7 +185,9 @@ class FastCriticalSectionClass ; #else while (cs.Flag.test_and_set(std::memory_order_acquire)) { +#if defined(__cpp_lib_atomic_wait) && __cpp_lib_atomic_wait >= 201907L cs.Flag.wait(true, std::memory_order_relaxed); +#endif } #endif } @@ -195,7 +197,9 @@ class FastCriticalSectionClass cs.Flag=0; #else cs.Flag.clear(std::memory_order_release); +#if defined(__cpp_lib_atomic_wait) && __cpp_lib_atomic_wait >= 201907L cs.Flag.notify_one(); +#endif #endif } diff --git a/GeneralsMD/Code/Libraries/Source/profile/internal.h b/GeneralsMD/Code/Libraries/Source/profile/internal.h index 8035fb90c0..b6e9816b1e 100644 --- a/GeneralsMD/Code/Libraries/Source/profile/internal.h +++ b/GeneralsMD/Code/Libraries/Source/profile/internal.h @@ -94,14 +94,18 @@ class ProfileFastCS void ThreadSafeSetFlag() { while (Flag.test_and_set(std::memory_order_acquire)) { +#if defined(__cpp_lib_atomic_wait) && __cpp_lib_atomic_wait >= 201907L Flag.wait(true, std::memory_order_relaxed); +#endif } } void ThreadSafeClearFlag() { Flag.clear(std::memory_order_release); +#if defined(__cpp_lib_atomic_wait) && __cpp_lib_atomic_wait >= 201907L Flag.notify_one(); +#endif } public: From c5cc49cdb2814d87f5ba106a8d3f9750c80607b0 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 21:43:35 +0200 Subject: [PATCH 31/32] [ZH] Fixes to intrin_compat.h --- Dependencies/Utility/Utility/intrin_compat.h | 28 +++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Dependencies/Utility/Utility/intrin_compat.h b/Dependencies/Utility/Utility/intrin_compat.h index c0e2ffa9e7..2df660c446 100644 --- a/Dependencies/Utility/Utility/intrin_compat.h +++ b/Dependencies/Utility/Utility/intrin_compat.h @@ -68,11 +68,12 @@ static inline uint32_t _lrotl(uint32_t value, int shift) #ifdef _WIN32 #include #pragma intrinsic(__rdtsc) -#endif - +#endif // _WIN32 +#endif // _rdtsc +#ifndef _rdtsc static inline uint64_t _rdtsc() { -#if _WIN32 +#ifdef _WIN32 return __rdtsc(); #elif defined(__has_builtin) && __has_builtin(__builtin_readcyclecounter) return __builtin_readcyclecounter(); @@ -82,9 +83,9 @@ static inline uint64_t _rdtsc() #error "No implementation for _rdtsc" #endif } -#endif +#endif // _rdtsc -#ifdef _MSC_VER +#ifdef _WIN32 #include #pragma intrinsic(_ReturnAddress) #elif defined(__has_builtin) @@ -113,17 +114,20 @@ static inline uint64_t _rdtsc() #endif #ifndef cpuid -#if defined(_MSC_VER) +#if (defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __amd64__) +#ifdef _WIN32 #include #define cpuid(regs, cpuid_type) __cpuid(reinterpret_cast(regs), cpuid_type) -#elif (defined __clang__ || defined __GNUC__) && (defined __i386__ || defined __amd64__) +#elif (defined __clang__ || defined __GNUC__) #include #define cpuid(regs, cpuid_type) __cpuid(cpuid_type, regs[0], regs[1], regs[2], regs[3]) -#else -/* Just return 0 for everything if its not x86 */ +#endif +#endif // (defined __i386__ || defined __amd64__) +#endif // cpuid +#ifndef cpuid +/* Just return 0 for everything if its not x86 or as fallback */ #include #define cpuid(regs, cpuid_type) memset(regs, 0, 16) -#endif -#endif //cpuid +#endif // cpuid -#endif // defined(_MSC_VER) && _MSC_VER < 1300 +#endif // !(defined(_MSC_VER) && _MSC_VER < 1300) From ff2197f3e41f128f1c275c5403a40adb9cc05a61 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Wed, 2 Apr 2025 21:57:38 +0200 Subject: [PATCH 32/32] [ZH] Rest of asm code made VC only --- Dependencies/Utility/Utility/CppMacros.h | 5 +++++ .../Code/GameEngine/Source/Common/System/StackDump.cpp | 8 ++++++++ GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp | 10 ++++++++-- .../Code/Libraries/Source/debug/debug_except.cpp | 5 +++++ GeneralsMD/Code/Libraries/Source/debug/debug_stack.cpp | 5 +++++ 5 files changed, 31 insertions(+), 2 deletions(-) diff --git a/Dependencies/Utility/Utility/CppMacros.h b/Dependencies/Utility/Utility/CppMacros.h index 3f26570cb4..b7a61b0c36 100644 --- a/Dependencies/Utility/Utility/CppMacros.h +++ b/Dependencies/Utility/Utility/CppMacros.h @@ -3,6 +3,11 @@ #pragma once +#include +#define UNIMPLEMEMTED_ERROR(msg) do { \ + assert(("Unimplemented: ", msg, 0)); \ + } while(0) + #if __cplusplus >= 201703L #define NOEXCEPT_17 noexcept #else diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp index 9846ca3eb5..644a176d40 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp @@ -76,6 +76,7 @@ void StackDump(void (*callback)(const char*)) DWORD myeip,myesp,myebp; +#ifdef _MSC_VER _asm { MYEIP1: @@ -86,6 +87,9 @@ _asm mov eax, ebp mov dword ptr [myebp] , eax } +#else + UNIMPLEMEMTED_ERROR("StackDump"); +#endif MakeStackTrace(myeip,myesp,myebp, 2, callback); @@ -340,6 +344,7 @@ void FillStackAddresses(void**addresses, unsigned int count, unsigned int skip) gsContext.ContextFlags = CONTEXT_FULL; DWORD myeip,myesp,myebp; +#ifdef _MSC_VER _asm { MYEIP2: @@ -351,6 +356,9 @@ _asm mov dword ptr [myebp] , eax xor eax,eax } +#else + UNIMPLEMEMTED_ERROR("FillStackAddresses"); +#endif memset(&stack_frame, 0, sizeof(STACKFRAME)); stack_frame.AddrPC.Mode = AddrModeFlat; stack_frame.AddrPC.Offset = myeip; diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp index 85f45729b8..8a9601b5bf 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp @@ -32,6 +32,8 @@ #include #include // needed for placement new prototype #include +#include +#include // a little dummy variable that makes the linker actually include // us... @@ -271,11 +273,15 @@ bool Debug::SkipNext(void) // do not implement this function inline, we do need // a valid frame pointer here! unsigned help; +#ifdef _MSC_VER _asm { mov eax,[ebp+4] // return address mov help,eax }; +#else + UNIMPLEMEMTED_ERROR("Debug::SkipNext"); +#endif curStackFrame=help; // do we know if to skip the following code? @@ -387,7 +393,7 @@ bool Debug::AssertDone(void) } break; case IDRETRY: - _asm int 0x03 + __debugbreak(); break; default: ((void)0); @@ -655,7 +661,7 @@ bool Debug::CrashDone(bool die) } break; case IDRETRY: - _asm int 0x03 + __debugbreak(); break; default: ((void)0); diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_except.cpp b/GeneralsMD/Code/Libraries/Source/debug/debug_except.cpp index 765ff6b6eb..032cd5e1e5 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_except.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_except.cpp @@ -28,6 +28,7 @@ ////////////////////////////////////////////////////////////////////////////// #include "_pch.h" #include +#include DebugExceptionhandler::DebugExceptionhandler(void) { @@ -173,12 +174,16 @@ void DebugExceptionhandler::LogFPURegisters(Debug &dbg, struct _EXCEPTION_POINTE double fpVal; // convert from temporary real (10 byte) to double +#ifdef _MSC_VER _asm { mov eax,value fld tbyte ptr [eax] fstp qword ptr [fpVal] } +#else + UNIMPLEMEMTED_ERROR("LogFPURegisters"); +#endif dbg << " " << fpVal << "\n"; } diff --git a/GeneralsMD/Code/Libraries/Source/debug/debug_stack.cpp b/GeneralsMD/Code/Libraries/Source/debug/debug_stack.cpp index 92416b51f7..0132c8b597 100644 --- a/GeneralsMD/Code/Libraries/Source/debug/debug_stack.cpp +++ b/GeneralsMD/Code/Libraries/Source/debug/debug_stack.cpp @@ -28,6 +28,7 @@ ////////////////////////////////////////////////////////////////////////////// #include "_pch.h" #include +#include // Definitions to allow run-time linking to the dbghelp.dll functions. @@ -363,6 +364,7 @@ int DebugStackwalk::StackWalk(Signature &sig, struct _CONTEXT *ctx) { // walk stack back using current call chain unsigned long reg_eip, reg_ebp, reg_esp; +#ifdef _MSC_VER __asm { here: @@ -371,6 +373,9 @@ int DebugStackwalk::StackWalk(Signature &sig, struct _CONTEXT *ctx) mov reg_ebp,ebp mov reg_esp,esp }; +#else + UNIMPLEMEMTED_ERROR("DebugStackwalk::StackWalk"); +#endif stackFrame.AddrPC.Offset = reg_eip; stackFrame.AddrStack.Offset = reg_esp; stackFrame.AddrFrame.Offset = reg_ebp;