Merge pull request #51 from iamthesenate1/master

Remove some redundant #ifdefs and added some new ones
This commit is contained in:
ptitSeb 2022-01-25 22:09:17 +01:00 committed by GitHub
commit ab0aa4f6f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 33 additions and 26 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.7.2)
project(SeriousEngine) project(SeriousEngine)
# Set @rpath for Mac OS X shared library install names. # Set @rpath for Mac OS X shared library install names.

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.7.2)
project(Ecc) project(Ecc)
if(MSVC) if(MSVC)

View File

@ -26,10 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <Engine/Graphics/Adapter.h> #include <Engine/Graphics/Adapter.h>
#ifndef PLATFORM_WIN32
#include "SDL.h"
#endif
INDEX con_bNoWarnings = 0; INDEX con_bNoWarnings = 0;
// global handle for application window in full-screen mode // global handle for application window in full-screen mode

View File

@ -2,6 +2,8 @@
/* rcg10072001 Implemented. */ /* rcg10072001 Implemented. */
#ifdef PLATFORM_WIN32
#include <Engine/Engine.h> #include <Engine/Engine.h>
#include <Engine/Base/DynamicLoader.h> #include <Engine/Base/DynamicLoader.h>
@ -83,6 +85,7 @@ CWin32DynamicLoader::~CWin32DynamicLoader(void)
::FreeLibrary(module); ::FreeLibrary(module);
} }
#endif //PLATFORM_WIN32
// end of Win32DynamicLoader.cpp ... // end of Win32DynamicLoader.cpp ...

View File

@ -4,6 +4,8 @@
// !!! FIXME: rcg10142001 This should really be using CTStrings... // !!! FIXME: rcg10142001 This should really be using CTStrings...
#ifdef PLATFORM_WIN32
#include <io.h> #include <io.h>
#include <Engine/Engine.h> #include <Engine/Engine.h>
@ -116,6 +118,6 @@ CDynamicArray<CTString> CWin32FileSystem::FindFiles(const char *dir,
return(retval); return(retval);
} }
#endif //PLATFORM_WIN32
// end of Win32FileSystem.cpp ... // end of Win32FileSystem.cpp ...

View File

@ -2,6 +2,8 @@
/* rcg10072001 Moved stuff into this file. */ /* rcg10072001 Moved stuff into this file. */
#ifdef PLATFORM_WIN32
#include <Engine/Base/Timer.h> #include <Engine/Base/Timer.h>
#include <Engine/Base/Input.h> #include <Engine/Base/Input.h>
#include <Engine/Base/Translation.h> #include <Engine/Base/Translation.h>
@ -982,5 +984,7 @@ LONG CInput::PlatformGetJoystickCount(void)
return((LONG) joyGetNumDevs()); return((LONG) joyGetNumDevs());
} }
#endif //PLATFORM_WIN32
// end of Win32Input.cpp ... // end of Win32Input.cpp ...

View File

@ -13,6 +13,8 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifdef PLATFORM_WIN32
#include "Engine/StdH.h" #include "Engine/StdH.h"
#include <Engine/Base/Synchronization.h> #include <Engine/Base/Synchronization.h>
@ -317,3 +319,4 @@ void CTSingleLock::Unlock(void)
sl_bLocked = FALSE; sl_bLocked = FALSE;
} }
#endif //PLATFORM_WIN32

View File

@ -2,6 +2,8 @@
/* rcg10072001 Moved stuff into this file. */ /* rcg10072001 Moved stuff into this file. */
#ifdef PLATFORM_WIN32
#include <Engine/Engine.h> #include <Engine/Engine.h>
#include <Engine/Base/Timer.h> #include <Engine/Base/Timer.h>
@ -10,6 +12,8 @@ void CTimer::Sleep(DWORD milliseconds)
::Sleep(milliseconds); ::Sleep(milliseconds);
} }
#endif //PLATFORM_WIN32
// end of Win32Timer.cpp ... // end of Win32Timer.cpp ...

View File

