summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--audio/music.oggbin0 -> 1011954 bytes
-rw-r--r--audio/music.xmbin0 -> 702129 bytes
-rw-r--r--game.scm21
4 files changed, 11 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index a1faad0..80e78b8 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ level.scm: level.tmx compile-map.scm
bundle: game.wasm
rm strigoform.zip || true
- zip strigoform.zip -r audio/*.wav images/*.png fonts/ js-runtime/ boot.js game.css game.wasm index.html
+ zip strigoform.zip -r audio/*.{wav,ogg} images/*.png fonts/ js-runtime/ boot.js game.css game.wasm index.html
serve:
guile web-server
diff --git a/audio/music.ogg b/audio/music.ogg
new file mode 100644
index 0000000..32ec3c4
--- /dev/null
+++ b/audio/music.ogg
Binary files differ
diff --git a/audio/music.xm b/audio/music.xm
new file mode 100644
index 0000000..1eeb0b0
--- /dev/null
+++ b/audio/music.xm
Binary files differ
diff --git a/game.scm b/game.scm
index 13e5bc8..97da850 100644
--- a/game.scm
+++ b/game.scm
@@ -351,18 +351,16 @@
(define sound:player-death (load-sound-effect "audio/player-death.wav"))
(define sound:enemy-shoot (load-sound-effect "audio/enemy-shoot.wav"))
(define sound:bullet-hit (load-sound-effect "audio/bullet-hit.wav"))
- ;; (define music (load-audio "audio/music.wav"))
- ;; (set-audio-loop! music 1)
+ (define music (load-audio "audio/music.ogg"))
+ (set-audio-loop! music 1)
+ (set-audio-volume! music 0.5)
(define (music-play)
- ;; (audio-play music)
- #t)
+ (audio-play music))
(define (music-pause)
- ;; (audio-pause music)
- #t)
+ (audio-pause music))
(define (music-stop)
- ;; (audio-pause music)
- ;; (audio-seek music 0.0)
- #t)
+ (audio-pause music)
+ (audio-seek music 0.0))
(define *debug?* #f)
@@ -1367,7 +1365,7 @@
(wait 180)
(phase-1))
(spawn-enemy
- (make-enemy 'boss 1500 (vec2 x (- y 24.0)) (vec2 144.0 50.0)
+ (make-enemy 'boss 1500 (vec2 x (- y 32.0)) (vec2 144.0 50.0)
(vec2 0.0 0.0) script 500000
#(0.0 144.0 288.0 432.0) image:boss (vec2 144.0 96.0))))
@@ -1570,10 +1568,11 @@
(do-splash)))))
(define (do-game-over)
(scheduler-reset! *countdown-scheduler*)
- (music-stop)
+ (music-pause)
(set! *game-state* 'game-over)
(do-countdown))
(define (do-continue)
+ (music-play)
(player-position-reset!)
(set! *player-lives* 3)
(set! *player-1cc?* #f)