mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use RideProperties
This commit is contained in:
parent
0e42554f73
commit
d0bb8597d9
|
@ -3758,8 +3758,8 @@ static bool ride_is_valid_num_circuits(rct_ride *ride, int numCircuits)
|
|||
|
||||
static bool ride_is_valid_operation_option(rct_ride *ride, uint8 value)
|
||||
{
|
||||
uint8 minValue = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8) + 4, uint8);
|
||||
uint8 maxValue = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8) + 5, uint8);
|
||||
uint8 minValue = RideProperties[ride->type].min_value;
|
||||
uint8 maxValue = RideProperties[ride->type].max_value;
|
||||
if (ride->mode == RIDE_MODE_MAZE) {
|
||||
// Allow 64 people in mazes under non-cheat settings. The old maximum of 16 was too little for even moderately big mazes.
|
||||
maxValue = 64;
|
||||
|
@ -5460,7 +5460,7 @@ void game_command_set_ride_status(int *eax, int *ebx, int *ecx, int *edx, int *e
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
RCT2_GLOBAL(0x00F43484, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (ride->type * 8), uint32);
|
||||
RCT2_GLOBAL(0x00F43484, uint32) = RideProperties[ride->type].flags;
|
||||
|
||||
if (*ebx & GAME_COMMAND_FLAG_APPLY) {
|
||||
if (ride->overall_view != (uint16)-1) {
|
||||
|
@ -6048,12 +6048,8 @@ foundRideEntry:
|
|||
}
|
||||
ride->music = RCT2_ADDRESS(0x0097D4F4, uint8)[ride->type * 8];
|
||||
|
||||
ride->operation_option = (
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 4 + (ride->type * 8), uint8) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + 5 + (ride->type * 8), uint8)
|
||||
) / 4;
|
||||
const rct_ride_properties rideProperties = RideProperties[ride->type];
|
||||
ride->operation_option = (rideProperties.min_value * 3 + rideProperties.max_value) / 4;
|
||||
|
||||
ride->lift_hill_speed = RideLiftData[ride->type].minimum_speed;
|
||||
|
||||
|
@ -6676,7 +6672,7 @@ void game_command_set_ride_price(int *eax, int *ebx, int *ecx, int *edx, int *es
|
|||
|
||||
bool ride_type_has_flag(int rideType, int flag)
|
||||
{
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_RIDE_FLAGS + (rideType * 8), uint32) & flag) != 0;
|
||||
return (RideProperties[rideType].flags & flag) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue