diff --git a/src/game/client/c_soundscape.cpp b/src/game/client/c_soundscape.cpp index 67c7b5232..0802ec513 100644 --- a/src/game/client/c_soundscape.cpp +++ b/src/game/client/c_soundscape.cpp @@ -1189,7 +1189,7 @@ void C_SoundscapeSystem::ProcessPlayRandom( KeyValues *pPlayRandom, const subsou { interval_t atten = ReadInterval( pKey->GetString() ); sound.soundlevel.start = ATTN_TO_SNDLVL( atten.start ); - sound.soundlevel.range = ATTN_TO_SNDLVL( atten.start + atten.range ) - sound.soundlevel.start; + sound.soundlevel.range = (float)ATTN_TO_SNDLVL( atten.start + atten.range ) - sound.soundlevel.start; } else if ( !Q_strcasecmp( pKey->GetName(), "soundlevel" ) ) { diff --git a/src/game/client/c_testtraceline.cpp b/src/game/client/c_testtraceline.cpp index 550a22eca..1fd27d036 100644 --- a/src/game/client/c_testtraceline.cpp +++ b/src/game/client/c_testtraceline.cpp @@ -60,10 +60,7 @@ C_TestTraceline::~C_TestTraceline() } -enum -{ - CUBE_SIZE = 5 -}; +#define CUBE_SIZE 5 void C_TestTraceline::DrawCube( Vector& center, unsigned char* pColor ) { diff --git a/src/game/client/cdll_client_int.h b/src/game/client/cdll_client_int.h index eae300bbc..991e96237 100644 --- a/src/game/client/cdll_client_int.h +++ b/src/game/client/cdll_client_int.h @@ -56,10 +56,10 @@ class IAvi; class IBik; class IReplayHistoryManager; class ISoundEmitterSystemBase; -enum CPULevel_t; -enum GPULevel_t; -enum MemLevel_t; -enum GPUMemLevel_t; +enum CPULevel_t : int; +enum GPULevel_t : int; +enum MemLevel_t : int; +enum GPUMemLevel_t : int; extern IVModelRender *modelrender; extern IVEngineClient *engine; diff --git a/src/game/client/clientshadowmgr.cpp b/src/game/client/clientshadowmgr.cpp index 31134b7e4..129055e79 100644 --- a/src/game/client/clientshadowmgr.cpp +++ b/src/game/client/clientshadowmgr.cpp @@ -903,13 +903,14 @@ class CClientShadowMgr : public IClientShadowMgr virtual void UpdateSplitscreenLocalPlayerShadowSkip(); private: - enum + enum CClientShadowMgrFlags_t { SHADOW_FLAGS_TEXTURE_DIRTY = (CLIENT_SHADOW_FLAGS_LAST_FLAG << 1), SHADOW_FLAGS_BRUSH_MODEL = (CLIENT_SHADOW_FLAGS_LAST_FLAG << 2), SHADOW_FLAGS_USING_LOD_SHADOW = (CLIENT_SHADOW_FLAGS_LAST_FLAG << 3), SHADOW_FLAGS_LIGHT_WORLD = (CLIENT_SHADOW_FLAGS_LAST_FLAG << 4), }; + friend constexpr auto operator|(ShadowFlags_t a, CClientShadowMgrFlags_t b) { return a | static_cast(b); }; struct ClientShadow_t { diff --git a/src/game/client/swarm/vgui/nb_skill_panel.h b/src/game/client/swarm/vgui/nb_skill_panel.h index fbeb1dda7..038a4809f 100644 --- a/src/game/client/swarm/vgui/nb_skill_panel.h +++ b/src/game/client/swarm/vgui/nb_skill_panel.h @@ -16,7 +16,7 @@ class StatsBar; // == MANAGED_CLASS_DECLARATIONS_END == class CBitmapButton; class BriefingTooltip; -enum ASW_Skill; +enum ASW_Skill : int; class CNB_Skill_Panel : public vgui::EditablePanel { diff --git a/src/game/client/vgui_fpspanel.cpp b/src/game/client/vgui_fpspanel.cpp index 1a5dc4f0d..6ecf36484 100644 --- a/src/game/client/vgui_fpspanel.cpp +++ b/src/game/client/vgui_fpspanel.cpp @@ -72,7 +72,7 @@ class CFPSPanel : public vgui::Panel memset( m_pServerTimes, 0, sizeof(m_pServerTimes) ); } - enum { SERVER_TIME_HISTORY = 32 }; + static constexpr int SERVER_TIME_HISTORY = 32; vgui::HFont m_hFont; float m_AverageFPS; diff --git a/src/game/server/ai_network.h b/src/game/server/ai_network.h index 0e5bc442f..b7e665a52 100644 --- a/src/game/server/ai_network.h +++ b/src/game/server/ai_network.h @@ -167,11 +167,8 @@ class CAI_Network : public IPartitionEnumerator //--------------------------------- - enum - { - NEARNODE_CACHE_SIZE = 32, - NEARNODE_CACHE_LIFE = 10, - }; + static constexpr int NEARNODE_CACHE_SIZE = 32; + static constexpr int NEARNODE_CACHE_LIFE = 10; struct NearNodeCache_T { diff --git a/src/game/server/ai_pathfinder.cpp b/src/game/server/ai_pathfinder.cpp index 98b5b3eff..977c67d24 100644 --- a/src/game/server/ai_pathfinder.cpp +++ b/src/game/server/ai_pathfinder.cpp @@ -1796,6 +1796,10 @@ bool CAI_Pathfinder::CheckStaleRoute(const Vector &vStart, const Vector &vEnd, i //----------------------------------------------------------------------------- +#ifdef DEBUG +OVERLOAD_ENUM_COMPARISON(RouteBuildFlags_e, Capability_t); +#endif + #define MAX_NODE_TRIES 4 #define MAX_TRIANGULATIONS 2 diff --git a/src/game/server/ai_utils.h b/src/game/server/ai_utils.h index ea2059e31..484591f03 100644 --- a/src/game/server/ai_utils.h +++ b/src/game/server/ai_utils.h @@ -122,11 +122,8 @@ class CAI_MoveMonitor Vector GetMarkPos() { return m_vMark; } private: - enum - { - NO_MARK = -1 - }; - + static constexpr int NO_MARK = -1; + Vector m_vMark; float m_flMarkTolerance; diff --git a/src/game/server/baseflex.cpp b/src/game/server/baseflex.cpp index 8eb299442..3ba6fbbc3 100644 --- a/src/game/server/baseflex.cpp +++ b/src/game/server/baseflex.cpp @@ -2583,7 +2583,7 @@ void CFlexCycler::Think( void ) for ( LocalFlexController_t i = LocalFlexController_t(0); i < GetNumFlexControllers(); i++ ) { // Throw a differently offset sine wave on all of the flex controllers - float fFlexTime = i * (1.0f / (float)GetNumFlexControllers()) + gpGlobals->curtime; + float fFlexTime = (float)i * (1.0f / (float)GetNumFlexControllers()) + gpGlobals->curtime; m_flextarget[i] = sinf( fFlexTime ) * 0.5f + 0.5f; SetFlexWeight( i, m_flextarget[i] ); } @@ -2632,7 +2632,7 @@ void CFlexCycler::Think( void ) { m_flexnum = LookupFlex( szTemp ); - if (m_flexnum != -1 && m_flextarget[m_flexnum] != 1) + if ((int)m_flexnum != -1 && m_flextarget[m_flexnum] != 1) { m_flextarget[m_flexnum] = 1.0; // SetFlexTarget( m_flexnum ); @@ -2647,7 +2647,7 @@ void CFlexCycler::Think( void ) else if (m_flextime < gpGlobals->curtime) { // m_flextime = gpGlobals->curtime + 1.0; // RandomFloat( 0.1, 0.5 ); - m_flextime = gpGlobals->curtime + random->RandomFloat( 0.3, 0.5 ) * (30.0 / GetNumFlexControllers()); + m_flextime = gpGlobals->curtime + random->RandomFloat( 0.3, 0.5 ) * (30.0 / (int)GetNumFlexControllers()); m_flexnum = (LocalFlexController_t)random->RandomInt( 0, GetNumFlexControllers() - 1 ); // m_flexnum = (pflex->num + 1) % r_psubmodel->numflexes; diff --git a/src/game/server/genericactor.cpp b/src/game/server/genericactor.cpp index 025cb51f6..85f7cfa3d 100644 --- a/src/game/server/genericactor.cpp +++ b/src/game/server/genericactor.cpp @@ -386,7 +386,7 @@ void CFlextalkActor::ProcessSceneEvents( void ) } else if (m_flextime < gpGlobals->curtime) { - m_flextime = gpGlobals->curtime + random->RandomFloat( 0.3, 0.5 ) * (30.0 / GetNumFlexControllers()); + m_flextime = gpGlobals->curtime + random->RandomFloat( 0.3, 0.5 ) * (30.0 / (int)GetNumFlexControllers()); m_flexnum = (LocalFlexController_t)random->RandomInt( 0, GetNumFlexControllers() - 1 ); if (m_flextarget[m_flexnum] == 1) diff --git a/src/game/server/hl2/npc_strider.cpp b/src/game/server/hl2/npc_strider.cpp index 8e9e0df2b..e6fa22793 100644 --- a/src/game/server/hl2/npc_strider.cpp +++ b/src/game/server/hl2/npc_strider.cpp @@ -1790,7 +1790,7 @@ void CNPC_Strider::RunTask( const Task_t *pTask ) break; case TASK_PLAY_SEQUENCE: - if( m_bFastCrouch && pTask->flTaskData == ACT_CROUCH ) + if( m_bFastCrouch && pTask->flTaskData == static_cast( ACT_CROUCH ) ) { SetPlaybackRate( 10.0f ); if( IsSequenceFinished() ) diff --git a/src/game/server/swarm/asw_ai_behavior.h b/src/game/server/swarm/asw_ai_behavior.h index 77b0678d6..afc93432c 100644 --- a/src/game/server/swarm/asw_ai_behavior.h +++ b/src/game/server/swarm/asw_ai_behavior.h @@ -25,7 +25,7 @@ // Be sure to expose these to vscript in // void CASW_Alien::LinkEnumsToScope( CScriptScope &hScope ) -enum BehaviorEvent_t +enum BehaviorEvent_t : int { BEHAVIOR_EVENT_START_HEAL = 0, BEHAVIOR_EVENT_FINISH_HEAL, diff --git a/src/game/server/swarm/asw_alien.h b/src/game/server/swarm/asw_alien.h index 058199bce..d5e87fd00 100644 --- a/src/game/server/swarm/asw_alien.h +++ b/src/game/server/swarm/asw_alien.h @@ -19,7 +19,7 @@ class TakeDamageInfo; class CASW_Spawner; class CAI_ASW_FlinchBehavior; class CAI_ASW_Behavior; -enum BehaviorEvent_t; +enum BehaviorEvent_t : int; // Keep track of recent damage events for use in asw_ai_behavior_combat_stun.cpp static const int ASW_NUM_RECENT_DAMAGE = 8; diff --git a/src/game/server/swarm/asw_marine_resource.cpp b/src/game/server/swarm/asw_marine_resource.cpp index 37be8e442..da4a39dc2 100644 --- a/src/game/server/swarm/asw_marine_resource.cpp +++ b/src/game/server/swarm/asw_marine_resource.cpp @@ -119,8 +119,8 @@ IMPLEMENT_SERVERCLASS_ST( CASW_Marine_Resource, DT_ASW_Marine_Resource ) SendPropEHandle( SENDINFO( m_OriginalCommander ) ), SendPropEHandle( SENDINFO( m_Commander ) ), SendPropIntWithMinusOneFlag( SENDINFO( m_iCommanderIndex ), NumBitsForCount( ABSOLUTE_PLAYER_LIMIT + 1 ) ), - SendPropArray( SendPropIntWithMinusOneFlag( SENDINFO_ARRAY( m_iWeaponsInSlots ), NumBitsForCount( MAX( ASW_NUM_EQUIP_REGULAR, ASW_NUM_EQUIP_EXTRA ) + 1 ) ), m_iWeaponsInSlots ), - SendPropArray( SendPropIntWithMinusOneFlag( SENDINFO_ARRAY( m_iInitialWeaponsInSlots ), NumBitsForCount( MAX( ASW_NUM_EQUIP_REGULAR, ASW_NUM_EQUIP_EXTRA ) + 1 ) ), m_iInitialWeaponsInSlots ), + SendPropArray( SendPropIntWithMinusOneFlag( SENDINFO_ARRAY( m_iWeaponsInSlots ), NumBitsForCount( MAX( (int)ASW_NUM_EQUIP_REGULAR, (int)ASW_NUM_EQUIP_EXTRA ) + 1 ) ), m_iWeaponsInSlots ), + SendPropArray( SendPropIntWithMinusOneFlag( SENDINFO_ARRAY( m_iInitialWeaponsInSlots ), NumBitsForCount( MAX( (int)ASW_NUM_EQUIP_REGULAR, (int)ASW_NUM_EQUIP_EXTRA ) + 1 ) ), m_iInitialWeaponsInSlots ), SendPropBool( SENDINFO( m_bInfested ) ), SendPropBool( SENDINFO( m_bInhabited ) ), SendPropInt( SENDINFO( m_iServerFiring ), 2, SPROP_UNSIGNED ), diff --git a/src/game/server/swarm/asw_player.h b/src/game/server/swarm/asw_player.h index fc8aa428e..a501fdefc 100644 --- a/src/game/server/swarm/asw_player.h +++ b/src/game/server/swarm/asw_player.h @@ -20,6 +20,8 @@ class CASW_Inhabitable_NPC; class CASW_Marine; class CRagdollProp; +enum EInventoryCommand : int; + //============================================================================= // >> Swarm player //============================================================================= diff --git a/src/game/server/swarm/asw_sentry_top.h b/src/game/server/swarm/asw_sentry_top.h index ae9e94d66..c991ade1b 100644 --- a/src/game/server/swarm/asw_sentry_top.h +++ b/src/game/server/swarm/asw_sentry_top.h @@ -96,14 +96,11 @@ class CASW_Sentry_Top : public CBaseCombatCharacter CNetworkHandle( CASW_Sentry_Base, m_hSentryBase ); // Constants: - enum - { - ASW_SENTRY_TURNRATE = 150, // angles per second - ASW_SENTRY_ANGLE = 60, // spread on each side - ASW_SENTRY_FIRING_HEIGHT = 50, - ASW_SENTRY_FIRE_ANGLE_THRESHOLD = 3, - ASW_SENTRY_RANGE = 525, // just the default - }; + static constexpr int ASW_SENTRY_TURNRATE = 150; // angles per second + static constexpr int ASW_SENTRY_ANGLE = 60; // spread on each side + static constexpr int ASW_SENTRY_FIRING_HEIGHT = 50; + static constexpr int ASW_SENTRY_FIRE_ANGLE_THRESHOLD = 3; + static constexpr int ASW_SENTRY_RANGE = 525; // just the default protected: // helper function used by FindEnemy diff --git a/src/game/shared/death_pose.cpp b/src/game/shared/death_pose.cpp index b4b637dde..4698158ce 100644 --- a/src/game/shared/death_pose.cpp +++ b/src/game/shared/death_pose.cpp @@ -38,7 +38,7 @@ void GetRagdollCurSequenceWithDeathPose( C_BaseAnimating *entity, matrix3x4a_t * entity->SetSequence( activity ); - entity->SetCycle( (float)frame / MAX_DEATHPOSE_FRAMES ); + entity->SetCycle( (float)frame / (float)MAX_DEATHPOSE_FRAMES ); entity->SetAbsOrigin( vAdjustedOrigin ); diff --git a/src/game/shared/swarm/asw_marine_skills.h b/src/game/shared/swarm/asw_marine_skills.h index 9d2cf091a..7c73b5d1f 100644 --- a/src/game/shared/swarm/asw_marine_skills.h +++ b/src/game/shared/swarm/asw_marine_skills.h @@ -35,7 +35,7 @@ ENUM_ITEM( SPARE, "swarm/SkillButtons/Spare", "#asw_points", "#asw_points_desc", 99 ) // skills -enum ASW_Skill +enum ASW_Skill : int { ASW_MARINE_SKILL_INVALID = -1, diff --git a/src/game/shared/swarm/asw_shareddefs.h b/src/game/shared/swarm/asw_shareddefs.h index ba16d6fe4..5680ed19b 100644 --- a/src/game/shared/swarm/asw_shareddefs.h +++ b/src/game/shared/swarm/asw_shareddefs.h @@ -7,6 +7,16 @@ #include "const.h" #include "rd_gamerules_convar.h" +// Use when you extend an enum to allow warning free comparation +#define OVERLOAD_ENUM_COMPARISON(A, B) \ + constexpr bool operator==(A a, B b) { return a == static_cast(b); } \ + constexpr bool operator==(B b, A a) { return a == b; } \ + constexpr bool operator!=(A a, B b) { return a != static_cast(b); } \ + constexpr bool operator!=(B b, A a) { return a != b; } \ + constexpr bool operator<=(A a, B b) { return a <= static_cast(b); } \ + constexpr bool operator<=(B b, A a) { return b <= static_cast(a); } \ +// OVERLOAD_ENUM_COMPARISON + enum ASW_Inventory_slot_t { ASW_INVENTORY_SLOT_PRIMARY = 0, @@ -283,7 +293,7 @@ enum { #define ASW_NUM_FIRE_EMITTERS 4 -enum +enum ASW_Collision_Group_t { ASW_COLLISION_GROUP_GRUBS = LAST_SHARED_COLLISION_GROUP, ASW_COLLISION_GROUP_PARASITE, @@ -316,6 +326,7 @@ enum ASW_COLLISION_GROUP_SHIELD, // collides with projectiles and NPCs ASW_COLLISION_GROUP_PASSABLE, // asw (stuff you can walk through) NOTE: Has to be LAST! }; +OVERLOAD_ENUM_COMPARISON(Collision_Group_t, ASW_Collision_Group_t); enum FailAdviceMessage @@ -477,7 +488,7 @@ class CASW_AlienVolley }; // For CLASSIFY -enum +enum ASW_Class_T { // Alien Swarm AI // Be sure to add appropriate checks in IsAlienClass() in asw_shareddefs.cpp @@ -656,6 +667,7 @@ enum LAST_ASW_ENTITY_CLASS, }; +OVERLOAD_ENUM_COMPARISON(Class_T, ASW_Class_T); // Alien Swarm specific hitgroups diff --git a/src/game/shared/swarm/asw_weapon_flamer_shared.h b/src/game/shared/swarm/asw_weapon_flamer_shared.h index 473eb6822..6b0853531 100644 --- a/src/game/shared/swarm/asw_weapon_flamer_shared.h +++ b/src/game/shared/swarm/asw_weapon_flamer_shared.h @@ -71,11 +71,8 @@ class CASW_Weapon_Flamer : public CASW_Weapon float m_flLastFireTime; CNetworkVar(bool, m_bIsSecondaryFiring); - enum - { // namespaced immediate constant: - FLAMER_PROJECTILE_AIR_VELOCITY = 600, - EXTINGUISHER_PROJECTILE_AIR_VELOCITY = 400, - }; + static constexpr int FLAMER_PROJECTILE_AIR_VELOCITY = 600; + static constexpr int EXTINGUISHER_PROJECTILE_AIR_VELOCITY = 400; #ifdef CLIENT_DLL CUtlReference pEffect; diff --git a/src/game/shared/swarm/rd_crafting_defs.h b/src/game/shared/swarm/rd_crafting_defs.h index 4f2ce2d9a..a53a5ec42 100644 --- a/src/game/shared/swarm/rd_crafting_defs.h +++ b/src/game/shared/swarm/rd_crafting_defs.h @@ -12,7 +12,7 @@ #define RD_MAX_CRAFTING_MATERIAL_SPAWN_LOCATIONS 5 #ifdef RD_7A_DROPS -enum RD_Crafting_Material_t +enum RD_Crafting_Material_t : int { RD_CRAFTING_MATERIAL_NONE, diff --git a/src/game/shared/swarm/rd_inventory_command.h b/src/game/shared/swarm/rd_inventory_command.h index 55acd090f..4c8001a84 100644 --- a/src/game/shared/swarm/rd_inventory_command.h +++ b/src/game/shared/swarm/rd_inventory_command.h @@ -2,7 +2,7 @@ #include "steam/isteaminventory.h" -enum EInventoryCommand +enum EInventoryCommand : int { INVCMD_PLAYER_EQUIPS, INVCMD_MARINE_RESOURCE_EQUIPS, diff --git a/src/game/shared/swarm/rd_inventory_shared.h b/src/game/shared/swarm/rd_inventory_shared.h index 2425da71e..d3bb61edf 100644 --- a/src/game/shared/swarm/rd_inventory_shared.h +++ b/src/game/shared/swarm/rd_inventory_shared.h @@ -23,7 +23,7 @@ extern ConVar rd_briefing_item_details_color2; class CSteamItemIcon; vgui::IImage *GetSteamItemIcon( const char *szURL, bool bForceLoadRemote = false ); -enum RD_Crafting_Material_t; +enum RD_Crafting_Material_t : int; #endif class CASW_Player; diff --git a/src/game/shared/swarm/rd_missions_shared.h b/src/game/shared/swarm/rd_missions_shared.h index d8aebfc4f..ac463d04c 100644 --- a/src/game/shared/swarm/rd_missions_shared.h +++ b/src/game/shared/swarm/rd_missions_shared.h @@ -14,7 +14,7 @@ struct RD_Campaign_Mission_t; struct RD_Mission_t; struct RD_Mission_MinimapSlice_t; #ifdef RD_7A_DROPS -enum RD_Crafting_Material_t; +enum RD_Crafting_Material_t : int; #endif namespace ReactiveDropMissions diff --git a/src/public/bitmap/imageformat.h b/src/public/bitmap/imageformat.h index 9f030ca0f..2f3718604 100644 --- a/src/public/bitmap/imageformat.h +++ b/src/public/bitmap/imageformat.h @@ -24,8 +24,8 @@ enum NormalDecodeMode_t // Forward declaration #ifdef _WIN32 -typedef enum _D3DFORMAT D3DFORMAT; -enum DXGI_FORMAT; +typedef enum _D3DFORMAT : int D3DFORMAT; +enum DXGI_FORMAT : int; #endif //----------------------------------------------------------------------------- diff --git a/src/public/fgdlib/gamedata.h b/src/public/fgdlib/gamedata.h index 816d6886b..30ef17b5a 100644 --- a/src/public/fgdlib/gamedata.h +++ b/src/public/fgdlib/gamedata.h @@ -21,7 +21,7 @@ class MDkeyvalue; class GameData; class KeyValues; -enum TEXTUREFORMAT; +enum TEXTUREFORMAT : int; typedef void (*GameDataMessageFunc_t)(int level, _Printf_format_string_ const char *fmt, ...); diff --git a/src/public/localflexcontroller.h b/src/public/localflexcontroller.h index d9f17e2cf..79fa24320 100644 --- a/src/public/localflexcontroller.h +++ b/src/public/localflexcontroller.h @@ -15,6 +15,7 @@ #include "tier0/platform.h" +// TODO: replace this enum with something better and remove all instances of it being casted enum LocalFlexController_t { // this isn't really an enum - its just a typed int. gcc will not accept it as a fwd decl, so we'll define one value diff --git a/src/public/materialsystem/imesh.h b/src/public/materialsystem/imesh.h index ae0b2d438..21ef964de 100644 --- a/src/public/materialsystem/imesh.h +++ b/src/public/materialsystem/imesh.h @@ -52,19 +52,13 @@ struct ShaderStencilState_t; //----------------------------------------------------------------------------- // The Vertex Buffer interface //----------------------------------------------------------------------------- -enum -{ - VERTEX_MAX_TEXTURE_COORDINATES = 8, - BONE_MATRIX_INDEX_INVALID = 255 -}; +#define VERTEX_MAX_TEXTURE_COORDINATES 8 +#define BONE_MATRIX_INDEX_INVALID 255 // Internal maximums for sizes. Don't use directly, use IMaterialSystem::GetMaxToRender() -enum -{ - INDEX_BUFFER_SIZE = 32768, - DYNAMIC_VERTEX_BUFFER_MEMORY = ( 1024 + 512 ) * 1024, - DYNAMIC_VERTEX_BUFFER_MEMORY_SMALL = 384 * 1024, // Only allocate this much during map transitions -}; +#define INDEX_BUFFER_SIZE 32768 +#define DYNAMIC_VERTEX_BUFFER_MEMORY ( ( 1024 + 512 ) * 1024 ) +#define DYNAMIC_VERTEX_BUFFER_MEMORY_SMALL ( 384 * 1024 ) // Only allocate this much during map transitions // Vertex fields must be written in well-defined order to achieve write combining, // which is a perf booster diff --git a/src/public/videocfg/videocfg.h b/src/public/videocfg/videocfg.h index 2c72902cb..fe3d83682 100644 --- a/src/public/videocfg/videocfg.h +++ b/src/public/videocfg/videocfg.h @@ -31,7 +31,7 @@ struct VidMatConfigData_t bool bIsVideo; }; -enum CPULevel_t +enum CPULevel_t : int { CPU_LEVEL_UNKNOWN = -1, @@ -46,7 +46,7 @@ enum CPULevel_t CPU_LEVEL_BIT_COUNT = 2, }; -enum GPULevel_t +enum GPULevel_t : int { GPU_LEVEL_UNKNOWN = -1, @@ -62,7 +62,7 @@ enum GPULevel_t GPU_LEVEL_BIT_COUNT = 3, }; -enum MemLevel_t +enum MemLevel_t : int { MEM_LEVEL_UNKNOWN = -1, @@ -77,7 +77,7 @@ enum MemLevel_t MEM_LEVEL_BIT_COUNT = 2, }; -enum GPUMemLevel_t +enum GPUMemLevel_t : int { GPU_MEM_LEVEL_UNKNOWN = -1, @@ -101,4 +101,4 @@ bool ReadCurrentVideoConfig( KeyValues *pConfigKeys, bool bDefault = false ); bool UpdateCurrentVideoConfig( int nWidth, int nHeight, int nAspectRatioMode, bool bFullscreen, bool bNoWindowBorder ); void UpdateSystemLevel( int nCPULevel, int nGPULevel, int nMemLevel, int nGPUMemLevel, bool bVGUIIsSplitscreen, const char *pModName ); -#endif // VIDEOCFG_H \ No newline at end of file +#endif // VIDEOCFG_H