mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
add sound enum
This commit is contained in:
66
src/audio.h
66
src/audio.h
@@ -64,9 +64,69 @@ void pause_sounds();
|
||||
void unpause_sounds();
|
||||
|
||||
typedef enum {
|
||||
RCT2_SOUND_SCREAM = 11,
|
||||
RCT2_SOUND_CHAINLIFT = 56,
|
||||
RCT2_SOUND_TRACKFRICTION = 57,
|
||||
SOUND_LIFT_1 = 0,
|
||||
SOUND_TRACK_FRICTION_1 = 1,
|
||||
SOUND_LIFT_2 = 2,
|
||||
SOUND_SCREAM_1 = 3,
|
||||
SOUND_CLICK_1 = 4,
|
||||
SOUND_CLICK_2 = 5,
|
||||
SOUND_PLACE_ITEM = 6,
|
||||
SOUND_SCREAM_2 = 7,
|
||||
SOUND_SCREAM_3 = 8,
|
||||
SOUND_SCREAM_4 = 9,
|
||||
SOUND_SCREAM_5 = 10,
|
||||
SOUND_SCREAM_6 = 11,
|
||||
SOUND_LIFT_3 = 12,
|
||||
SOUND_PURCHASE = 13,
|
||||
SOUND_CRASH = 14,
|
||||
SOUND_LAYING_OUT_WATER = 15,
|
||||
SOUND_WATER_1 = 16,
|
||||
SOUND_WATER_2 = 17,
|
||||
SOUND_TRAIN_WHISTLE = 18,
|
||||
SOUND_TRAIN_CHUGGING = 19,
|
||||
SOUND_WATER_SPLASH = 20,
|
||||
SOUND_HAMMERING = 21,
|
||||
SOUND_RIDE_LAUNCH_1 = 22,
|
||||
SOUND_RIDE_LAUNCH_2 = 23,
|
||||
SOUND_COUGH_1 = 24,
|
||||
SOUND_COUGH_2 = 25,
|
||||
SOUND_COUGH_3 = 26,
|
||||
SOUND_COUGH_4 = 27,
|
||||
SOUND_RAIN_1 = 28,
|
||||
SOUND_THUNDER_1 = 29,
|
||||
SOUND_THUNDER_2 = 30,
|
||||
SOUND_RAIN_2 = 31,
|
||||
SOUND_RAIN_3 = 32,
|
||||
SOUND_BALLOON_POP = 33,
|
||||
SOUND_MECHANIC_FIX = 34,
|
||||
SOUND_SCREAM_7 = 35,
|
||||
SOUND_TOILET_FLUSH = 36,
|
||||
SOUND_CLICK_3 = 37,
|
||||
SOUND_QUACK = 38,
|
||||
SOUND_NEWS_ITEM = 39,
|
||||
SOUND_WINDOW_OPEN = 40,
|
||||
SOUND_LAUGH_1 = 41,
|
||||
SOUND_LAUGH_2 = 42,
|
||||
SOUND_LAUGH_3 = 43,
|
||||
SOUND_APPLAUSE = 44,
|
||||
SOUND_HAUNTED_HOUSE_SCARE = 45,
|
||||
SOUND_HAUNTED_HOUSE_SCREAM_1 = 46,
|
||||
SOUND_HAUNTED_HOUSE_SCREAM_2 = 47,
|
||||
SOUND_48 = 48,
|
||||
SOUND_49 = 49,
|
||||
SOUND_ERROR = 50,
|
||||
SOUND_51 = 51,
|
||||
SOUND_LIFT_4 = 52,
|
||||
SOUND_LIFT_5 = 53,
|
||||
SOUND_TRACK_FRICTION_2 = 54,
|
||||
SOUND_LIFT_6 = 55,
|
||||
SOUND_LIFT_7 = 56,
|
||||
SOUND_TRACK_FRICTION_3 = 57,
|
||||
SOUND_SCREAM_8 = 58,
|
||||
SOUND_TRAM = 59,
|
||||
SOUND_DOOR_OPEN = 60,
|
||||
SOUND_DOOR_CLOSE = 61,
|
||||
SOUND_62 = 62
|
||||
} RCT2_SOUND;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -755,7 +755,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex)
|
||||
if (widget_is_disabled(w, widgetIndex))
|
||||
break;
|
||||
|
||||
sound_play_panned(4, w->x + (widget->left + widget->right) / 2);
|
||||
sound_play_panned(SOUND_CLICK_1, w->x + (widget->left + widget->right) / 2);
|
||||
|
||||
// Set new cursor down widget
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass) = windowClass;
|
||||
|
||||
@@ -82,7 +82,7 @@ void intro_update()
|
||||
_sound_playing_flag = 0;
|
||||
if (RCT2_GLOBAL(0x009AF280, sint32) != -1) {
|
||||
// Prepare and play the sound
|
||||
if (sound_prepare(RCT2_SOUND_CHAINLIFT, &_prepared_sound, 0, 1))
|
||||
if (sound_prepare(SOUND_LIFT_7, &_prepared_sound, 0, 1))
|
||||
if (sound_play(&_prepared_sound, 1, 0, 0, 0))
|
||||
_sound_playing_flag = 1;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ void intro_update()
|
||||
// Play the track friction sound
|
||||
if (RCT2_GLOBAL(0x009AF280, sint32) != -1) {
|
||||
// Prepare and play the sound
|
||||
if (sound_prepare(RCT2_SOUND_TRACKFRICTION, &_prepared_sound, 1, 1))
|
||||
if (sound_prepare(SOUND_TRACK_FRICTION_3, &_prepared_sound, 1, 1))
|
||||
if (sound_play(&_prepared_sound, 1, -800, 0, 0x3A98))
|
||||
_sound_playing_flag = 1;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void intro_update()
|
||||
|
||||
// Play long peep scream sound
|
||||
if (RCT2_GLOBAL(0x009AF280, sint32) != -1)
|
||||
if (sound_prepare(RCT2_SOUND_SCREAM, &_prepared_sound, 0, 1))
|
||||
if (sound_prepare(SOUND_SCREAM_1, &_prepared_sound, 0, 1))
|
||||
if (sound_play(&_prepared_sound, 0, 0, 0, 0))
|
||||
_sound_playing_flag = 1;
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ void news_item_update_current()
|
||||
newsItems[0].ticks++;
|
||||
if (newsItems[0].ticks == 1 && !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 1)) {
|
||||
// Play sound
|
||||
sound_play_panned(39, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) / 2);
|
||||
sound_play_panned(SOUND_NEWS_ITEM, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) / 2);
|
||||
}
|
||||
|
||||
// Removal of current news item
|
||||
|
||||
@@ -335,7 +335,7 @@ void peep_applause()
|
||||
}
|
||||
|
||||
// Play applause noise
|
||||
sound_play_panned(44, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) / 2);
|
||||
sound_play_panned(SOUND_APPLAUSE, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "rct2.h"
|
||||
|
||||
typedef struct {
|
||||
uint8 sprite_idetifier; // 0x00
|
||||
uint8 sprite_identifier; // 0x00
|
||||
uint8 pad_01[0x03];
|
||||
uint16 next; // 0x04
|
||||
uint8 pad_06[0x08];
|
||||
|
||||
@@ -376,7 +376,7 @@ rct_window *window_create(int x, int y, int width, int height, uint32 *event_han
|
||||
|
||||
// Play sound
|
||||
if (!(flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)))
|
||||
sound_play_panned(40, x + (width / 2));
|
||||
sound_play_panned(SOUND_WINDOW_OPEN, x + (width / 2));
|
||||
|
||||
w->number = 0;
|
||||
w->x = x;
|
||||
|
||||
@@ -894,7 +894,7 @@ static void window_footpath_place_path_at_point(int x, int y)
|
||||
// bp = 0x009DEA62
|
||||
// dx = 0x009DEA60
|
||||
// cx = 0x009DEA5E
|
||||
sound_play_panned(6, 0x8001);
|
||||
sound_play_panned(SOUND_PLACE_ITEM, 0x8001);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ static void window_news_update(rct_window *w)
|
||||
return;
|
||||
|
||||
window_invalidate(w);
|
||||
sound_play_panned(5, w->x + (w->width / 2));
|
||||
sound_play_panned(SOUND_CLICK_2, w->x + (w->width / 2));
|
||||
|
||||
newsItems = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
j = w->var_480;
|
||||
@@ -282,7 +282,7 @@ static void window_news_scrollmousedown()
|
||||
w->var_482 = buttonIndex;
|
||||
w->var_484 = 4;
|
||||
window_invalidate(w);
|
||||
sound_play_panned(4, w->x + (w->width / 2));
|
||||
sound_play_panned(SOUND_CLICK_1, w->x + (w->width / 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ static void window_scenarioselect_scrollmousedown()
|
||||
if (y >= 0)
|
||||
continue;
|
||||
|
||||
sound_play_panned(4, w->width / 2 + w->x);
|
||||
sound_play_panned(SOUND_CLICK_1, w->width / 2 + w->x);
|
||||
scenario_load_and_play(scenario);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user