Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.10)
cmake_policy(SET CMP0063 NEW)

SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED TRUE)
SET(CMAKE_CXX_EXTENSIONS ON)
SET(CMAKE_C_STANDARD 11)
SET(CMAKE_C_STANDARD_REQUIRED TRUE)
SET(CMAKE_C_EXTENSIONS ON)

PROJECT(FTEQuake)

INCLUDE_DIRECTORIES(
include/fteqw/math
include/fteqw
include
engine/common
engine/client
engine/qclib
Expand Down Expand Up @@ -449,7 +459,7 @@ ELSEIF(WIN32 AND NOT FTE_USE_SDL)
SET(FTE_LIBS ${FTE_LIBS} ole32 gdi32 wsock32 winmm dxguid)
SET(FTE_DEFINES ${FTE_DEFINES};D3D9QUAKE;D3D11QUAKE)
SET(FTE_ARCH_FILES
engine/client/winquake.rc
contrib/winquake.rc
engine/common/sys_win_threads.c
engine/common/net_ssl_winsspi.c
engine/common/net_ssl_gnutls.c
Expand Down Expand Up @@ -480,7 +490,7 @@ ELSEIF(WIN32 AND NOT FTE_USE_SDL)

SET(FTESV_LIBS ${FTESV_LIBS} wsock32 winmm)
SET(FTESV_ARCH_FILES
engine/client/winquake.rc
contrib/winquake.rc
engine/common/sys_win_threads.c
engine/common/net_ssl_winsspi.c
engine/common/net_ssl_gnutls.c
Expand Down Expand Up @@ -625,12 +635,12 @@ ELSEIF(1) #SDL2
SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32)
SET(FTE_DEFINES ${FTE_DEFINES};NO_DIRECTX)
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/client/winquake.rc
contrib/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/client/winquake.rc
contrib/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
engine/server/sv_sys_win.c
Expand Down Expand Up @@ -796,7 +806,7 @@ SET(FTE_COMMON_FILES
engine/common/console.h
engine/common/cvar.h
engine/common/fs.h
engine/common/mathlib.h
include/fteqw/math/vector.h
engine/common/net.h
engine/common/netinc.h
engine/common/particles.h
Expand Down Expand Up @@ -825,7 +835,6 @@ SET(FTE_COMMON_FILES
engine/qclib/pr_comp.h
engine/qclib/progsint.h
engine/qclib/progslib.h
engine/qclib/progtype.h
engine/qclib/qcc.h
engine/qclib/qcd.h
engine/server/progdefs.h
Expand Down
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.
2 changes: 1 addition & 1 deletion engine/client/modelgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "scriplib.h"
#include "trilib.h"
#include "lbmlib.h"
#include "mathlib.h"
#include <fteqw/math/vector.h>

#endif

Expand Down
3 changes: 1 addition & 2 deletions engine/client/quakedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ extern "C" {
#include "vid.h"
#include "../common/sys.h"
#include "../common/zone.h"
#include "../common/mathlib.h"
#include <fteqw/math/vector.h>
#include "../common/cvar.h"
#include "../common/translate.h"
#include "../common/net.h"
Expand All @@ -195,7 +195,6 @@ extern "C" {
#include "cdaudio.h"
#include "../common/pmove.h"

#include "../qclib/progtype.h"
#include "../server/progdefs.h"
#include "../server/progs.h"
#include "../common/world.h"
Expand Down
9 changes: 0 additions & 9 deletions engine/client/render.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,6 @@ typedef struct
} mappings[1];
} skinfile_t;

// plane_t structure
typedef struct mplane_s
{
vec3_t normal;
float dist;
qbyte type; // for texture axis selection and fast side tests
qbyte signbits; // signx + signy<<1 + signz<<1
qbyte pad[2];
} mplane_t;
#define MAXFRUSTUMPLANES 7 //4 side, 1 near, 1 far (fog), 1 water plane.

typedef struct
Expand Down
2 changes: 1 addition & 1 deletion engine/client/spritegn.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "dictlib.h"
#include "trilib.h"
#include "lbmlib.h"
#include "mathlib.h"
#include <fteqw/math/vector.h>

#endif

Expand Down
127 changes: 1 addition & 126 deletions engine/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,132 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// comndef.h -- general definitions

#include <stdio.h>

//make shared
#ifndef QDECL
#ifdef _MSC_VER
#define QDECL _cdecl
#else
#define QDECL
#endif
#endif

#define VK_NO_STDINT_H //we're handling this. please don't cause conflicts. grr.
#if __STDC_VERSION__ >= 199901L || defined(__GNUC__) || _MSC_VER >= 1600
//C99 has a stdint header which hopefully contains an intptr_t
//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
#include <stdint.h>
typedef intptr_t qintptr_t;
typedef uintptr_t quintptr_t;
#define qint16_t int16_t
#define quint16_t uint16_t
#define qint32_t int32_t
#define quint32_t uint32_t
#define qint64_t int64_t
#define quint64_t uint64_t
#define qintmax_t intmax_t
#define quintmax_t uintmax_t
#else
#define qint8_t signed char //be explicit with this one.
#define quint8_t unsigned char
#define qint16_t short
#define quint16_t unsigned short
#define qint32_t int
#define quint32_t unsigned qint32_t
#if defined(_WIN64)
#define qintptr_t __int64
#define FTE_WORDSIZE 64
#define quintptr_t unsigned qintptr_t
#define qint64_t __int64
#define quint64_t unsigned __int64
#elif defined(_WIN32)
#if !defined(_MSC_VER) || _MSC_VER < 1300
#define __w64
#endif
typedef __int32 __w64 qintptr_t; //add __w64 if you need msvc to shut up about unsafe type conversions
typedef unsigned __int32 __w64 quintptr_t;
// #define qintptr_t __int32
// #define quintptr_t unsigned qintptr_t
#define qint64_t __int64
#define quint64_t unsigned __int64
#define FTE_WORDSIZE 32
#else
#ifdef __LP64__
#define qintptr_t long int
#define qint64_t long int
#define FTE_WORDSIZE 64
#elif __WORDSIZE == 64
#define qintptr_t long long
#define qint64_t long long
#define FTE_WORDSIZE 64
#else
#define qintptr_t long
#define qint64_t long long
#define FTE_WORDSIZE 32
#endif
#define quintptr_t unsigned qintptr_t
#define quint64_t unsigned qint64_t
#endif

#define qintmax_t qint64_t
#define quintmax_t quint64_t

#ifndef uint32_t
#define int8_t qint8_t
#define uint8_t quint8_t
#define int16_t qint16_t
#define uint16_t quint16_t
#define int32_t qint32_t
#define uint32_t quint32_t
#define int64_t qint64_t
#define uint64_t quint64_t
#define intptr_t qintptr_t
#define uintptr_t quintptr_t
#define intmax_t qintmax_t
#define uintmax_t quintmax_t
#endif
#endif

#ifndef FTE_WORDSIZE
#ifdef __WORDSIZE
#define FTE_WORDSIZE __WORDSIZE
#elif defined(_WIN64)
#define FTE_WORDSIZE 64
#else
#define FTE_WORDSIZE 32
#endif
#endif

#ifdef _MSC_VER
#if _MSC_VER >= 1900
// MSVC 14 supports these
#elif _MSC_VER >= 1310
#define strtoull _strtoui64
#define strtoll _strtoi64
#else
#define strtoull strtoul //hopefully this won't cause too many issues
#define strtoll strtol //hopefully this won't cause too many issues
#define DWORD_PTR DWORD //32bit only
#define ULONG_PTR ULONG
#endif
#endif


typedef unsigned char qbyte;

// KJB Undefined true and false defined in SciTech's DEBUG.H header
#undef true
#undef false

#ifdef __cplusplus
typedef enum {qfalse, qtrue} qboolean;//false and true are forcivly defined.
//#define true qtrue
//#define false qfalse
#else
typedef enum {qfalse, qtrue} qboolean;
#define true qtrue
#define false qfalse
#endif
#include <fteqw/math/scalar.h>

#define STRINGIFY2(s) #s
#define STRINGIFY(s) STRINGIFY2(s)
Expand Down
Loading