mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix define checks in project
This commit is contained in:
parent
9240280005
commit
639f19adbf
|
@ -440,7 +440,7 @@
|
|||
#pragma endregion
|
||||
|
||||
#pragma region Obsolete
|
||||
#if USE_OBSOLETE_ADDRESSES
|
||||
#ifdef USE_OBSOLETE_ADDRESSES
|
||||
|
||||
// The following addresses relate to memory locations that no longer used by
|
||||
// OpenRCT2. This may be due to the data at those locations being stored in
|
||||
|
|
|
@ -411,7 +411,7 @@ static void PrintVersion()
|
|||
openrct2_write_full_version_info(buffer, sizeof(buffer));
|
||||
Console::WriteLine(buffer);
|
||||
Console::WriteFormat("%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE);
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
Console::Write(" (NO_RCT2)");
|
||||
#endif
|
||||
Console::WriteLine();
|
||||
|
|
|
@ -47,13 +47,13 @@
|
|||
// aliasing the same memory area. Using it lets compiler generate better code. If your compiler
|
||||
// does not support it, feel free to drop it, at some performance hit.
|
||||
#ifdef __cplusplus
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#define RESTRICT __restrict
|
||||
#else
|
||||
#define RESTRICT __restrict__
|
||||
#endif
|
||||
#else
|
||||
#if _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
#define RESTRICT __restrict
|
||||
#else
|
||||
#define RESTRICT restrict
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace Path
|
|||
|
||||
utf8 * GetAbsolute(utf8 *buffer, size_t bufferSize, const utf8 * relativePath)
|
||||
{
|
||||
#if __WINDOWS__
|
||||
#ifdef __WINDOWS__
|
||||
wchar_t * relativePathW = utf8_to_widechar(relativePath);
|
||||
wchar_t absolutePathW[MAX_PATH];
|
||||
DWORD length = GetFullPathNameW(relativePathW, Util::CountOf(absolutePathW), absolutePathW, NULL);
|
||||
|
@ -153,7 +153,7 @@ namespace Path
|
|||
bool Equals(const utf8 * a, const utf8 * b)
|
||||
{
|
||||
bool ignoreCase = false;
|
||||
#if __WINDOWS__
|
||||
#ifdef __WINDOWS__
|
||||
ignoreCase = true;
|
||||
#endif
|
||||
return String::Equals(a, b, ignoreCase);
|
||||
|
|
|
@ -37,7 +37,7 @@ sint32 gPickupPeepY;
|
|||
void *unk_9ABDA4;
|
||||
void *unk_9E3CDC;
|
||||
void *unk_9E3CE4[8];
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
rct_drawpixelinfo *unk_140E9A8;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ extern rct_drawpixelinfo gWindowDPI;
|
|||
extern void *unk_9ABDA4;
|
||||
extern void *unk_9E3CDC;
|
||||
extern void *unk_9E3CE4[8];
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
extern rct_drawpixelinfo *unk_140E9A8;
|
||||
#else
|
||||
#define unk_140E9A8 RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*)
|
||||
|
|
|
@ -25,7 +25,7 @@ void *_g1Buffer = NULL;
|
|||
|
||||
rct_gx g2;
|
||||
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
rct_g1_element *g1Elements = NULL;
|
||||
#else
|
||||
rct_g1_element *g1Elements = (rct_g1_element*)RCT2_ADDRESS_G1_ELEMENTS;
|
||||
|
@ -92,7 +92,7 @@ int gfx_load_g1()
|
|||
header.num_entries = 29294;
|
||||
|
||||
// Read element headers
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
g1Elements = calloc(324206, sizeof(rct_g1_element));
|
||||
#endif
|
||||
|
||||
|
@ -122,7 +122,7 @@ int gfx_load_g1()
|
|||
void gfx_unload_g1()
|
||||
{
|
||||
SafeFree(_g1Buffer);
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
SafeFree(g1Elements);
|
||||
#endif
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int
|
|||
uint32 primary_offset = palette_to_g1_offset[(image_id >> 19) & 0x1F];
|
||||
uint32 secondary_offset = palette_to_g1_offset[(image_id >> 24) & 0x1F];
|
||||
|
||||
#if DEBUG_LEVEL_2
|
||||
#ifdef DEBUG_LEVEL_2
|
||||
assert(tertiary_colour < PALETTE_TO_G1_OFFSET_COUNT);
|
||||
#endif // DEBUG_LEVEL_2
|
||||
uint32 tertiary_offset = palette_to_g1_offset[tertiary_colour];
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
|
||||
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
paint_struct *unk_EE7884;
|
||||
paint_struct *unk_EE7888;
|
||||
#endif
|
||||
|
@ -1598,7 +1598,7 @@ uint8 get_current_rotation()
|
|||
{
|
||||
uint8 rotation = gCurrentRotation;
|
||||
uint8 rotation_masked = rotation & 3;
|
||||
#if DEBUG_LEVEL_1
|
||||
#ifdef DEBUG_LEVEL_1
|
||||
if (rotation != rotation_masked) {
|
||||
log_error("Found wrong rotation %d! Will return %d instead.", (uint32)rotation, (uint32)rotation_masked);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ typedef struct viewport_interaction_info {
|
|||
|
||||
// rct2: 0x014234BC
|
||||
extern rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
extern paint_struct *unk_EE7884;
|
||||
extern paint_struct *unk_EE7888;
|
||||
#else
|
||||
|
|
|
@ -72,7 +72,7 @@ int object_entry_group_encoding[] = {
|
|||
CHUNK_ENCODING_ROTATE
|
||||
};
|
||||
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
rct_ride_entry *gRideEntries[128];
|
||||
rct_small_scenery_entry *gSmallSceneryEntries[252];
|
||||
rct_large_scenery_entry *gLargeSceneryEntries[128];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "world/scenery.h"
|
||||
#include "world/water.h"
|
||||
|
||||
#if NO_RCT2
|
||||
#ifdef NO_RCT2
|
||||
extern rct_ride_entry *gRideEntries[128];
|
||||
extern rct_small_scenery_entry *gSmallSceneryEntries[252];
|
||||
extern rct_large_scenery_entry *gLargeSceneryEntries[128];
|
||||
|
|
|
@ -597,7 +597,7 @@ static void openrct2_setup_rct2_hooks()
|
|||
// None for now
|
||||
}
|
||||
|
||||
#if _MSC_VER >= 1900
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||
/**
|
||||
* Temporary fix for libraries not compiled with VS2015
|
||||
*/
|
||||
|
|
|
@ -600,7 +600,7 @@ static int scenario_create_ducks()
|
|||
*/
|
||||
unsigned int scenario_rand()
|
||||
{
|
||||
#if DEBUG_DESYNC
|
||||
#ifdef DEBUG_DESYNC
|
||||
if (!gInUpdateCode) {
|
||||
log_warning("scenario_rand called from outside game update");
|
||||
assert(false);
|
||||
|
|
|
@ -168,11 +168,11 @@ bool readentirefile(const utf8 *path, void **outBuffer, int *outLength)
|
|||
|
||||
int bitscanforward(int source)
|
||||
{
|
||||
#if _MSC_VER >= 1400 // Visual Studio 2005
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400) // Visual Studio 2005
|
||||
int i;
|
||||
uint8 success = _BitScanForward(&i, source);
|
||||
return success != 0 ? i : -1;
|
||||
#elif __GNUC__
|
||||
#elif defined(__GNUC__)
|
||||
int success = __builtin_ffs(source);
|
||||
return success - 1;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue