From caa7d3177c691a83ba3642737eb58c1fe5eb600f Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 16 Jan 2021 16:05:27 +0200 Subject: Use of sized bool types for CFont --- src/core/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/common.h') diff --git a/src/core/common.h b/src/core/common.h index 9253a465..7213b140 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -79,6 +79,10 @@ typedef int64_t int64; // hardcode ucs-2 typedef uint16_t wchar; +typedef uint8 bool8; +typedef uint16 bool16; +typedef uint32 bool32; + #if defined(_MSC_VER) typedef ptrdiff_t ssize_t; #endif -- cgit v1.2.3 From 5a47379bf5f011a65c1d0f88a0cb5f2130feb9db Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 16 Jan 2021 16:44:59 +0300 Subject: Includes overhaul, fix some compiler warnings --- src/core/common.h | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'src/core/common.h') diff --git a/src/core/common.h b/src/core/common.h index 7213b140..8b5f6b3c 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -11,17 +11,34 @@ #include #include -#if defined _WIN32 && defined WITHWINDOWS -#include +#if !defined RW_D3D9 && defined LIBRW +#undef WITHD3D +#undef WITHDINPUT +#endif + +#if (defined WITHD3D && !defined LIBRW) +#define WITHWINDOWS #endif -#if defined _WIN32 && defined WITHD3D +#if defined _WIN32 && defined WITHWINDOWS && !defined _INC_WINDOWS #include -#ifndef USE_D3D9 -#include -#else -#include #endif + +#ifdef WITHD3D + #ifdef LIBRW + #define WITH_D3D // librw includes d3d9 itself via this right now + #else + #ifndef USE_D3D9 + #include + #else + #include + #endif + #endif +#endif + +#ifdef WITHDINPUT +#define DIRECTINPUT_VERSION 0x0800 +#include #endif #include @@ -52,14 +69,6 @@ #define rwVENDORID_ROCKSTAR 0x0253F2 -// Get rid of bullshit windows definitions, we're not running on an 8086 -#ifdef far -#undef far -#endif -#ifdef near -#undef near -#endif - #define Max(a,b) ((a) > (b) ? (a) : (b)) #define Min(a,b) ((a) < (b) ? (a) : (b)) -- cgit v1.2.3 From a6faa0384b591e8b9093b52b4955011126e942a3 Mon Sep 17 00:00:00 2001 From: withmorten Date: Sun, 17 Jan 2021 22:10:04 +0100 Subject: fix common.h d3d includes --- src/core/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/common.h') diff --git a/src/core/common.h b/src/core/common.h index 8b5f6b3c..d7facfd1 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -29,9 +29,9 @@ #define WITH_D3D // librw includes d3d9 itself via this right now #else #ifndef USE_D3D9 - #include + #include #else - #include + #include #endif #endif #endif -- cgit v1.2.3