Remove stuff from Config.h that doesn't belong

This commit is contained in:
wolfy1339
2017-11-15 20:07:00 -05:00
committed by jacob1
parent 6cfaed0e1b
commit 87f3ada7b0
9 changed files with 104 additions and 65 deletions

View File

@@ -163,10 +163,6 @@
#define GLASS_IOR 1.9 #define GLASS_IOR 1.9
#define GLASS_DISP 0.07 #define GLASS_DISP 0.07
//some compatibility stuff for non-standard compilers
#if defined(WIN) && !defined(strcasecmp)
#define strcasecmp stricmp
#endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
#if _MSC_VER < 1800 #if _MSC_VER < 1800
#define fmin min #define fmin min
@@ -178,21 +174,6 @@
#endif #endif
#endif #endif
#if defined(_MSC_VER)
#define TPT_INLINE _inline
#else
#define TPT_INLINE inline
#endif
// old Platform.h stuff, maybe we should have a file for these kinds of things
typedef unsigned short Uint16;
#ifndef NULL
# define NULL 0
#endif
#include <climits>
#define SDEUT #define SDEUT
//#define REALHEAT //#define REALHEAT

View File

@@ -3,6 +3,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <ctime> #include <ctime>
#include <climits>
#ifdef WIN #ifdef WIN
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later #define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later
#include <direct.h> #include <direct.h>

View File

@@ -26,7 +26,8 @@
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
#include <cstdarg> #include <cstdarg>
#include "Config.h" #include <climits>
#include "common/tpt-inline.h"
#if defined(LIN) || defined(USE_STDINT) #if defined(LIN) || defined(USE_STDINT)
#include <sys/types.h> #include <sys/types.h>

30
src/common/tpt-compat.h Normal file
View File

@@ -0,0 +1,30 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TPT_COMPAT_H
#define TPT_COMPAT_H
//some compatibility stuff for non-standard compilers
#if defined(WIN) && !defined(strcasecmp)
#define strcasecmp stricmp
#endif
typedef unsigned short Uint16;
#ifndef NULL
# define NULL 0
#endif
#endif

25
src/common/tpt-inline.h Normal file
View File

@@ -0,0 +1,25 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TPT_INLINE_H
#define TPT_INLINE_H
#if defined(_MSC_VER)
#define TPT_INLINE _inline
#else
#define TPT_INLINE inline
#endif
#endif

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include "gui/interface/Point.h" #include "gui/interface/Point.h"
#include "Config.h" #include "common/tpt-compat.h"
class DebugInfo class DebugInfo
{ {

View File

@@ -9,6 +9,7 @@
#include "OpenGLHeaders.h" #include "OpenGLHeaders.h"
#endif #endif
#include "Config.h" #include "Config.h"
#include "common/tpt-inline.h"
#include "Pixel.h" #include "Pixel.h"
#include "Icons.h" #include "Icons.h"

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <string> #include <string>
#include "Config.h" #include "common/tpt-compat.h"
#include "Appearance.h" #include "Appearance.h"
#include "Point.h" #include "Point.h"

View File

@@ -3,7 +3,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "Config.h" #include "common/tpt-compat.h"
#include "gui/interface/Point.h" #include "gui/interface/Point.h"
class Graphics; class Graphics;