Skip to content

Commit

Permalink
Revert some changes by @eagleivg
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jul 30, 2018
1 parent 28ffb6a commit 06355bd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Include/editor/engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class property_holder_base;
class engine_base
{
public:
virtual bool on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result) = 0;
virtual void on_idle() = 0;
virtual void on_resize() = 0;
virtual void pause(bool const& value) = 0;
Expand Down
10 changes: 0 additions & 10 deletions src/xrCore/_std_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,11 @@ inline int __cdecl xr_sprintf(char (&destination)[count], LPCSTR format_string,
}
#else // #ifndef MASTER_GOLD

inline int xr_strcpy(LPSTR destination, LPCSTR source)
{
return strcpy(destination, source);
}

inline int xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source)
{
return strncpy_s(destination, destination_size, source, destination_size);
}

inline int xr_strcat(LPSTR destination, LPCSTR source)
{
return strcat(destination, source);
}

inline int xr_strcat(LPSTR destination, size_t const buffer_size, LPCSTR source)
{
size_t const destination_length = xr_strlen(destination);
Expand Down
1 change: 1 addition & 0 deletions src/xrEngine/Device_Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ void CRenderDevice::initialize_weather_editor()

m_editor_finalize = (finalize_function_ptr)m_editor_module->GetProcAddress("finalize");
VERIFY(m_editor_finalize);

m_engine = new engine_impl();
m_editor_initialize(m_editor, m_engine);
VERIFY(m_editor);
Expand Down
1 change: 1 addition & 0 deletions src/xrEngine/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase

public:
void xr_stdcall on_idle();
bool xr_stdcall on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result);

private:
void message_loop();
Expand Down
5 changes: 5 additions & 0 deletions src/xrEngine/engine_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ engine_impl::~engine_impl()
xr_delete(m_input_receiver);
}

bool engine_impl::on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result)
{
return (Device.on_message(hWnd, uMsg, wParam, lParam, result));
}

void engine_impl::on_idle()
{
SDL_PumpEvents();
Expand Down
1 change: 1 addition & 0 deletions src/xrEngine/engine_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class engine_impl : public XRay::Editor::engine_base
virtual ~engine_impl();

private:
virtual bool on_message(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result);
virtual void on_idle();
virtual void on_resize();
virtual void pause(bool const& value);
Expand Down
3 changes: 2 additions & 1 deletion src/xrEngine/xrEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
<ClCompile Include="Device_Initialize.cpp" />
<ClCompile Include="Device_Misc.cpp" />
<ClCompile Include="Device_overdraw.cpp" />
<ClCompile Include="Device_wndproc.cpp" />
<ClCompile Include="editor_environment_ambients_ambient.cpp" />
<ClCompile Include="editor_environment_ambients_effect_id.cpp" />
<ClCompile Include="editor_environment_ambients_manager.cpp" />
Expand Down Expand Up @@ -464,4 +465,4 @@
<Error Condition="!Exists('..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets'))" />
<Error Condition="!Exists('..\packages\sdl2.2.0.5\build\native\sdl2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.2.0.5\build\native\sdl2.targets'))" />
</Target>
</Project>
</Project>
5 changes: 4 additions & 1 deletion src/xrEngine/xrEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@
<ClCompile Include="splash.cpp">
<Filter>General</Filter>
</ClCompile>
<ClCompile Include="Device_wndproc.cpp">
<Filter>RenderRef\Execution &amp; 3D\Device</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ClientServer.txt" />
Expand All @@ -903,4 +906,4 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>

0 comments on commit 06355bd

Please sign in to comment.