mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
@@ -1336,7 +1336,7 @@ void start_title_music()
|
||||
if ((RCT2_GLOBAL(0x009AF284, uint32) & (1 << 0)) && RCT2_GLOBAL(0x009AF59D, uint8) & 1 && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 1) {
|
||||
if (!RCT2_GLOBAL(0x009AF600, uint8)) {
|
||||
#ifdef USE_MIXER
|
||||
gMusicChannels[3] = Mixer_Play_Music(gMusicChannels[3], PATH_ID_CSS17);
|
||||
gMusicChannels[3] = Mixer_Play_Music(PATH_ID_CSS17);
|
||||
#else
|
||||
RCT2_GLOBAL(0x014241BC, uint32) = 1;
|
||||
int result = sound_channel_load_file2(3, (char*)get_file_path(PATH_ID_CSS17), 0);
|
||||
|
||||
@@ -563,10 +563,10 @@ int Mixer_Channel_IsPlaying(void* channel)
|
||||
return ((Channel*)channel)->IsPlaying();
|
||||
}
|
||||
|
||||
void* Mixer_Play_Music(void* channel, int pathid)
|
||||
void* Mixer_Play_Music(int pathid)
|
||||
{
|
||||
if (!(Channel*)channel && gMixer.LoadMusic(pathid)) {
|
||||
if (gMixer.LoadMusic(pathid)) {
|
||||
return gMixer.Play(gMixer.musicstreams[pathid], MIXER_LOOP_INFINITE, false);
|
||||
}
|
||||
return channel;
|
||||
return 0;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ void Mixer_Channel_Volume(void* channel, int volume);
|
||||
void Mixer_Channel_Pan(void* channel, float pan);
|
||||
void Mixer_Channel_Rate(void* channel, double rate);
|
||||
int Mixer_Channel_IsPlaying(void* channel);
|
||||
void* Mixer_Play_Music(void* channel, int pathid);
|
||||
void* Mixer_Play_Music(int pathid);
|
||||
|
||||
static int DStoMixerVolume(int volume) { return (int)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); };
|
||||
static float DStoMixerPan(int pan) { return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; };
|
||||
|
||||
@@ -339,7 +339,7 @@ void peep_update_crowd_noise()
|
||||
visiblePeeps = 0;
|
||||
|
||||
FOR_ALL_GUESTS(spriteIndex, peep) {
|
||||
if (peep->var_16 == 0x8000)
|
||||
if (peep->var_16 == (sint16)0x8000)
|
||||
continue;
|
||||
if (viewport->view_x > peep->var_1A)
|
||||
continue;
|
||||
@@ -362,7 +362,12 @@ void peep_update_crowd_noise()
|
||||
if (visiblePeeps < 0) {
|
||||
// Mute crowd noise
|
||||
if (RCT2_GLOBAL(0x009AF5FC, uint32) != 1) {
|
||||
#ifdef USE_MIXER
|
||||
Mixer_Stop_Channel(gMusicChannels[2]);
|
||||
gMusicChannels[2] = 0;
|
||||
#else
|
||||
sound_channel_stop(2); //RCT2_CALLPROC_1(0x00401A05, int, 2);
|
||||
#endif
|
||||
RCT2_GLOBAL(0x009AF5FC, uint32) = 1;
|
||||
}
|
||||
} else {
|
||||
@@ -378,7 +383,7 @@ void peep_update_crowd_noise()
|
||||
if (RCT2_GLOBAL(0x009AF5FC, uint32) == 1) {
|
||||
// Load and play crowd noise
|
||||
#ifdef USE_MIXER
|
||||
gMusicChannels[2] = Mixer_Play_Music(gMusicChannels[2], PATH_ID_CSS2);
|
||||
gMusicChannels[2] = Mixer_Play_Music(PATH_ID_CSS2);
|
||||
if (gMusicChannels[2]) {
|
||||
Mixer_Channel_Volume(gMusicChannels[2], DStoMixerVolume(volume));
|
||||
RCT2_GLOBAL(0x009AF5FC, uint32) = volume;
|
||||
|
||||
Reference in New Issue
Block a user