1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Name various ride variables, clear a warning in map.c, add a note in

scenario
This commit is contained in:
lnz
2014-05-29 23:42:24 +02:00
parent 6e32406e7b
commit 978bc39d25
4 changed files with 12 additions and 11 deletions

View File

@@ -352,7 +352,7 @@ int map_coord_is_connected(uint16 tile_idx, uint8 height, uint8 face_direction)
if (height == tile->base_height + 2)
return 1;
}
else if (path_dir ^ 2 == face_direction && height == tile->base_height) {
else if ((path_dir ^ 2) == face_direction && height == tile->base_height) {
return 1;
}
} else {

View File

@@ -204,7 +204,7 @@ void ride_update_favourited_stat()
int ride_entrance_exit_is_reachable(uint16 coordinate, rct_ride* ride, int index) {
int x = ((coordinate >> 8) & 0xFF) << 5, // cx
y = (coordinate & 0xFF) << 5; // ax
uint8 station_height = ride->pad_05A[index]; // pad_05a is uint8 station_base_height[4]
uint8 station_height = ride->station_heights[index];
int tile_idx = ((x << 8) | y) >> 5;
rct_map_element* tile = RCT2_ADDRESS(RCT2_ADDRESS_TILE_MAP_ELEMENT_POINTERS, rct_map_element*)[tile_idx];
@@ -241,7 +241,7 @@ void ride_entrance_exit_connected(rct_ride* ride, int ride_idx)
RCT2_GLOBAL(0x013CE952, uint16) = ride->var_04A;
RCT2_GLOBAL(0x013CE954, uint32) = ride->var_04C;
news_item_add_to_queue(1, 0xb26, ride_idx);
ride->var_1AF = 3;
ride->connected_message_throttle = 3;
}
if (exit != -1 && !ride_entrance_exit_is_reachable(exit, ride, i)) {
@@ -249,7 +249,7 @@ void ride_entrance_exit_connected(rct_ride* ride, int ride_idx)
RCT2_GLOBAL(0x013CE952, uint16) = ride->var_04A;
RCT2_GLOBAL(0x013CE954, uint32) = ride->var_04C;
news_item_add_to_queue(1, 0xb27, ride_idx);
ride->var_1AF = 3;
ride->connected_message_throttle = 3;
}
}
@@ -317,7 +317,7 @@ void ride_shop_connected(rct_ride* ride, int ride_idx)
RCT2_GLOBAL(0x013CE954, uint32) = ride->var_04C;
news_item_add_to_queue(1, 0xb26, ride_idx);
ride->var_1AF = 3;
ride->connected_message_throttle = 3;
}
@@ -333,9 +333,9 @@ void ride_check_all_reachable()
ride = GET_RIDE(i);
if (ride->type == RIDE_TYPE_NULL)
continue;
if (ride->var_1AF != 0)
ride->var_1AF--;
if (ride->status != RIDE_STATUS_OPEN || ride->var_1AF != 0)
if (ride->connected_message_throttle != 0)
ride->connected_message_throttle--;
if (ride->status != RIDE_STATUS_OPEN || ride->connected_message_throttle != 0)
continue;
if (RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + ride->type * 8, uint32) & 0x20000)

View File

@@ -56,7 +56,8 @@ typedef struct {
uint32 var_04C;
uint16 overall_view; // 0x050
uint16 station_starts[4]; // 0x052
uint8 pad_05A[0x10];
uint16 station_heights[4]; // 0x05A
uint8 pad_062[8];
uint16 entrances[4]; // 0x06A
uint16 exits[4]; // 0x072
uint8 pad_07A[0x0C];
@@ -111,7 +112,7 @@ typedef struct {
uint8 var_199;
uint8 pad_19A[0x14];
uint8 var_1AE;
uint8 var_1AF;
uint8 connected_message_throttle;
uint32 pad_1B0;
sint32 profit; // 0x1B4
uint8 queue_time[4]; // 0x1B8

View File

@@ -574,7 +574,7 @@ void scenario_update()
RCT2_CALLPROC_EBPSAFE(0x0069E79A); // daily profit update
RCT2_CALLPROC_EBPSAFE(0x0069C35E); // some kind of peeps days_visited update loop
get_local_time();
ride_check_all_reachable();
ride_check_all_reachable(); // XXX remove after debugging done
RCT2_CALLPROC_EBPSAFE(0x0066A13C); // objective 6 dragging
if (objective_type == 10 || objective_type == 9 || objective_type == 8 ||
objective_type == 6 || objective_type == 5) {