Skip to content

Commit 4d9a3c2

Browse files
a1batrossZegeri
authored andcommitted
xrGame: declare enum forward declarations with u32 for standard compliance
Used simple script which appends type to all forward declarations, finds their definitions and appends type too: https://pastebin.com/MBKEabaB
1 parent b6be30b commit 4d9a3c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+94
-94
lines changed

src/editors/ECore/Engine/ai_sounds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef ai_soundsH
1010
#define ai_soundsH
1111

12-
enum ESoundTypes
12+
enum ESoundTypes : u32
1313
{
1414
SOUND_TYPE_NO_SOUND = 0x00000000ui32,
1515

src/xrAICore/Navigation/PatrolPath/patrol_path.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "xrAICore/Navigation/graph_abstract.h"
1212
#include "xrAICore/Navigation/PatrolPath/patrol_point.h"
1313

14-
enum EPatrolStartType
14+
enum EPatrolStartType : u32
1515
{
1616
ePatrolStartTypeFirst = u32(0),
1717
ePatrolStartTypeLast,
@@ -20,7 +20,7 @@ enum EPatrolStartType
2020
ePatrolStartTypeNext,
2121
ePatrolStartTypeDummy = u32(-1),
2222
};
23-
enum EPatrolRouteType
23+
enum EPatrolRouteType : u32
2424
{
2525
ePatrolRouteTypeStop = u32(0),
2626
ePatrolRouteTypeContinue,

src/xrEngine/line_edit_control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum key_state // Flags32
3434

3535
}; // enum key_state
3636

37-
enum init_mode
37+
enum init_mode : u32
3838
{
3939
im_standart = 0,
4040
im_number_only,

src/xrGame/GameTaskDefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include "alife_abstract_registry.h"
33

4-
enum ETaskState
4+
enum ETaskState : u32
55
{
66
eTaskStateFail = 0,
77
eTaskStateInProgress,

src/xrGame/PHMovementControl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace ALife
99
{
10-
enum EHitType;
10+
enum EHitType : u32;
1111
}
1212

1313
namespace DetailPathManager

src/xrGame/ai/monsters/rats/ai_rat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class CBlend;
1919
class CPatrolPath;
20-
enum ESoundTypes;
20+
enum ESoundTypes : u32;
2121
class rat_state_manager;
2222

2323
namespace steering_behaviour

src/xrGame/ai/stalker/ai_stalker.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ typedef CActionPlanner<CScriptGameObject, false, CActionBase<CScriptGameObject>,
3030

3131
namespace MonsterSpace
3232
{
33-
enum EMovementDirection;
33+
enum EMovementDirection : u32;
3434
}
3535

3636
namespace StalkerSpace
3737
{
38-
enum EBodyAction;
38+
enum EBodyAction : u32;
3939
}
4040

4141
namespace smart_cover
@@ -49,7 +49,7 @@ class action;
4949
}
5050
}
5151

52-
enum ECriticalWoundType;
52+
enum ECriticalWoundType : u32;
5353

5454
class CALifeSimulator;
5555
class CCharacterPhysicsSupport;

src/xrGame/ai/stalker/ai_stalker_space.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ enum EStalkerSoundMasks
8484
eStalkerSoundMaskDummy = u32(-1),
8585
};
8686

87-
enum EBodyAction
87+
enum EBodyAction : u32
8888
{
8989
eBodyActionNone = u32(0),
9090
eBodyActionHello,

src/xrGame/ai/trader/trader_animation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class CAI_Trader;
66

77
namespace MonsterSpace
88
{
9-
enum EMonsterHeadAnimType;
9+
enum EMonsterHeadAnimType : u32;
1010
};
1111

1212
class CTraderAnimation

src/xrGame/ai_monster_space.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@
1212

1313
namespace MonsterSpace
1414
{
15-
enum EMentalState
15+
enum EMentalState : u32
1616
{
1717
eMentalStateDanger = u32(0),
1818
eMentalStateFree,
1919
eMentalStatePanic,
2020
};
2121

22-
enum EBodyState
22+
enum EBodyState : u32
2323
{
2424
eBodyStateCrouch = u32(0),
2525
eBodyStateStand,
2626
eBodyStateDummy = u32(-1)
2727
};
2828

29-
enum EMovementType
29+
enum EMovementType : u32
3030
{
3131
eMovementTypeWalk = 0,
3232
eMovementTypeRun,
3333
eMovementTypeStand,
3434
};
3535

36-
enum EMovementDirection
36+
enum EMovementDirection : u32
3737
{
3838
eMovementDirectionForward = 0,
3939
eMovementDirectionBackward,
4040
eMovementDirectionLeft,
4141
eMovementDirectionRight,
4242
};
4343

44-
enum EObjectAction
44+
enum EObjectAction : u32
4545
{
4646
eObjectActionSwitch1,
4747
eObjectActionSwitch2,
@@ -83,7 +83,7 @@ struct SBoneRotation
8383
float speed;
8484
};
8585

86-
enum EScriptMonsterMoveAction
86+
enum EScriptMonsterMoveAction : u32
8787
{
8888
eMA_WalkFwd,
8989
eMA_WalkBkwd,
@@ -95,14 +95,14 @@ enum EScriptMonsterMoveAction
9595
eMA_RunWithLeader
9696
};
9797

98-
enum EScriptMonsterSpeedParam
98+
enum EScriptMonsterSpeedParam : u32
9999
{
100100
eSP_Default = u32(0),
101101
eSP_ForceSpeed,
102102
eSP_None = u32(-1),
103103
};
104104

105-
enum EScriptMonsterAnimAction
105+
enum EScriptMonsterAnimAction : u32
106106
{
107107
eAA_StandIdle,
108108
eAA_CapturePrepare,
@@ -117,7 +117,7 @@ enum EScriptMonsterAnimAction
117117
eAA_NoAction = u32(-1)
118118
};
119119

120-
enum EScriptMonsterGlobalAction
120+
enum EScriptMonsterGlobalAction : u32
121121
{
122122
eGA_Rest = u32(0),
123123
eGA_Eat,
@@ -126,13 +126,13 @@ enum EScriptMonsterGlobalAction
126126
eGA_None = u32(-1)
127127
};
128128

129-
enum EScriptSoundAnim
129+
enum EScriptSoundAnim : u32
130130
{
131131
eAnimSoundCustom = u32(0),
132132
eAnimSoundDefault,
133133
};
134134

135-
enum EMonsterHeadAnimType
135+
enum EMonsterHeadAnimType : u32
136136
{
137137
eHeadAnimNormal = u32(0),
138138
eHeadAnimAngry,

0 commit comments

Comments
 (0)