mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix merge errors
This commit is contained in:
parent
c912fab1da
commit
da5fd51feb
2 changed files with 4 additions and 22 deletions
|
|
@ -2236,8 +2236,6 @@ static int lib_sChangeMusic(lua_State *L)
|
||||||
#endif
|
#endif
|
||||||
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
||||||
|
|
||||||
fadein_ms = luaL_optinteger(L, 5, 0);
|
|
||||||
|
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
S_ChangeMusic(music_name, music_flags, looping);
|
S_ChangeMusic(music_name, music_flags, looping);
|
||||||
|
|
@ -2314,12 +2312,6 @@ static int lib_sPauseMusic(lua_State *L)
|
||||||
|
|
||||||
static int lib_sResumeMusic(lua_State *L)
|
static int lib_sResumeMusic(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = NULL;
|
|
||||||
NOHUD
|
|
||||||
if (!lua_isnone(L, 1) && lua_isuserdata(L, 1))
|
|
||||||
{
|
|
||||||
player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
|
||||||
UINT32 position = (UINT32)luaL_checkinteger(L, 1);
|
|
||||||
player_t *player = NULL;
|
player_t *player = NULL;
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
|
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
|
||||||
|
|
@ -2351,7 +2343,7 @@ static int lib_sStopMusic(lua_State *L)
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
lua_pushboolean(L, true)
|
lua_pushboolean(L, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ static void music_loop(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes);
|
Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes);
|
||||||
music_bytes = 0;
|
music_bytes = 0;
|
||||||
// be consistent with FMOD, otherwise I'd prefer to freeze music_bytes
|
// be consistent with FMOD, otherwise I'd prefer to freeze music_bytes
|
||||||
// since the other flags indicate music is still playing.
|
// since the other flags indicate music is still playing.
|
||||||
}
|
}
|
||||||
|
|
@ -508,7 +508,7 @@ void I_ResumeSong(INT32 handle)
|
||||||
(void)handle;
|
(void)handle;
|
||||||
if(!midimode)
|
if(!midimode)
|
||||||
{
|
{
|
||||||
while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { }
|
while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { }
|
||||||
// HACK: fixes issue of multiple effect callbacks being registered
|
// HACK: fixes issue of multiple effect callbacks being registered
|
||||||
if(music && !Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))
|
if(music && !Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))
|
||||||
// midimode and music must be checked in case nothing is actually playing
|
// midimode and music must be checked in case nothing is actually playing
|
||||||
|
|
@ -528,16 +528,6 @@ boolean I_MusicPlaying(void)
|
||||||
return (boolean)music;
|
return (boolean)music;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_MIDIPlaying(void)
|
|
||||||
{
|
|
||||||
return midimode && music;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_MusicPlaying(void)
|
|
||||||
{
|
|
||||||
return (boolean)music;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_MusicPaused(void)
|
boolean I_MusicPaused(void)
|
||||||
{
|
{
|
||||||
return Mix_PausedMusic();
|
return Mix_PausedMusic();
|
||||||
|
|
@ -918,7 +908,7 @@ boolean I_PlaySong(INT32 handle, boolean looping)
|
||||||
is_looping = looping;
|
is_looping = looping;
|
||||||
|
|
||||||
//MIDI does count correctly, but dummy out because unsupported
|
//MIDI does count correctly, but dummy out because unsupported
|
||||||
//If this is enabled, you need to edit Mix_PlayMusic above to never loop (0)
|
//If this is enabled, you need to edit Mix_PlayMusic above to never loop (0)
|
||||||
//and register the music_loop callback
|
//and register the music_loop callback
|
||||||
//music_bytes = 0;
|
//music_bytes = 0;
|
||||||
//if(!Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))
|
//if(!Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue