Skip to content

Commit

Permalink
Moved SDL includes to Common.hpp
Browse files Browse the repository at this point in the history
xrEngine/Device_Initialize.cpp: resource.h is not used anymore
  • Loading branch information
Xottab-DUTY committed Aug 3, 2018
1 parent 50511f1 commit c4d4dd1
Show file tree
Hide file tree
Showing 21 changed files with 9 additions and 29 deletions.
8 changes: 8 additions & 0 deletions src/Common/Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@
#include "Common/CommonImportExport.inl"
#include "Common/FSMacros.hpp"
#include "Include/xrAPI/xrAPI.h"

#if __has_include(<SDL.h>)
#include <SDL.h>
#endif

#if __has_include(<SDL_syswm.h>)
#include <SDL_syswm.h>
#endif
2 changes: 0 additions & 2 deletions src/Layers/xrRender/HW.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "HWCaps.h"
#include "xrCore/ModuleLookup.hpp"
#include "SDL.h"
#include "SDL_syswm.h"

#if !defined(_MAYA_EXPORT) && !defined(USE_OGL)
#include "stats_manager.h"
Expand Down
2 changes: 0 additions & 2 deletions src/editors/xrEditor/entry_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "xrEngine/device.h"
#include "xrEngine/XR_IOConsole.h"
#include "xrEngine/xr_ioc_cmd.h"
#include "SDL.h"


using namespace XRay;
using namespace XRay::Editor;
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/os_clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "stdafx.h"
#pragma hdrstop
#include <SDL.h>

#include "os_clipboard.h"
#include "xrCore/_std_extensions.h"

Expand Down
2 changes: 0 additions & 2 deletions src/xrCore/xrCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "stdafx.h"
#pragma hdrstop

#include <SDL.h>

#if defined(WINDOWS)
#include <mmsystem.h>
#include <objbase.h>
Expand Down
3 changes: 0 additions & 3 deletions src/xrCore/xrDebug.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "stdafx.h"
#pragma hdrstop

#include "SDL.h"
#include "SDL_syswm.h"

#include "xrDebug.h"
#include "os_clipboard.h"
#include "log.h"
Expand Down
2 changes: 0 additions & 2 deletions src/xrEngine/Device_Initialize.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "stdafx.h"
#include "xr_3da/resource.h"
#include <SDL.h>

#include "Include/editor/ide.hpp"
#include "engine_impl.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/xrEngine/Device_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include "xrCore/xr_token.h"
#include "xrCDB/xrXRC.h"
#include "XR_IOConsole.h"
#include <SDL.h>
#include <SDL_syswm.h>

extern u32 Vid_SelectedMonitor;
extern u32 Vid_SelectedRefreshRate;
Expand Down
2 changes: 0 additions & 2 deletions src/xrEngine/Device_destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include "IGame_Persistent.h"
#include "XR_IOConsole.h"
#include "xr_input.h"
#include <SDL.h>
#include <SDL_syswm.h>

extern void FreeMonitorsToken();
extern void FreeVidModesToken();
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/IInputReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "xr_input.h"
#include "IInputReceiver.h"
#include "SDL_syswm.h"

void IInputReceiver::IR_Capture(void)
{
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/Render.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "vis_common.h"
#include "Include/xrRender/FactoryPtr.h"
#include "xrCore/xr_resource.h"
#include <SDL.h>

class IUIShader;
typedef FactoryPtr<IUIShader> wm_shader;
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/Text_Console.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "Text_Console.h"
#include "line_editor.h"
#include "SDL_syswm.h"

extern char const* const ioc_prompt;
extern char const* const ch_cursor;
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/XR_IOConsole_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "line_editor.h"
#include "xr_input.h"
#include "xr_ioc_cmd.h"
#include "SDL.h"

void CConsole::Register_callbacks()
{
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#if defined(WINDOWS)
#include <mmsystem.h>
#endif
#include <SDL.h>
#pragma warning(pop)

#include "x_ray.h"
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "Include/editor/interfaces.hpp"
#include "Include/xrRender/FactoryPtr.h"
#include "Render.h"
#include <SDL.h>

class engine_impl;

Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/line_edit_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "xrCore/buffer_vector.h"
#include "Common/object_broker.h"
#include "xr_input.h"
#include "SDL.h"

#include "edit_actions.h"

Expand Down
2 changes: 0 additions & 2 deletions src/xrEngine/xr_input.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __XR_INPUT__
#define __XR_INPUT__

#include <SDL.h>

// SDL_NUM_SCANCODES - max vavue in SDL_SCANCODE_* enum
#define MOUSE_1 (SDL_NUM_SCANCODES + SDL_BUTTON_LEFT)
#define MOUSE_2 (SDL_NUM_SCANCODES + SDL_BUTTON_RIGHT)
Expand Down
1 change: 0 additions & 1 deletion src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "xr_Level_controller.h"
#include "ui\UITextureMaster.h"
#include "ui\UIXmlInit.h"
#include <SDL.h>
#include "ui\UIBtnHint.h"
#include "UICursor.h"
#include "xrGameSpy/GameSpy_Full.h"
Expand Down
1 change: 0 additions & 1 deletion src/xrGame/UICursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "ui/UIBtnHint.h"
#include "xrEngine/IInputReceiver.h"
#include "xrEngine/xr_input.h"
#include "SDL_syswm.h"

#define C_DEFAULT color_xrgb(0xff, 0xff, 0xff)

Expand Down
1 change: 0 additions & 1 deletion src/xrGame/UIDialogHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "xrCore/_flags.h"
#include "xrEngine/pure.h"
#include "xrCommon/xr_vector.h"
#include "SDL.h"

class CUIDialogWnd;
class CUIWindow;
Expand Down
1 change: 0 additions & 1 deletion src/xrGame/xr_level_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "stdafx.h"
#include <SDL.h>
#include "xrEngine/xr_ioconsole.h"
#include "xrEngine/xr_input.h"
#include "xrEngine/xr_ioc_cmd.h"
Expand Down

0 comments on commit c4d4dd1

Please sign in to comment.