| 1555 | return 0; |
| 1556 | } |
| 1557 | static int GetSoundState(lua_State* L)LNOEXCEPT |
| 1558 | { |
| 1559 | const char* s = luaL_checkstring(L, 1); |
| 1560 | ResSound* p = LRES.FindSound(s); |
| 1561 | if (!p) |
| 1562 | return luaL_error(L, "sound '%s' not found.", s); |
| 1563 | if (p->IsPlaying()) |
| 1564 | lua_pushstring(L, "playing"); |
| 1565 | else if (p->IsStopped()) |
| 1566 | lua_pushstring(L, "stopped"); |
| 1567 | else |
| 1568 | lua_pushstring(L, "paused"); |
| 1569 | return 1; |
| 1570 | } |
| 1571 | static int PlayMusic(lua_State* L)LNOEXCEPT |
| 1572 | { |
| 1573 | const char* s = luaL_checkstring(L, 1); |