From 1984179657b4f38dcefdba43145bb23b4b7084df Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 21 Sep 2016 17:14:06 +0200 Subject: [PATCH 1/4] Fixed a missing #endif issue --- Sources/Engine/Engine.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Sources/Engine/Engine.cpp b/Sources/Engine/Engine.cpp index 8bb4936..b5a530d 100755 --- a/Sources/Engine/Engine.cpp +++ b/Sources/Engine/Engine.cpp @@ -128,13 +128,6 @@ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReser static void DetectCPU(void) { char strVendor[12+1] = { 0 }; -#if (defined USE_PORTABLE_C) // rcg10072001 - CPrintF(TRANSV(" (No CPU detection in this binary.)\n")); - #ifdef PLATFORM_PANDORA - sys_iCPUMHz = 400; // conservative, ARM -> x86 cpu translation is not 1 to 1. - #endif - -#else strVendor[12] = 0; ULONG ulTFMS = 0; ULONG ulFeatures = 0; @@ -221,8 +214,11 @@ static void DetectCPU(void) sys_iCPUStepping = iStepping; sys_bCPUHasMMX = bMMX!=0; sys_bCPUHasCMOV = bCMOV!=0; +#ifdef PLATFORM_PANDORA + sys_iCPUMHz = 400; // conservative, ARM -> x86 cpu translation is not 1 to 1. +#else sys_iCPUMHz = INDEX(_pTimer->tm_llCPUSpeedHZ/1E6); - +#endif if( !bMMX) FatalError( TRANS("MMX support required but not present!")); } From cf7056b4d6944e84b40cdccd07db4932a23711a8 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 21 Sep 2016 17:20:37 +0200 Subject: [PATCH 2/4] Missing a const --- Sources/Engine/Base/SDL/SDLInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Engine/Base/SDL/SDLInput.cpp b/Sources/Engine/Base/SDL/SDLInput.cpp index 17ebefa..8886e32 100755 --- a/Sources/Engine/Base/SDL/SDLInput.cpp +++ b/Sources/Engine/Base/SDL/SDLInput.cpp @@ -724,7 +724,7 @@ void CInput::GetInput(BOOL bPreScan) // clear button's buffer memset( inp_ubButtonsBuffer, 0, sizeof( inp_ubButtonsBuffer)); - Uint8 *keystate = SDL_GetKeyboardState(NULL); + const Uint8 *keystate = SDL_GetKeyboardState(NULL); // for each Key for (INDEX iKey=0; iKey Date: Wed, 21 Sep 2016 19:25:13 +0200 Subject: [PATCH 3/4] Some warning solved --- Sources/Engine/Base/CRC.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Engine/Base/CRC.h b/Sources/Engine/Base/CRC.h index eb93255..64a57cb 100644 --- a/Sources/Engine/Base/CRC.h +++ b/Sources/Engine/Base/CRC.h @@ -64,7 +64,7 @@ inline void CRC_AddFLOAT(ULONG &ulCRC, FLOAT f) // add memory block to a CRC value inline void CRC_AddBlock(ULONG &ulCRC, UBYTE *pubBlock, ULONG ulSize) { - for( INDEX i=0; i Date: Thu, 22 Sep 2016 12:15:57 +0200 Subject: [PATCH 4/4] More #ifdef for TFE build --- Sources/SeriousSam/SeriousSam.cpp | 4 ++++ Sources/SeriousSam/StdH.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/Sources/SeriousSam/SeriousSam.cpp b/Sources/SeriousSam/SeriousSam.cpp index c7ffa56..8e246b8 100755 --- a/Sources/SeriousSam/SeriousSam.cpp +++ b/Sources/SeriousSam/SeriousSam.cpp @@ -33,7 +33,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #define DECL_DLL +#ifdef FIRST_ENCOUNTER +#include +#else #include +#endif #include "resource.h" #include "SplashScreen.h" #include "MainWindow.h" diff --git a/Sources/SeriousSam/StdH.h b/Sources/SeriousSam/StdH.h index c36b058..5f13c2b 100644 --- a/Sources/SeriousSam/StdH.h +++ b/Sources/SeriousSam/StdH.h @@ -34,11 +34,19 @@ with this program; if not, write to the Free Software Foundation, Inc., #define DECL_DLL #endif +#ifdef FIRST_ENCOUNTER +#include +#include +#include +#include +#include +#else #include #include #include #include #include +#endif #undef DECL_DLL #include "SeriousSam.h"