1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Labelled offset to redundant max vehicle sounds.

This commit is contained in:
Duncan Frost
2014-12-31 15:04:20 +00:00
parent cbe49300b8
commit 4257d0bcc4
4 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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))

View File

@@ -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;
}

View File

@@ -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();