mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #948 from kevinburke/downtime
Name var_199 as the downtime parameter
This commit is contained in:
commit
8013807f68
|
@ -1359,7 +1359,7 @@ static void ride_breakdown_update(int rideIndex)
|
|||
ride->var_1A0 +
|
||||
ride->var_1A2 +
|
||||
ride->var_1A3;
|
||||
ride->var_199 = min(ax / 2, 100);
|
||||
ride->downtime = min(ax / 2, 100);
|
||||
|
||||
ride->var_1A3 = ride->var_1A2;
|
||||
ride->var_1A2 = ride->var_1A1;
|
||||
|
|
|
@ -259,8 +259,8 @@ typedef struct {
|
|||
// Small constant used to increase the unreliability as the game continues,
|
||||
// making breakdowns more and more likely.
|
||||
uint8 unreliability_factor;
|
||||
// Down time
|
||||
uint8 var_199;
|
||||
// Range from [0, 100]
|
||||
uint8 downtime; // 0x199
|
||||
uint8 inspection_interval; // 0x19A
|
||||
uint8 last_inspection; // 0x19B
|
||||
uint8 var_19C;
|
||||
|
|
|
@ -3439,8 +3439,7 @@ static void window_ride_maintenance_paint()
|
|||
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, max(10, reliability), 14);
|
||||
y += 11;
|
||||
|
||||
// Down time
|
||||
downTime = ride->var_199;
|
||||
downTime = ride->downtime;
|
||||
gfx_draw_string_left(dpi, STR_DOWN_TIME_LABEL_1889, &downTime, 0, x, y);
|
||||
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, downTime, 28);
|
||||
y += 26;
|
||||
|
|
|
@ -513,7 +513,7 @@ static void window_ride_list_scrollpaint()
|
|||
case INFORMATION_TYPE_DOWN_TIME:
|
||||
// edx = RCT2_GLOBAL(0x009ACFA4 + (ride->var_001 * 4), uint32);
|
||||
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->var_199;
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->downtime;
|
||||
formatSecondary = STR_DOWN_TIME_LABEL;
|
||||
break;
|
||||
case INFORMATION_TYPE_GUESTS_FAVOURITE:
|
||||
|
@ -670,7 +670,7 @@ static void window_ride_list_refresh_list(rct_window *w)
|
|||
case INFORMATION_TYPE_DOWN_TIME:
|
||||
while (--current_list_position >= 0) {
|
||||
otherRide = &g_ride_list[w->list_item_positions[current_list_position]];
|
||||
if (ride->var_199 <= otherRide->var_199)
|
||||
if (ride->downtime <= otherRide->downtime)
|
||||
break;
|
||||
|
||||
window_bubble_list_item(w, current_list_position);
|
||||
|
|
|
@ -203,15 +203,13 @@ int calculate_park_rating()
|
|||
// Rides
|
||||
{
|
||||
int i;
|
||||
short _ax, total_ride_intensity = 0, total_ride_excitement = 0, average_intensity, average_excitement;
|
||||
short total_ride_uptime = 0, total_ride_intensity = 0, total_ride_excitement = 0, average_intensity, average_excitement;
|
||||
int num_rides, num_exciting_rides = 0;
|
||||
rct_ride* ride;
|
||||
|
||||
//
|
||||
_ax = 0;
|
||||
num_rides = 0;
|
||||
FOR_ALL_RIDES(i, ride) {
|
||||
_ax += 100 - ride->var_199;
|
||||
total_ride_uptime += 100 - ride->downtime;
|
||||
|
||||
if (ride->excitement != -1){
|
||||
total_ride_excitement += ride->excitement / 8;
|
||||
|
@ -222,7 +220,7 @@ int calculate_park_rating()
|
|||
}
|
||||
result -= 200;
|
||||
if (num_rides > 0)
|
||||
result += (_ax / num_rides) * 2;
|
||||
result += (total_ride_uptime / num_rides) * 2;
|
||||
|
||||
result -= 100;
|
||||
|
||||
|
|
Loading…
Reference in New Issue