mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
20
src/config.c
20
src/config.c
@@ -692,26 +692,6 @@ static void config_write_enum(SDL_RWops *file, uint8 type, value_union *value, c
|
||||
config_save_property_value(file, type, value);
|
||||
}
|
||||
|
||||
static int utf8_read(utf8 **outch)
|
||||
{
|
||||
int result;
|
||||
int numBytes;
|
||||
|
||||
utf8 *ch = *outch;
|
||||
if (!(ch[0] & 0x80)) {
|
||||
result = ch[0];
|
||||
numBytes = 1;
|
||||
} else if (!(ch[0] & 0x20)) {
|
||||
result = ((ch[0] & 0x1F) << 6) | (ch[1] & 0x3F);
|
||||
numBytes = 2;
|
||||
} else {
|
||||
numBytes = 1;
|
||||
}
|
||||
|
||||
*outch = ch + numBytes;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void utf8_skip_whitespace(utf8 **outch)
|
||||
{
|
||||
utf8 *ch;
|
||||
|
||||
@@ -7905,10 +7905,10 @@ static bool sub_69AF1E(rct_peep *peep, int rideIndex, int shopItem, money32 pric
|
||||
|
||||
if (shop_item_is_food_or_drink(shopItem)) {
|
||||
int food = -1;
|
||||
if (food = peep_has_food_standard_flag(peep)) {
|
||||
if ((food = peep_has_food_standard_flag(peep))) {
|
||||
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_HAVENT_FINISHED, bitscanforward(food));
|
||||
return 0;
|
||||
} else if (food = peep_has_food_extra_flag(peep)) {
|
||||
} else if ((food = peep_has_food_extra_flag(peep))) {
|
||||
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_HAVENT_FINISHED, bitscanforward(food) + 32);
|
||||
return 0;
|
||||
} else if (peep->nausea >= 145)
|
||||
|
||||
@@ -317,13 +317,16 @@ int platform_enumerate_files_begin(const utf8 *pattern)
|
||||
|
||||
bool platform_enumerate_files_next(int handle, file_info *outFileInfo)
|
||||
{
|
||||
bool result;
|
||||
bool result = true;
|
||||
enumerate_file_info *enumFileInfo;
|
||||
|
||||
if (handle < 0)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
enumFileInfo = &_enumerateFileInfoList[handle];
|
||||
|
||||
log_verbose("handle = %d", handle);
|
||||
if ((handle >= 0) && (enumFileInfo->handle < enumFileInfo->cnt)) {
|
||||
if (result && (enumFileInfo->handle < enumFileInfo->cnt)) {
|
||||
result = true;
|
||||
} else {
|
||||
result = false;
|
||||
|
||||
@@ -1291,8 +1291,8 @@ const rct_ride_type_vehicle CableLiftVehicle = {
|
||||
.powered_acceleration = 0,
|
||||
.powered_max_speed = 0,
|
||||
.car_visual = 0,
|
||||
.pad_5E = { 1 },
|
||||
.pad_5E = 1,
|
||||
.draw_order = 14,
|
||||
.special_frames = 0,
|
||||
.peep_loading_positions = NULL
|
||||
};
|
||||
};
|
||||
|
||||
@@ -912,7 +912,7 @@ void game_command_remove_scenery(int* eax, int* ebx, int* ecx, int* edx, int* es
|
||||
while(map_element->type != map_element_type ||
|
||||
map_element->base_height != base_height ||
|
||||
map_element->properties.scenery.type != scenery_type ||
|
||||
(*ebx & 0x40) && !(map_element->flags & MAP_ELEMENT_FLAG_GHOST)){
|
||||
((*ebx & GAME_COMMAND_FLAG_GHOST) && !(map_element->flags & MAP_ELEMENT_FLAG_GHOST))){
|
||||
map_element++;
|
||||
if((map_element - 1)->flags & MAP_ELEMENT_FLAG_LAST_TILE){
|
||||
*ebx = 0;
|
||||
@@ -3844,10 +3844,10 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle
|
||||
ch += 2;
|
||||
}
|
||||
int bh = zLow + 4;
|
||||
if ((!(bl & 1) || (bl & 0x10 || zLow >= al) && bh >= al) &&
|
||||
(!(bl & 2) || (bl & 0x20 || zLow >= ah) && bh >= ah) &&
|
||||
(!(bl & 4) || (bl & 0x40 || zLow >= cl) && bh >= cl) &&
|
||||
(!(bl & 8) || (bl & 0x80 || zLow >= ch) && bh >= ch)) {
|
||||
if ((!(bl & 1) || ((bl & 0x10 || zLow >= al) && bh >= al)) &&
|
||||
(!(bl & 2) || ((bl & 0x20 || zLow >= ah) && bh >= ah)) &&
|
||||
(!(bl & 4) || ((bl & 0x40 || zLow >= cl) && bh >= cl)) &&
|
||||
(!(bl & 8) || ((bl & 0x80 || zLow >= ch) && bh >= ch))) {
|
||||
continue;
|
||||
}
|
||||
loc_68BABC:
|
||||
|
||||
Reference in New Issue
Block a user