ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 2c 00 00 00 c8 04 03 00 00 00 a0 f1 c1 | .PNG........IHDR...,............ |
0020 | 66 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e2 | f....pHYs.................tIME.. |
0040 | 05 07 16 32 36 f8 0e b9 ca 00 00 00 0f 50 4c 54 45 00 00 00 ff 00 00 ff ff ff ff ff ff ff 00 00 | ...26........PLTE............... |
0060 | ca 18 88 29 00 00 00 04 74 52 4e 53 00 00 00 72 0d 98 76 8a 00 00 00 01 62 4b 47 44 02 66 0b 7c | ...)....tRNS...r..v.....bKGD.f.| |
0080 | 64 00 00 03 32 49 44 41 54 78 da ed dd 51 8e 9b 30 14 85 e1 c8 cd 02 ea 59 01 ba ca 02 aa e9 06 | d...2IDATx...Q..0.......Y....... |
00a0 | 68 e4 fd af 69 1e c6 18 1b 0c b9 8e 8d 8f db 1e 5e 89 c4 97 5f c1 01 e3 28 b7 db 50 9b 91 e9 36 | h...i...........^..._...(..P...6 |
00c0 | e0 46 16 59 64 91 45 d6 05 ac 1f bf 87 d9 3e 45 44 84 ac 7f 88 f5 6b 8c f3 2a 85 90 45 16 59 64 | .F.Yd.E.......>ED.....k..*..E.Yd |
00e0 | 91 45 16 59 64 91 45 16 59 64 91 45 16 59 64 91 45 16 59 64 65 36 e7 dc ac 67 39 e7 5c 2f 96 53 | .E.Yd.E.Yd.E.Yd.E.Yde6...g9.\/.S |
0100 | b3 ee 5d 59 b3 96 e5 ba b2 9c 92 f5 e8 cc 9a 75 2c d7 99 a5 3a 94 79 74 67 69 72 19 fd 4b eb 59 | ..]Y...........u,...:.ytgir..K.Y |
0120 | 77 75 82 7b 69 ac aa e1 54 dd a0 38 56 15 4b 1b a1 3c 56 dd 97 8f b2 42 79 ac 3a 96 2e c3 1b b1 | wu.{i...T..8V.K..<V....By.:..... |
0140 | 2a bf aa 55 1d de 88 55 c9 d2 84 78 27 56 ed 85 8d a2 c4 3b b1 6a 59 af 53 94 c7 32 32 55 5f 06 | *..U...U...x'V.....;.jY.S..22U_. |
0160 | be 6c 51 1e ab 05 eb 55 0c bf 7f ea cc 7a 55 e3 7b f7 b3 3b eb 3c 97 df 2b dd 59 e7 b9 7c 2c 00 | .lQ....U.....zU.{..;.<..+.Y..|,. |
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "l_sound.h"
#include "l_internal.h"
#include "common/c_content.h"
#include "guiEngine.h"
int ModApiSound::l_sound_play(lua_State *L)
{
SimpleSoundSpec spec;
read_soundspec(L, 1, spec);
bool looped = lua_toboolean(L, 2);
s32 handle = getGuiEngine(L)->playSound(spec, looped);
lua_pushinteger(L, handle);
return 1;
}
int ModApiSound::l_sound_stop(lua_State *L)
{
u32 handle = luaL_checkinteger(L, 1);
getGuiEngine(L)->stopSound(handle);
return 1;
}
void ModApiSound::Initialize(lua_State *L, int top)
{
API_FCT(sound_play);
API_FCT(sound_stop);
}
|