aboutsummaryrefslogtreecommitdiff
path: root/music.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-01-12 14:43:14 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-01-12 14:43:14 +0000
commitc91847d549cc1c30eb15504a15ea9a6d5aa48165 (patch)
treeb978d575f08f5f87d3c21eb9a024164636d1918a /music.h
downloadbullet-lab-remix-c91847d549cc1c30eb15504a15ea9a6d5aa48165.tar.xz
Diffstat (limited to 'music.h')
-rw-r--r--music.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/music.h b/music.h
new file mode 100644
index 0000000..79434ff
--- /dev/null
+++ b/music.h
@@ -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);
+}