Skip to content
Snippets Groups Projects
Commit 11ab9278 authored by Luna's avatar Luna
Browse files

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
parent b669d248
No related branches found
No related tags found
No related merge requests found
...@@ -1766,9 +1766,9 @@ static int lib_sChangeMusic(lua_State *L) ...@@ -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) //(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); fixed_t fixedspeed = luaL_checkfixed(L, 1);
float position = fixedspeed*0.001f; float position = fixedspeed*0.001f;
...@@ -1782,15 +1782,15 @@ static int lib_sPositionMusic(lua_State *L) ...@@ -1782,15 +1782,15 @@ static int lib_sPositionMusic(lua_State *L)
return LUA_ErrInvalid(L, "player_t"); return LUA_ErrInvalid(L, "player_t");
} }
if (!player || P_IsLocalPlayer(player)) if (!player || P_IsLocalPlayer(player))
S_PositionMusic(position); S_SetMusicPosition(position);
return 0; 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)); 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; return 1;
} }
...@@ -2210,8 +2210,8 @@ static luaL_Reg lib[] = { ...@@ -2210,8 +2210,8 @@ static luaL_Reg lib[] = {
{"G_TicsToMilliseconds",lib_gTicsToMilliseconds}, {"G_TicsToMilliseconds",lib_gTicsToMilliseconds},
//miru: Put everything added here, categorizing right now isn't something I want to wander through //miru: Put everything added here, categorizing right now isn't something I want to wander through
{"S_PositionMusic",lib_sPositionMusic}, {"S_SetMusicPosition",lib_sSetMusicPosition},
{"S_GetPositionMusic",lib_sGetPositionMusic}, {"S_GetMusicPosition",lib_sGetMusicPosition},
{"S_FadeOutMusic",lib_sFadeOutMusic}, {"S_FadeOutMusic",lib_sFadeOutMusic},
{"P_SetActiveMotionBlur",lib_pSetActiveMotionBlur}, {"P_SetActiveMotionBlur",lib_pSetActiveMotionBlur},
......
...@@ -1271,12 +1271,12 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping) ...@@ -1271,12 +1271,12 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
I_SetSongTrack(mflags & MUSIC_TRACKMASK); I_SetSongTrack(mflags & MUSIC_TRACKMASK);
} }
void S_PositionMusic(float position) void S_SetMusicPosition(float position)
{ {
I_SetMusicPosition(position); I_SetMusicPosition(position);
} }
float S_GetPositionMusic(void) float S_GetMusicPosition(void)
{ {
return I_GetMusicPosition(); return I_GetMusicPosition();
} }
......
...@@ -111,10 +111,10 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping); ...@@ -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) //(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 // Seek to a point in the current song
void S_PositionMusic(float position); void S_SetMusicPosition(float position);
// Get the current music position // Get the current music position
float S_GetPositionMusic(void); float S_GetMusicPosition(void);
// Fade in over milliseconds of time // Fade in over milliseconds of time
void S_FadeInMusic(int ms); void S_FadeInMusic(int ms);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment