MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / GetMusicState

Method GetMusicState

LuaSTGPlus/LuaWrapper.cpp:1607–1620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605 return 0;
1606 }
1607 static int GetMusicState(lua_State* L)LNOEXCEPT
1608 {
1609 const char* s = luaL_checkstring(L, 1);
1610 ResMusic* p = LRES.FindMusic(s);
1611 if (!p)
1612 return luaL_error(L, "music '%s' not found.", s);
1613 if (p->IsPlaying())
1614 lua_pushstring(L, "playing");
1615 else if (p->IsStopped())
1616 lua_pushstring(L, "stopped");
1617 else
1618 lua_pushstring(L, "paused");
1619 return 1;
1620 }
1621 static int UpdateSound(lua_State* L)LNOEXCEPT
1622 {
1623 // 否决的方法

Callers

nothing calls this directly

Calls 3

FindMusicMethod · 0.80
IsPlayingMethod · 0.45
IsStoppedMethod · 0.45

Tested by

no test coverage detected