diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/Radar.cpp | 2 | ||||
-rw-r--r-- | src/core/common.h | 10 | ||||
-rw-r--r-- | src/core/config.h | 9 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 99ad7d0b..116e9e94 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -79,7 +79,7 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = { #define RADAR_NUM_TILES (8) #define RADAR_TILE_SIZE (RADAR_SIZE_X / RADAR_NUM_TILES) -re3_static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not a square"); +static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not a square"); #define RADAR_MIN_RANGE (120.0f) #define RADAR_MAX_RANGE (350.0f) diff --git a/src/core/common.h b/src/core/common.h index d3b0daa9..84440968 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -357,21 +357,19 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function #endif #define ASSERT assert -#if defined DEBUG && !defined __MWERKS__ -#define re3_static_assert(bool_constexpr, message) static_assert(bool_constexpr, message) -#else -#define re3_static_assert(bool_constexpr, message) +#ifdef __MWERKS__ +#define static_assert(bool_constexpr, message) #endif #define _TODO(x) #define _TODOCONST(x) (x) #ifdef CHECK_STRUCT_SIZES -#define VALIDATE_SIZE(struc, size) re3_static_assert(sizeof(struc) == size, "Invalid structure size of " #struc) +#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc) #else #define VALIDATE_SIZE(struc, size) #endif -#define VALIDATE_OFFSET(struc, member, offset) re3_static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...") +#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...") #define PERCENT(x, p) ((float(x) * (float(p) / 100.0f))) #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) diff --git a/src/core/config.h b/src/core/config.h index e71c34a8..35130024 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -1,7 +1,7 @@ #pragma once -// disable (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file -#define VANILLA_DEFINES +// disables (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file +//#define VANILLA_DEFINES enum Config { NUMPLAYERS = 1, // 4 on PS2 @@ -243,7 +243,7 @@ enum Config { #define ASCII_STRCMP // use faster ascii str comparisons -#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ +#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ || defined VANILLA_DEFINES #undef ASCII_STRCMP #endif @@ -429,7 +429,6 @@ enum Config { #undef FIX_BUGS #undef THIS_IS_STUPID #undef MORE_LANGUAGES -#undef MORE_LANGUAGES #undef COMPATIBLE_SAVES #undef LOAD_INI_SETTINGS @@ -471,7 +470,7 @@ enum Config { #undef INVERT_LOOK_FOR_PAD #undef USE_DEBUG_SCRIPT_LOADER -#undef USE_MEASUREMENTS_IN_METERS // TODO +#undef USE_MEASUREMENTS_IN_METERS #undef USE_PRECISE_MEASUREMENT_CONVERTION #undef MISSION_REPLAY #undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT |