Skip to content

Commit 7c1a02d

Browse files
committed
xrGame: rename ui_core -> UICore
1 parent 5f33228 commit 7c1a02d

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/xrGame/GamePersistent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void CGamePersistent::OnAppStart()
207207
GMLib.Load();
208208
init_game_globals();
209209
inherited::OnAppStart();
210-
m_pUI_core = new ui_core();
210+
m_pUI_core = new UICore();
211211
m_pMainMenu = new CMainMenu();
212212
}
213213

src/xrGame/GamePersistent.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CMainMenu;
77
class CUICursor;
88
class CParticlesObject;
99
class CUISequencer;
10-
class ui_core;
10+
class UICore;
1111

1212
class CGamePersistent : public IGame_Persistent, public IEventReceiver
1313
{
@@ -53,7 +53,7 @@ class CGamePersistent : public IGame_Persistent, public IEventReceiver
5353
void UpdateDof();
5454

5555
public:
56-
ui_core* m_pUI_core;
56+
UICore* m_pUI_core;
5757
IReader* pDemoFile;
5858
u32 uTime2Change;
5959
EVENT eDemoStart;

src/xrGame/ui_base.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
pcstr UI_PATH = "ui";
77

88
CUICursor& GetUICursor() { return UI().GetUICursor(); };
9-
ui_core& UI() { return *GamePersistent().m_pUI_core; };
9+
UICore& UI() { return *GamePersistent().m_pUI_core; };
1010
extern ENGINE_API Fvector2 g_current_font_scale;
1111

1212
void S2DVert::rotate_pt(const Fvector2& pivot, const float cosA, const float sinA, const float kx)
@@ -112,46 +112,46 @@ sPoly2D* C2DFrustum::ClipPoly(sPoly2D& S, sPoly2D& D) const
112112
return dest;
113113
}
114114

115-
void ui_core::OnDeviceReset()
115+
void UICore::OnDeviceReset()
116116
{
117117
m_scale_.set(float(Device.dwWidth) / UI_BASE_WIDTH, float(Device.dwHeight) / UI_BASE_HEIGHT);
118118

119119
m_2DFrustum.CreateFromRect(Frect().set(0.0f, 0.0f, float(Device.dwWidth), float(Device.dwHeight)));
120120
}
121121

122-
void ui_core::ClientToScreenScaled(Fvector2& dest, float left, float top) const
122+
void UICore::ClientToScreenScaled(Fvector2& dest, float left, float top) const
123123
{
124124
if (m_currentPointType != IUIRender::pttLIT)
125125
dest.set(ClientToScreenScaledX(left), ClientToScreenScaledY(top));
126126
else
127127
dest.set(left, top);
128128
}
129129

130-
void ui_core::ClientToScreenScaled(Fvector2& src_and_dest) const
130+
void UICore::ClientToScreenScaled(Fvector2& src_and_dest) const
131131
{
132132
if (m_currentPointType != IUIRender::pttLIT)
133133
src_and_dest.set(ClientToScreenScaledX(src_and_dest.x), ClientToScreenScaledY(src_and_dest.y));
134134
}
135135

136-
void ui_core::ClientToScreenScaledWidth(float& src_and_dest) const
136+
void UICore::ClientToScreenScaledWidth(float& src_and_dest) const
137137
{
138138
if (m_currentPointType != IUIRender::pttLIT)
139139
src_and_dest /= m_current_scale->x;
140140
}
141141

142-
void ui_core::ClientToScreenScaledHeight(float& src_and_dest) const
142+
void UICore::ClientToScreenScaledHeight(float& src_and_dest) const
143143
{
144144
if (m_currentPointType != IUIRender::pttLIT)
145145
src_and_dest /= m_current_scale->y;
146146
}
147147

148-
void ui_core::AlignPixel(float& src_and_dest) const
148+
void UICore::AlignPixel(float& src_and_dest) const
149149
{
150150
if (m_currentPointType != IUIRender::pttLIT)
151151
src_and_dest = (float)iFloor(src_and_dest);
152152
}
153153

