Skip to content

Commit a09608c

Browse files
committed
xrGame/ui_defs.h: convert macros to constexpr floats
1 parent 3aa80f1 commit a09608c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/xrGame/ui_defs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
typedef FactoryPtr<IUIShader> ui_shader;
1313

14-
#define UI_BASE_WIDTH 1024.0f
15-
#define UI_BASE_HEIGHT 768.0f
14+
constexpr float UI_BASE_WIDTH = 1024.0f;
15+
constexpr float UI_BASE_HEIGHT = 768.0f;
1616

1717
enum EUIItemAlign
1818
{
@@ -47,8 +47,8 @@ struct S2DVert
4747
void rotate_pt(const Fvector2& pivot, const float cosA, const float sinA, const float kx);
4848
};
4949

50-
#define UI_FRUSTUM_MAXPLANES 12
51-
#define UI_FRUSTUM_SAFE (UI_FRUSTUM_MAXPLANES * 4)
50+
constexpr u32 UI_FRUSTUM_MAXPLANES = 12;
51+
constexpr u32 UI_FRUSTUM_SAFE = (UI_FRUSTUM_MAXPLANES * 4);
5252
typedef svector<S2DVert, UI_FRUSTUM_SAFE> sPoly2D;
5353

5454
class C2DFrustum

0 commit comments

Comments
 (0)