Skip to content

Commit 2af198a

Browse files
committed
[GEN] Add missing value types for Generals build (#484)
1 parent edea6ee commit 2af198a

File tree

10 files changed

+19
-17
lines changed

10 files changed

+19
-17
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ enum
195195
SHOW_FRAMES_LIMIT = 20
196196
};
197197

198-
static showFade = FALSE;
198+
static Int showFade = FALSE;
199199
static Int dropDown = DROPDOWN_NONE;
200200
static Int pendingDropDown = DROPDOWN_NONE;
201201
static AnimateWindowManager *localAnimateWindowManager = NULL;
@@ -211,7 +211,7 @@ static Bool justEntered = FALSE;
211211
static Bool dontAllowTransitions = FALSE;
212212

213213
//Added by Saad
214-
const /*Int TIME_OUT = 15,*/ CORNER = 10;
214+
const Int /*TIME_OUT = 15,*/ CORNER = 10;
215215
void AcceptResolution();
216216
void DeclineResolution();
217217
GameWindow *resAcceptMenu = NULL;

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ WindowMsgHandledType WOLGameSetupMenuSystem( GameWindow *window, UnsignedInt msg
23952395
WindowMsgData mData1, WindowMsgData mData2 )
23962396
{
23972397
UnicodeString txtInput;
2398-
static buttonCommunicatorID = NAMEKEY_INVALID;
2398+
static Int buttonCommunicatorID = NAMEKEY_INVALID;
23992399
switch( msg )
24002400
{
24012401
//-------------------------------------------------------------------------------------------------
@@ -2495,7 +2495,7 @@ WindowMsgHandledType WOLGameSetupMenuSystem( GameWindow *window, UnsignedInt msg
24952495

24962496
GameWindow *control = (GameWindow *)mData1;
24972497
Int controlID = control->winGetWindowId();
2498-
static buttonCommunicatorID = NAMEKEY("GameSpyGameOptionsMenu.wnd:ButtonCommunicator");
2498+
static Int buttonCommunicatorID = NAMEKEY("GameSpyGameOptionsMenu.wnd:ButtonCommunicator");
24992499

25002500
if ( controlID == buttonBackID )
25012501
{

Generals/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ PathfindCell::~PathfindCell( void )
11841184
{
11851185
if (m_info) PathfindCellInfo::releaseACellInfo(m_info);
11861186
m_info = NULL;
1187-
static warn = true;
1187+
static Bool warn = true;
11881188
if (warn) {
11891189
warn = false;
11901190
DEBUG_LOG( ("PathfindCell::~PathfindCell m_info Allocated."));

Generals/Code/GameEngine/Source/GameLogic/AI/TurretAI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ UpdateSleepTime TurretAI::updateTurretAI()
704704
if (m_didFire)
705705
{
706706
// if we fired, enable sweeping for a few frames.
707-
const ENABLE_SWEEP_FRAME_COUNT = 3;
707+
const Int ENABLE_SWEEP_FRAME_COUNT = 3;
708708
m_enableSweepUntil = now + ENABLE_SWEEP_FRAME_COUNT;
709709
m_continuousFireExpirationFrame = now + ENABLE_SWEEP_FRAME_COUNT;// so the recent firing will not interrupt the moving sound
710710
}

Generals/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ void WeaponStore::update()
14051405
if (curFrame >= ddi->m_delayDamageFrame)
14061406
{
14071407
// we never do projectile-detonation-damage via this code path.
1408-
const isProjectileDetonation = false;
1408+
const Bool isProjectileDetonation = false;
14091409
ddi->m_delayedWeapon->dealDamageInternal(ddi->m_delaySourceID, ddi->m_delayIntendedVictimID, &ddi->m_delayDamagePos, ddi->m_bonus, isProjectileDetonation);
14101410
ddi = m_weaponDDI.erase(ddi);
14111411
}

Generals/Code/GameEngine/Source/GameNetwork/GameSpy/Thread/GameResultsThread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Bool GameResultsQueue::areGameResultsBeingSent( void )
208208

209209
//-------------------------------------------------------------------------
210210
// Wrap ladder results in HTTP POST
211-
static WrapHTTP( const std::string& hostname, std::string& results )
211+
static void WrapHTTP( const std::string& hostname, std::string& results )
212212
{
213213
const char HEADER[] =
214214
"PUT / HTTP/1.1\r\n"

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DAssetManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ void W3DAssetManager::Recolor_Vertex_Material(VertexMaterialClass *vmat, const i
973973

974974
#ifdef DUMP_PERF_STATS
975975
__int64 Total_Load_3D_Assets=0;
976-
static Load_3D_Asset_Recursions=0;
976+
static Int Load_3D_Asset_Recursions=0;
977977
#endif
978978
//---------------------------------------------------------------------
979979
bool W3DAssetManager::Load_3D_Assets( const char * filename )
@@ -1075,7 +1075,7 @@ bool W3DAssetManager::Load_3D_Assets( const char * filename )
10751075

10761076
#ifdef DUMP_PERF_STATS
10771077
__int64 Total_Get_HAnim_Time=0;
1078-
static HAnim_Recursions=0;
1078+
static Int HAnim_Recursions=0;
10791079
#endif
10801080
//---------------------------------------------------------------------
10811081
HAnimClass * W3DAssetManager::Get_HAnim(const char * name)

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ void W3DDisplay::gatherDebugStats( void )
13741374

13751375
unibuffer.concat( L"\nModelStates: " );
13761376
ModelConditionFlags mcFlags = draw->getModelConditionFlags();
1377-
const numEntriesPerLine = 4;
1377+
const int numEntriesPerLine = 4;
13781378
int lineCount = 0;
13791379

13801380
for( int i = 0; i < MODELCONDITION_COUNT; i++ )

Generals/Code/Libraries/Source/WWVegas/WW3D2/lightenvironment.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ const float DIFFUSE_TO_AMBIENT_FRACTION = 1.0f;
5252
/*
5353
** Static variables
5454
*/
55-
static _LightingLODCutoff = 0.5f;
56-
static _LightingLODCutoff2 = 0.5f * 0.5f;
55+
// TheSuperHackers @fix xezon 13/03/2025 Set integer type as per the original.
56+
// TODO: Investigate if it should be a float.
57+
static int _LightingLODCutoff = 0.5f;
58+
static int _LightingLODCutoff2 = 0.5f * 0.5f;
5759

5860

5961
/************************************************************************************************

Generals/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ class WWAudioClass
510510
: string_id (0), buffer (NULL) {}
511511

512512
_CACHE_ENTRY_STRUCT &operator= (const _CACHE_ENTRY_STRUCT &src) { string_id = ::strdup (src.string_id); REF_PTR_SET (buffer, src.buffer); return *this; }
513-
operator== (const _CACHE_ENTRY_STRUCT &src) { return false; }
514-
operator!= (const _CACHE_ENTRY_STRUCT &src) { return true; }
513+
bool operator== (const _CACHE_ENTRY_STRUCT &src) { return false; }
514+
bool operator!= (const _CACHE_ENTRY_STRUCT &src) { return true; }
515515
} CACHE_ENTRY_STRUCT;
516516

517517

@@ -526,8 +526,8 @@ class WWAudioClass
526526
_LOGICAL_TYPE_STRUCT (int _id, LPCTSTR name)
527527
: display_name (name), id (_id) {}
528528

529-
operator== (const _LOGICAL_TYPE_STRUCT &src) { return false; }
530-
operator!= (const _LOGICAL_TYPE_STRUCT &src) { return true; }
529+
bool operator== (const _LOGICAL_TYPE_STRUCT &src) { return false; }
530+
bool operator!= (const _LOGICAL_TYPE_STRUCT &src) { return true; }
531531
} LOGICAL_TYPE_STRUCT;
532532

533533
//////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)