| 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 | // 否决的方法 |