@ -45,9 +45,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <Engine/Templates/StaticArray.cpp> #include <Engine/Templates/StaticArray.cpp>
#include <Engine/Base/IFeel.h> #include <Engine/Base/IFeel.h>
#if PLATFORM_UNIX
#include "SDL.h"
#endif
// this version string can be referenced from outside the engine // this version string can be referenced from outside the engine
ENGINE_API CTString _strEngineBuild = ""; ENGINE_API CTString _strEngineBuild = "";

View File

@ -22,9 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// !!! FIXME : rcg11052001 move this somewhere. // !!! FIXME : rcg11052001 move this somewhere.
#ifdef PLATFORM_UNIX //#ifdef PLATFORM_UNIX
#include "SDL.h" //#include "SDL.h"
#endif //#endif
extern BOOL _bDedicatedServer; extern BOOL _bDedicatedServer;
#ifdef SE1_D3D #ifdef SE1_D3D

View File

@ -52,11 +52,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// !!! FIXME: rcg10112001 driver type is valid. // !!! FIXME: rcg10112001 driver type is valid.
// !!! FIXME: rcg11052001 ... and I could get rid of this, too...
#ifdef PLATFORM_UNIX
#include <SDL.h>
#endif
// control for partial usage of compiled vertex arrays // control for partial usage of compiled vertex arrays
BOOL CVA_b2D = FALSE; BOOL CVA_b2D = FALSE;
BOOL CVA_bWorld = FALSE; BOOL CVA_bWorld = FALSE;

View File

@ -15,6 +15,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "Engine/StdH.h" #include "Engine/StdH.h"
#ifdef SE1_D3D
#include <Engine/Base/Translation.h> #include <Engine/Base/Translation.h>
#include <Engine/Base/ErrorReporting.h> #include <Engine/Base/ErrorReporting.h>
#include <Engine/Base/Memory.h> #include <Engine/Base/Memory.h>
@ -27,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <Engine/Templates/DynamicContainer.cpp> #include <Engine/Templates/DynamicContainer.cpp>
#include <Engine/Templates/Stock_CTextureData.h> #include <Engine/Templates/Stock_CTextureData.h>
#ifdef SE1_D3D
// asm shortcuts // asm shortcuts

View File

@ -1,5 +1,7 @@
/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ /* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */
#ifdef PLATFORM_WIN32
#include <windows.h> #include <windows.h>
ULONG DetermineDesktopWidth(void) ULONG DetermineDesktopWidth(void)
@ -7,4 +9,4 @@ ULONG DetermineDesktopWidth(void)
return((ULONG) ::GetSystemMetrics(SM_CXSCREEN)); return((ULONG) ::GetSystemMetrics(SM_CXSCREEN));
} }
#endif

View File

@ -1,5 +1,7 @@
/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ /* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */
#ifdef PLATFORM_WIN32
#include <Engine/Engine.h> #include <Engine/Engine.h>
static void FailFunction_t(const char *strName) { static void FailFunction_t(const char *strName) {
@ -438,3 +440,4 @@ BOOL CGfxLibrary::SetCurrentViewport_OGL(CViewPort *pvp)
return TRUE; return TRUE;
} }
#endif // PLATFORM_WIN32

View File

@ -25,10 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "initguid.h" #include "initguid.h"
#endif #endif
// !!! FIXME : Move all the SDL stuff to a different file...
#ifdef PLATFORM_UNIX
#include "SDL.h"
#endif
#include <Engine/Engine.h> #include <Engine/Engine.h>
#include <Engine/Sound/SoundLibrary.h> #include <Engine/Sound/SoundLibrary.h>

View File

@ -197,7 +197,7 @@ void CWorld::ReadBrushes_t( CTStream *istrm)// throw char *
wo_baBrushes.Read_t(istrm); wo_baBrushes.Read_t(istrm);
CallProgressHook_t(1.0f); CallProgressHook_t(1.0f);
// if there are some terrais in world // if there are some terrains in world
if(istrm->PeekID_t()==CChunkID("TRAR")) { // 'terrain archive' if(istrm->PeekID_t()==CChunkID("TRAR")) { // 'terrain archive'
SetProgressDescription(TRANS("loading terrains")); SetProgressDescription(TRANS("loading terrains"));
CallProgressHook_t(0.0f); CallProgressHook_t(0.0f);