mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
Fix cast warnings
This commit is contained in:
@@ -545,7 +545,7 @@ bool editor_check_park()
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (gParkEntranceX[i] != (sint16)0x8000)
|
||||
if (gParkEntranceX[i] != MAP_LOCATION_NULL)
|
||||
break;
|
||||
|
||||
if (i == 3) {
|
||||
@@ -555,7 +555,7 @@ bool editor_check_park()
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (gParkEntranceX[i] == (sint16)0x8000)
|
||||
if (gParkEntranceX[i] == MAP_LOCATION_NULL)
|
||||
continue;
|
||||
|
||||
int x = gParkEntranceX[i];
|
||||
|
||||
@@ -680,7 +680,7 @@ static void utf8_to_rct2_self(char *buffer, size_t length)
|
||||
const char *src = tempBuffer;
|
||||
char *dst = buffer;
|
||||
while (*src != 0 && i < length - 1) {
|
||||
if (*src == (char)0xFF) {
|
||||
if (*src == (char)(uint8)0xFF) {
|
||||
if (i < length - 3) {
|
||||
*dst++ = *src++;
|
||||
*dst++ = *src++;
|
||||
|
||||
@@ -607,7 +607,7 @@ enum {
|
||||
*/
|
||||
#define FOR_ALL_PEEPS(sprite_index, peep) \
|
||||
for (sprite_index = gSpriteListHead[SPRITE_LIST_PEEP]; sprite_index != SPRITE_INDEX_NULL; sprite_index = peep->next) \
|
||||
if ((peep = GET_PEEP(sprite_index)) || 1)
|
||||
if ((peep = GET_PEEP(sprite_index)) != NULL || 1)
|
||||
|
||||
#define FOR_ALL_GUESTS(sprite_index, peep) \
|
||||
FOR_ALL_PEEPS(sprite_index, peep) \
|
||||
|
||||
@@ -234,6 +234,7 @@ enum {
|
||||
#define MAP_ELEMENT_SURFACE_TERRAIN_MASK 0xE0
|
||||
|
||||
#define MAP_MINIMUM_X_Y -256
|
||||
#define MAP_LOCATION_NULL ((sint16)(uint16)0x8000)
|
||||
|
||||
#define MAX_MAP_ELEMENTS 196096
|
||||
#define MAX_TILE_MAP_ELEMENT_POINTERS (256 * 256)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "../ride/vehicle.h"
|
||||
|
||||
#define SPRITE_INDEX_NULL 0xFFFF
|
||||
#define SPRITE_LOCATION_NULL ((sint16)0x8000)
|
||||
#define SPRITE_LOCATION_NULL ((sint16)(uint16)0x8000)
|
||||
#define MAX_SPRITES 10000
|
||||
#define NUM_SPRITE_LISTS 6
|
||||
|
||||
|
||||
Reference in New Issue
Block a user