diff --git a/src/addresses.h b/src/addresses.h index 8418f05662..194e111b50 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -70,6 +70,10 @@ #define RCT2_ADDRESS_CONFIG_MUSIC 0x009AAC72 #define RCT2_ADDRESS_CONFIG_FLAGS 0x009AAC74 + +// MAX vehicle sounds not used anymore +#define RCT2_ADDRESS_CONFIG_MAX_VEHICLE_SOUNDS 0x009AAC75 + #define RCT2_ADDRESS_CONFIG_MAX_NO_SOUNDS 0x009AAC76 #define RCT2_ADDRESS_CONFIG_SOUND_QUALITY 0x009AAC77 #define RCT2_ADDRESS_CONFIG_METRIC 0x009AAC78 diff --git a/src/config.c b/src/config.c index 6287d08f2c..5dd2b18a75 100644 --- a/src/config.c +++ b/src/config.c @@ -870,7 +870,7 @@ void config_dat_load() */ - RCT2_GLOBAL(0x009AAC75, sint8) = RCT2_ADDRESS(0x009AF601, sint8)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8)]; + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_VEHICLE_SOUNDS, sint8) = RCT2_ADDRESS(0x009AF601, sint8)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8)]; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_NO_SOUNDS, sint8) = RCT2_ADDRESS(0x009AF604, sint8)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8)]; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0; if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS)) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 19b32d97e5..41741979d1 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -305,7 +305,7 @@ void vehicle_sounds_update() while (vehicle_sound->id != (uint16)-1) { vehicle_sound++; i++; - if (i >= countof(gVehicleSoundList)/*i >= RCT2_GLOBAL(0x009AAC75, uint8)*/) { + if (i >= countof(gVehicleSoundList)/*i >= RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_VEHICLE_SOUNDS, uint8)*/) { vehicle_sound_params = (rct_vehicle_sound_params*)((int)vehicle_sound_params + 10); goto label28; } diff --git a/src/windows/options.c b/src/windows/options.c index a2c58afb79..33a926693c 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -510,8 +510,7 @@ static void window_options_dropdown() window_invalidate(w); break; case WIDX_SOUND_QUALITY_DROPDOWN: - // TODO: no clue what this does (and if it's correct) - RCT2_GLOBAL(0x009AAC75, uint8) = RCT2_GLOBAL(0x009AF601 + dropdownIndex, uint8); + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_VEHICLE_SOUNDS, uint8) = RCT2_GLOBAL(0x009AF601 + dropdownIndex, uint8); RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_NO_SOUNDS, uint8) = RCT2_GLOBAL(0x009AF604 + dropdownIndex, uint8); gSound_config.sound_quality = (sint8)dropdownIndex; config_save();