1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Refactor with sheltered knowledge

This commit is contained in:
Duncan Frost
2015-04-07 18:44:55 +01:00
committed by duncanspumpkin
parent d602fc75be
commit c8c55002c8
2 changed files with 7 additions and 6 deletions

View File

@@ -263,7 +263,8 @@ typedef struct {
uint8 highest_drop_height; // 0x117
sint32 sheltered_length; // 0x118
uint16 var_11C;
uint8 num_sheltered_sections; // 0x11E
uint8 num_sheltered_sections; // 0x11E (?abY YYYY)
// z related to var_10C
uint8 var_11F;
sint16 var_120;
sint16 var_122;
@@ -477,7 +478,7 @@ enum {
};
enum{
RIDE_TESTING_FLAG_0 = (1 << 0),
RIDE_TESTING_SHELTERED = (1 << 0),
RIDE_TESTING_TURN_LEFT = (1 << 1),
RIDE_TESTING_TURN_RIGHT = (1 << 2),
RIDE_TESTING_TURN_BANKED = (1 << 3),

View File

@@ -742,7 +742,7 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
y = vehicle->y;
if (x == SPRITE_LOCATION_NULL){
ride->testing_flags &= ~RIDE_TESTING_FLAG_0;
ride->testing_flags &= ~RIDE_TESTING_SHELTERED;
return;
}
@@ -751,7 +751,7 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
for (;; map_element++){
if (map_element_is_last_for_tile(map_element)){
ride->testing_flags &= ~RIDE_TESTING_FLAG_0;
ride->testing_flags &= ~RIDE_TESTING_SHELTERED;
return;
}
@@ -770,8 +770,8 @@ static void vehicle_update_measurements(rct_vehicle *vehicle)
}
}
if (!(ride->testing_flags & RIDE_TESTING_FLAG_0)){
ride->testing_flags |= RIDE_TESTING_FLAG_0;
if (!(ride->testing_flags & RIDE_TESTING_SHELTERED)){
ride->testing_flags |= RIDE_TESTING_SHELTERED;
uint8 num_sheltered_sections = ride->num_sheltered_sections & 0x1F;
if (num_sheltered_sections != 0x1F)