diff --git a/src/audio.c b/src/audio.c index d77b018fa0..8f483f4fcb 100644 --- a/src/audio.c +++ b/src/audio.c @@ -31,6 +31,11 @@ int sound_prepare(int sound_id, rct_sound *sound, int var_8, int var_c) return RCT2_CALLFUNC_4(0x00404C6D, int, int, rct_sound*, int, int, sound_id, sound, var_8, var_c); } +void sound_play_panned(int sound_id, int x) +{ + RCT2_CALLPROC_X(0x006BB76E, sound_id, x, 0, 0, 0, 0, 0); +} + int sound_play(rct_sound* sound, int looping, int volume, int pan, int frequency) { return RCT2_CALLFUNC_5(0x00404E7F, int, rct_sound*, int, int, int, int, sound, looping, volume, pan, frequency); @@ -38,5 +43,5 @@ int sound_play(rct_sound* sound, int looping, int volume, int pan, int frequency void sound_stop(rct_sound* sound) { - return RCT2_CALLPROC_1(0x00404DD8, rct_sound*, sound); + RCT2_CALLPROC_1(0x00404DD8, rct_sound*, sound); } \ No newline at end of file diff --git a/src/audio.h b/src/audio.h index 1388be093d..70a887057b 100644 --- a/src/audio.h +++ b/src/audio.h @@ -45,6 +45,7 @@ typedef struct { void get_dsound_devices(); int sound_prepare(int sound_id, rct_sound *sound, int var_8, int var_c); +void sound_play_panned(int sound_id, int x); int sound_play(rct_sound* sound, int looping, int volume, int pan, int frequency); void sound_stop(rct_sound *sound); diff --git a/src/rct2.h b/src/rct2.h index 3e2b5b57a1..9c42e2d232 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -21,7 +21,9 @@ #ifndef _SDL_RCT2_H_ #define _SDL_RCT2_H_ -#define NULL 0 +#ifndef NULL + #define NULL 0 +#endif typedef signed char sint8; typedef signed short sint16; diff --git a/src/window.c b/src/window.c index 8ba3ba10b0..de0b938149 100644 --- a/src/window.c +++ b/src/window.c @@ -19,6 +19,7 @@ *****************************************************************************/ #include "addresses.h" +#include "audio.h" #include "rct2.h" #include "window.h" @@ -54,7 +55,7 @@ void window_update_all() */ rct_window *window_create(int x, int y, int width, int height, uint32 *event_handlers, rct_windowclass cls, uint16 flags) { - rct_window *w, *v; + rct_window *w; // Check if there are any window slots left if (RCT2_NEW_WINDOW == &(RCT2_FIRST_WINDOW[12])) { @@ -93,7 +94,7 @@ rct_window *window_create(int x, int y, int width, int height, uint32 *event_han // Play sound if (!(flags & 0x03)) - RCT2_CALLPROC_X(0x006BB76E, 40, x + (width / 2), 0, 0, 0, 0, 0); + sound_play_panned(40, x + (width / 2)); w->number = 0; w->x = x; diff --git a/src/window_title_logo.c b/src/window_title_logo.c index 0304854533..0939350ef8 100644 --- a/src/window_title_logo.c +++ b/src/window_title_logo.c @@ -45,7 +45,7 @@ void window_title_logo_open() // Create the window window = window_create(0, 0, 200, 106 + (10 * packs), 0x0097BF6C, WC_TITLE_LOGO, 0x02); - window->widgets = window_title_logo_widgets; + window->widgets = 0x009A9658; window_init_scroll_widgets(window); window->flags |= 16; window->colours[0] = 129; diff --git a/src/window_title_menu.c b/src/window_title_menu.c index 89a72fe670..5f257aa470 100644 --- a/src/window_title_menu.c +++ b/src/window_title_menu.c @@ -1,4 +1,4 @@ -x/***************************************************************************** +/***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. *