diff options
author | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-01-12 14:43:14 +0000 |
---|---|---|
committer | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-01-12 14:43:14 +0000 |
commit | c91847d549cc1c30eb15504a15ea9a6d5aa48165 (patch) | |
tree | b978d575f08f5f87d3c21eb9a024164636d1918a /music.h | |
download | bullet-lab-remix-c91847d549cc1c30eb15504a15ea9a6d5aa48165.tar.xz |
Diffstat (limited to 'music.h')
-rw-r--r-- | music.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +//Chrisoft Bullet Lab Remix HGE +//In Game Music Implementations +//"Copyleft" Chrisoft 2013 +HEFFECT Mus; +HCHANNEL Muc; +int lpst,lped; +static const char* MUSIC_H_FN="music.h"; + +void Music_Init(char* file) +{ + Mus=hge->Effect_Load(file); +} +void Music_Play() +{ + Muc=hge->Effect_PlayEx(Mus,100,0,1.0,true); +} +void Music_Update() +{ + if (!lpst||!lped)return; + int Mucpos=hge->Channel_GetPos_BySample(Muc); + if (Mucpos>=lped)hge->Channel_SetPos_BySample(Muc,lpst); +} +void Music_Stop() +{ + hge->Channel_Stop(Muc); +} +void Music_Pause() +{ + hge->Channel_Pause(Muc); +} +void Music_Resume() +{ + hge->Channel_Resume(Muc); +} |