Skip to content

Commit 7ee472f

Browse files
committed
From now on use -weather command line key to run xrWeatherEditor
Device: Changed WNDCLASS from _XRAY_1.5 to _XRAY_1.6 Renamed weather editor related functions
1 parent 433ad1c commit 7ee472f

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/Include/xrAPI/xrAPI.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class XRAPI_API EngineGlobalEnvironment
2929
AISpaceBase* AISpace;
3030
ISoundManager* Sound;
3131

32+
bool isEditor;
3233
bool isDedicatedServer;
3334

3435
int CurrentRenderer;

src/xrEngine/Device_Initialize.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
extern LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
1111

12-
void CRenderDevice::initialize_editor()
12+
void CRenderDevice::initialize_weather_editor()
1313
{
1414
m_editor_module = XRay::LoadModule("xrWeatherEditor");
1515
if (!m_editor_module->exist())
@@ -27,6 +27,8 @@ void CRenderDevice::initialize_editor()
2727

2828
m_hWnd = m_editor->view_handle();
2929
VERIFY(m_hWnd != INVALID_HANDLE_VALUE);
30+
31+
GEnv.isEditor = true;
3032
}
3133

3234
void CRenderDevice::Initialize()
@@ -35,13 +37,13 @@ void CRenderDevice::Initialize()
3537
TimerGlobal.Start();
3638
TimerMM.Start();
3739

38-
if (strstr(Core.Params, "-editor"))
39-
initialize_editor();
40+
if (strstr(Core.Params, "-weather"))
41+
initialize_weather_editor();
4042

4143
// Unless a substitute hWnd has been specified, create a window to render into
4244
if (!m_hWnd)
4345
{
44-
const char* wndclass = "_XRAY_1.5";
46+
const char* wndclass = "_XRAY_1.6";
4547
// Register the windows class
4648
HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(0);
4749
WNDCLASS wndClass = {0, WndProc, 0, 0, hInstance, LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)),

src/xrEngine/device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void CRenderDevice::on_idle()
275275
Sleep(1);
276276
}
277277

278-
void CRenderDevice::message_loop_editor()
278+
void CRenderDevice::message_loop_weather_editor()
279279
{
280280
m_editor->run();
281281
m_editor_finalize(m_editor);
@@ -286,7 +286,7 @@ void CRenderDevice::message_loop()
286286
{
287287
if (editor())
288288
{
289-
message_loop_editor();
289+
message_loop_weather_editor();
290290
return;
291291
}
292292

src/xrEngine/device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase
267267
XRay::Editor::ide_base* editor() const { return m_editor; }
268268

269269
private:
270-
void initialize_editor();
271-
void message_loop_editor();
270+
void initialize_weather_editor();
271+
void message_loop_weather_editor();
272272

273273
using initialize_function_ptr = XRay::Editor::initialize_function_ptr;
274274
using finalize_function_ptr = XRay::Editor::finalize_function_ptr;

0 commit comments

Comments
 (0)