mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-17 01:21:18 +00:00
revert two custom Lua function names
reverting both get/set names (and I hate to be that person), because they both are named improperly for their usage
This commit is contained in:
parent
b669d24817
commit
11ab92783e
3 changed files with 12 additions and 12 deletions
|
@ -1766,9 +1766,9 @@ static int lib_sChangeMusic(lua_State *L)
|
|||
}
|
||||
|
||||
//=====================================================================
|
||||
//miru: A block where I can put my open functions to Lua...they can be organized later
|
||||
//miru: A block where I, can put my open functions to Lua...they can be organized later
|
||||
//(or just shoved into a future mir_lua.c like before)
|
||||
static int lib_sPositionMusic(lua_State *L)
|
||||
static int lib_sSetMusicPosition(lua_State *L)
|
||||
{
|
||||
fixed_t fixedspeed = luaL_checkfixed(L, 1);
|
||||
float position = fixedspeed*0.001f;
|
||||
|
@ -1782,15 +1782,15 @@ static int lib_sPositionMusic(lua_State *L)
|
|||
return LUA_ErrInvalid(L, "player_t");
|
||||
}
|
||||
if (!player || P_IsLocalPlayer(player))
|
||||
S_PositionMusic(position);
|
||||
S_SetMusicPosition(position);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_sGetPositionMusic(lua_State *L)
|
||||
static int lib_sGetMusicPosition(lua_State *L)
|
||||
{
|
||||
float fpos = S_GetPositionMusic();
|
||||
float fpos = S_GetMusicPosition();
|
||||
lua_pushnumber(L, (lua_Number)(fpos*1000));
|
||||
//CONS_Printf("GetPositionMusic: %05f\n\n\n",fpos);
|
||||
//CONS_Printf("GetMusicPosition: %05f\n\n\n",fpos);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2210,8 +2210,8 @@ static luaL_Reg lib[] = {
|
|||
{"G_TicsToMilliseconds",lib_gTicsToMilliseconds},
|
||||
|
||||
//miru: Put everything added here, categorizing right now isn't something I want to wander through
|
||||
{"S_PositionMusic",lib_sPositionMusic},
|
||||
{"S_GetPositionMusic",lib_sGetPositionMusic},
|
||||
{"S_SetMusicPosition",lib_sSetMusicPosition},
|
||||
{"S_GetMusicPosition",lib_sGetMusicPosition},
|
||||
{"S_FadeOutMusic",lib_sFadeOutMusic},
|
||||
{"P_SetActiveMotionBlur",lib_pSetActiveMotionBlur},
|
||||
|
||||
|
|
|
@ -1271,12 +1271,12 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
|
|||
I_SetSongTrack(mflags & MUSIC_TRACKMASK);
|
||||
}
|
||||
|
||||
void S_PositionMusic(float position)
|
||||
void S_SetMusicPosition(float position)
|
||||
{
|
||||
I_SetMusicPosition(position);
|
||||
}
|
||||
|
||||
float S_GetPositionMusic(void)
|
||||
float S_GetMusicPosition(void)
|
||||
{
|
||||
return I_GetMusicPosition();
|
||||
}
|
||||
|
|
|
@ -111,10 +111,10 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping);
|
|||
//(because I'm not allowed to name it to not be as sloppily named the way it is)
|
||||
|
||||
// Seek to a point in the current song
|
||||
void S_PositionMusic(float position);
|
||||
void S_SetMusicPosition(float position);
|
||||
|
||||
// Get the current music position
|
||||
float S_GetPositionMusic(void);
|
||||
float S_GetMusicPosition(void);
|
||||
|
||||
// Fade in over milliseconds of time
|
||||
void S_FadeInMusic(int ms);
|
||||
|
|
Loading…
Reference in a new issue