Skip to content

Commit 7de95a7

Browse files
committed
Use OpenGL/KHR types
1 parent f504c61 commit 7de95a7

File tree

19 files changed

+188
-264
lines changed

19 files changed

+188
-264
lines changed

CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
77
cmake_policy(SET CMP0063 NEW)
88

9+
SET(CMAKE_CXX_STANDARD 11)
10+
SET(CMAKE_CXX_STANDARD_REQUIRED TRUE)
11+
SET(CMAKE_CXX_EXTENSIONS ON)
12+
SET(CMAKE_C_STANDARD 11)
13+
SET(CMAKE_C_STANDARD_REQUIRED TRUE)
14+
SET(CMAKE_C_EXTENSIONS ON)
15+
916
PROJECT(FTEQuake)
1017

1118
INCLUDE_DIRECTORIES(
19+
include/math
20+
include
1221
engine/common
1322
engine/client
1423
engine/qclib
@@ -392,7 +401,7 @@ ELSEIF(WIN32 AND NOT FTE_USE_SDL)
392401
SET(FTE_LIBS ${FTE_LIBS} ole32 gdi32 wsock32 winmm dxguid)
393402
SET(FTE_DEFINES ${FTE_DEFINES};D3D9QUAKE;D3D11QUAKE)
394403
SET(FTE_ARCH_FILES
395-
engine/client/winquake.rc
404+
contrib/winquake.rc
396405
engine/common/sys_win_threads.c
397406
engine/common/net_ssl_winsspi.c
398407
engine/common/net_ssl_gnutls.c
@@ -423,7 +432,7 @@ ELSEIF(WIN32 AND NOT FTE_USE_SDL)
423432

424433
SET(FTESV_LIBS ${FTESV_LIBS} wsock32 winmm)
425434
SET(FTESV_ARCH_FILES
426-
engine/client/winquake.rc
435+
contrib/winquake.rc
427436
engine/common/sys_win_threads.c
428437
engine/common/net_ssl_winsspi.c
429438
engine/common/net_ssl_gnutls.c
@@ -568,11 +577,11 @@ ELSEIF(1) #SDL
568577
SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32)
569578
SET(FTE_DEFINES ${FTE_DEFINES};NO_DIRECTX)
570579
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
571-
engine/client/winquake.rc
580+
contrib/winquake.rc
572581
engine/common/net_ssl_winsspi.c
573582
)
574583
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
575-
engine/client/winquake.rc
584+
contrib/winquake.rc
576585
engine/common/net_ssl_winsspi.c
577586
engine/server/sv_sys_win.c
578587
)
@@ -766,7 +775,6 @@ SET(FTE_COMMON_FILES
766775
engine/qclib/pr_comp.h
767776
engine/qclib/progsint.h
768777
engine/qclib/progslib.h
769-
engine/qclib/progtype.h
770778
engine/qclib/qcc.h
771779
engine/qclib/qcd.h
772780
engine/server/progdefs.h
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

engine/client/quakedef.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ extern "C" {
195195
#include "cdaudio.h"
196196
#include "../common/pmove.h"
197197

198-
#include "../qclib/progtype.h"
199198
#include "../server/progdefs.h"
200199
#include "../server/progs.h"
201200
#include "../common/world.h"

engine/common/common.h

Lines changed: 1 addition & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -20,132 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2020
// comndef.h -- general definitions
2121

2222
#include <stdio.h>
23-
24-
//make shared
25-
#ifndef QDECL
26-
#ifdef _MSC_VER
27-
#define QDECL _cdecl
28-
#else
29-
#define QDECL
30-
#endif
31-
#endif
32-
33-
#define VK_NO_STDINT_H //we're handling this. please don't cause conflicts. grr.
34-
#if __STDC_VERSION__ >= 199901L || defined(__GNUC__) || _MSC_VER >= 1600
35-
//C99 has a stdint header which hopefully contains an intptr_t
36-
//its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything
37-
#include <stdint.h>
38-
typedef intptr_t qintptr_t;
39-
typedef uintptr_t quintptr_t;
40-
#define qint16_t int16_t
41-
#define quint16_t uint16_t
42-
#define qint32_t int32_t
43-
#define quint32_t uint32_t
44-
#define qint64_t int64_t
45-
#define quint64_t uint64_t
46-
#define qintmax_t intmax_t
47-
#define quintmax_t uintmax_t
48-
#else
49-
#define qint8_t signed char //be explicit with this one.
50-
#define quint8_t unsigned char
51-
#define qint16_t short
52-
#define quint16_t unsigned short
53-
#define qint32_t int
54-
#define quint32_t unsigned qint32_t
55-
#if defined(_WIN64)
56-
#define qintptr_t __int64
57-
#define FTE_WORDSIZE 64
58-
#define quintptr_t unsigned qintptr_t
59-
#define qint64_t __int64
60-
#define quint64_t unsigned __int64
61-
#elif defined(_WIN32)
62-
#if !defined(_MSC_VER) || _MSC_VER < 1300
63-
#define __w64
64-
#endif
65-
typedef __int32 __w64 qintptr_t; //add __w64 if you need msvc to shut up about unsafe type conversions
66-
typedef unsigned __int32 __w64 quintptr_t;
67-
// #define qintptr_t __int32
68-
// #define quintptr_t unsigned qintptr_t
69-
#define qint64_t __int64
70-
#define quint64_t unsigned __int64
71-
#define FTE_WORDSIZE 32
72-
#else
73-
#ifdef __LP64__
74-
#define qintptr_t long int
75-
#define qint64_t long int
76-
#define FTE_WORDSIZE 64
77-
#elif __WORDSIZE == 64
78-
#define qintptr_t long long
79-
#define qint64_t long long
80-
#define FTE_WORDSIZE 64
81-
#else
82-
#define qintptr_t long
83-
#define qint64_t long long
84-
#define FTE_WORDSIZE 32
85-
#endif
86-
#define quintptr_t unsigned qintptr_t
87-
#define quint64_t unsigned qint64_t
88-
#endif
89-
90-
#define qintmax_t qint64_t
91-
#define quintmax_t quint64_t
92-
93-
#ifndef uint32_t
94-
#define int8_t qint8_t
95-
#define uint8_t quint8_t
96-
#define int16_t qint16_t
97-
#define uint16_t quint16_t
98-
#define int32_t qint32_t
99-
#define uint32_t quint32_t
100-
#define int64_t qint64_t
101-
#define uint64_t quint64_t
102-
#define intptr_t qintptr_t
103-
#define uintptr_t quintptr_t
104-
#define intmax_t qintmax_t
105-
#define uintmax_t quintmax_t
106-
#endif
107-
#endif
108-
109-
#ifndef FTE_WORDSIZE
110-
#ifdef __WORDSIZE
111-
#define FTE_WORDSIZE __WORDSIZE
112-
#elif defined(_WIN64)
113-
#define FTE_WORDSIZE 64
114-
#else
115-
#define FTE_WORDSIZE 32
116-
#endif
117-
#endif
118-
119-
#ifdef _MSC_VER
120-
#if _MSC_VER >= 1900
121-
// MSVC 14 supports these
122-
#elif _MSC_VER >= 1310
123-
#define strtoull _strtoui64
124-
#define strtoll _strtoi64
125-
#else
126-
#define strtoull strtoul //hopefully this won't cause too many issues
127-
#define strtoll strtol //hopefully this won't cause too many issues
128-
#define DWORD_PTR DWORD //32bit only
129-
#define ULONG_PTR ULONG
130-
#endif
131-
#endif
132-
133-
134-
typedef unsigned char qbyte;
135-
136-
// KJB Undefined true and false defined in SciTech's DEBUG.H header
137-
#undef true
138-
#undef false
139-
140-
#ifdef __cplusplus
141-
typedef enum {qfalse, qtrue} qboolean;//false and true are forcivly defined.
142-
//#define true qtrue
143-
//#define false qfalse
144-
#else
145-
typedef enum {qfalse, qtrue} qboolean;
146-
#define true qtrue
147-
#define false qfalse
148-
#endif
23+
#include "math/types.h"
14924

15025
#define STRINGIFY2(s) #s
15126
#define STRINGIFY(s) STRINGIFY2(s)

0 commit comments

Comments
 (0)