154-
void ui_core::PushScissor(const Frect& r_tgt, bool overlapped)
154+
void UICore::PushScissor(const Frect& r_tgt, bool overlapped)
155155
{
156156
if (UI().m_currentPointType == IUIRender::pttLIT)
157157
return;
@@ -186,7 +186,7 @@ void ui_core::PushScissor(const Frect& r_tgt, bool overlapped)
186186
GEnv.UIRender->SetScissor(&r);
187187
}
188188

189-
void ui_core::PopScissor()
189+
void UICore::PopScissor()
190190
{
191191
if (UI().m_currentPointType == IUIRender::pttLIT)
192192
return;
@@ -209,7 +209,7 @@ void ui_core::PopScissor()
209209
}
210210
}
211211

212-
ui_core::ui_core()
212+
UICore::UICore()
213213
{
214214
if (!GEnv.isDedicatedServer)
215215
{
@@ -230,13 +230,13 @@ ui_core::ui_core()
230230
m_currentPointType = IUIRender::pttTL;
231231
}
232232

233-
ui_core::~ui_core()
233+
UICore::~UICore()
234234
{
235235
xr_delete(m_pFontManager);
236236
xr_delete(m_pUICursor);
237237
}
238238

239-
void ui_core::pp_start()
239+
void UICore::pp_start()
240240
{
241241
m_bPostprocess = true;
242242

@@ -251,20 +251,20 @@ void ui_core::pp_start()
251251
float(GEnv.Render->getTarget()->get_height()) / float(Device.dwHeight));
252252
}
253253

254-
void ui_core::pp_stop()
254+
void UICore::pp_stop()
255255
{
256256
m_bPostprocess = false;
257257
m_current_scale = &m_scale_;
258258
g_current_font_scale.set(1.0f, 1.0f);
259259
}
260260

261-
void ui_core::RenderFont() { Font().Render(); }
262-
bool ui_core::is_widescreen()
261+
void UICore::RenderFont() { Font().Render(); }
262+
bool UICore::is_widescreen()
263263
{
264264
return (Device.dwWidth) / float(Device.dwHeight) > (UI_BASE_WIDTH / UI_BASE_HEIGHT + 0.01f);
265265
}
266266

267-
float ui_core::get_current_kx()
267+
float UICore::get_current_kx()
268268
{
269269
float h = float(Device.dwHeight);
270270
float w = float(Device.dwWidth);
@@ -273,7 +273,7 @@ float ui_core::get_current_kx()
273273
return res;
274274
}
275275

276-
shared_str ui_core::get_xml_name(LPCSTR fn)
276+
shared_str UICore::get_xml_name(LPCSTR fn)
277277
{
278278
string_path str;
279279
if (!is_widescreen())

src/xrGame/ui_base.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct CFontManager : public pureDeviceReset
5050
virtual void OnDeviceReset();
5151
};
5252

53-
class ui_core : public CDeviceResetNotifier
53+
class UICore : public CDeviceResetNotifier
5454
{
5555
C2DFrustum m_2DFrustum;
5656
C2DFrustum m_2DFrustumPP;
@@ -68,8 +68,8 @@ class ui_core : public CDeviceResetNotifier
6868
public:
6969
xr_stack<Frect> m_Scissors;
7070

71-
ui_core();
72-
~ui_core();
71+
UICore();
72+
~UICore();
7373
CFontManager& Font() { return *m_pFontManager; }
7474
CUICursor& GetUICursor() { return *m_pUICursor; }
7575
IC float ClientToScreenScaledX(float left) const { return left * m_current_scale->x; };
@@ -98,5 +98,5 @@ class ui_core : public CDeviceResetNotifier
9898
};
9999

100100
extern CUICursor& GetUICursor();
101-
extern ui_core& UI();
101+
extern UICore& UI();
102102
extern CUIGameCustom* CurrentGameUI();

0 commit comments

Comments
 (0)