mirror of https://github.com/OpenRCT2/OpenRCT2.git
commit
592e6bdd45
|
@ -70,6 +70,11 @@
|
||||||
#define RCT2_ADDRESS_CONFIG_MUSIC 0x009AAC72
|
#define RCT2_ADDRESS_CONFIG_MUSIC 0x009AAC72
|
||||||
|
|
||||||
#define RCT2_ADDRESS_CONFIG_FLAGS 0x009AAC74
|
#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_SOUND_QUALITY 0x009AAC77
|
||||||
#define RCT2_ADDRESS_CONFIG_METRIC 0x009AAC78
|
#define RCT2_ADDRESS_CONFIG_METRIC 0x009AAC78
|
||||||
#define RCT2_ADDRESS_CONFIG_TEMPERATURE 0x009AAC79
|
#define RCT2_ADDRESS_CONFIG_TEMPERATURE 0x009AAC79
|
||||||
|
|
|
@ -1481,7 +1481,7 @@ int sound_play_panned(int sound_id, int ebx, sint16 x, sint16 y, sint16 z)
|
||||||
while (other_sound->id != 0xFFFF) {
|
while (other_sound->id != 0xFFFF) {
|
||||||
i++;
|
i++;
|
||||||
other_sound = &RCT2_ADDRESS(0x009AF484, rct_other_sound)[i];
|
other_sound = &RCT2_ADDRESS(0x009AF484, rct_other_sound)[i];
|
||||||
if (i > RCT2_GLOBAL(0x009AAC76, uint8)) { // too many sounds playing
|
if (i > RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_NO_SOUNDS, uint8)) { // too many sounds playing
|
||||||
return sound_id;
|
return sound_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -870,8 +870,8 @@ 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(0x009AAC76, sint8) = RCT2_ADDRESS(0x009AF604, 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;
|
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0;
|
||||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS))
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) + 1) * 256;
|
||||||
|
|
|
@ -272,6 +272,8 @@ void game_update()
|
||||||
update_palette_effects();
|
update_palette_effects();
|
||||||
update_rain_animation();
|
update_rain_animation();
|
||||||
|
|
||||||
|
stop_completed_sounds(); // removes other sounds that are no longer playing, this is normally called somewhere in rct2_init
|
||||||
|
|
||||||
if (RCT2_GLOBAL(0x009AAC73, uint8) != 255) {
|
if (RCT2_GLOBAL(0x009AAC73, uint8) != 255) {
|
||||||
RCT2_GLOBAL(0x009AAC73, uint8)++;
|
RCT2_GLOBAL(0x009AAC73, uint8)++;
|
||||||
if (RCT2_GLOBAL(0x009AAC73, uint8) == 255)
|
if (RCT2_GLOBAL(0x009AAC73, uint8) == 255)
|
||||||
|
@ -309,8 +311,6 @@ void game_logic_update()
|
||||||
news_item_update_current();
|
news_item_update_current();
|
||||||
editor_open_windows_for_current_step();
|
editor_open_windows_for_current_step();
|
||||||
|
|
||||||
stop_completed_sounds(); // removes other sounds that are no longer playing, this is normally called somewhere in rct2_init
|
|
||||||
|
|
||||||
// Update windows
|
// Update windows
|
||||||
window_dispatch_update_all();
|
window_dispatch_update_all();
|
||||||
|
|
||||||
|
|
|
@ -1004,6 +1004,9 @@ void input_state_widget_pressed( int x, int y, int state, int widgetIndex, rct_w
|
||||||
if (!w)
|
if (!w)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (!widget)
|
||||||
|
break;
|
||||||
|
|
||||||
int mid_point_x = (widget->left + widget->right) / 2 + w->x;
|
int mid_point_x = (widget->left + widget->right) / 2 + w->x;
|
||||||
sound_play_panned(5, mid_point_x, 0, 0, 0);
|
sound_play_panned(5, mid_point_x, 0, 0, 0);
|
||||||
if (cursor_w_class != w->classification || cursor_w_number != w->number || widgetIndex != cursor_widgetIndex)
|
if (cursor_w_class != w->classification || cursor_w_number != w->number || widgetIndex != cursor_widgetIndex)
|
||||||
|
|
|
@ -305,7 +305,7 @@ void vehicle_sounds_update()
|
||||||
while (vehicle_sound->id != (uint16)-1) {
|
while (vehicle_sound->id != (uint16)-1) {
|
||||||
vehicle_sound++;
|
vehicle_sound++;
|
||||||
i++;
|
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);
|
vehicle_sound_params = (rct_vehicle_sound_params*)((int)vehicle_sound_params + 10);
|
||||||
goto label28;
|
goto label28;
|
||||||
}
|
}
|
||||||
|
|
|
@ -510,9 +510,8 @@ static void window_options_dropdown()
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_SOUND_QUALITY_DROPDOWN:
|
case WIDX_SOUND_QUALITY_DROPDOWN:
|
||||||
// TODO: no clue what this does (and if it's correct)
|
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_VEHICLE_SOUNDS, uint8) = RCT2_GLOBAL(0x009AF601 + dropdownIndex, uint8);
|
||||||
RCT2_GLOBAL(0x009AAC75, uint8) = RCT2_GLOBAL(0x009AF601 + dropdownIndex, uint8);
|
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MAX_NO_SOUNDS, uint8) = RCT2_GLOBAL(0x009AF604 + dropdownIndex, uint8);
|
||||||
RCT2_GLOBAL(0x009AAC76, uint8) = RCT2_GLOBAL(0x009AF604 + dropdownIndex, uint8);
|
|
||||||
gSound_config.sound_quality = (sint8)dropdownIndex;
|
gSound_config.sound_quality = (sint8)dropdownIndex;
|
||||||
config_save();
|
config_save();
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
|
|
Loading…
Reference in New Issue