Skip to content

Commit 50eeff3

Browse files
committed
Added some music
1 parent 18d8b4c commit 50eeff3

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

README.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ To run manually:
4444
+ [[https://mounirtohami.itch.io/pixel-art-gui-elements][Pixel Art GUI Elements by Mounir Tohami]], [[https://creativecommons.org/publicdomain/zero/1.0][CC0]]
4545
+ [[https://howyoudoing.itch.io/bookxel][Bookxel font by HowYouDoing]]
4646
+ [[https://opengameart.org/content/male-gotcha][Male gotcha sound by TaniCorn]], [[https://creativecommons.org/licenses/by/4.0][CC-BY 4.0]]
47+
+ [[https://makotohiramatsu.itch.io/lost][Soundscape and Ambient Music Pack: LOST by Makoto Hiramatsu]], [[https://creativecommons.org/licenses/by/4.0][CC-BY 4.0]]
4748

4849
** Copyright
4950

Resources/sounds/alone.ogg

1.32 MB
Binary file not shown.

src/main.lisp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
(setf *player-entity* (player-entity *storage* 1)
3131
*deathp* nil
3232
*restart* nil)
33+
(let ((music (ecs:make-entity *storage*)))
34+
(add-sound *storage* music :alone :oncep nil)
35+
(with-sound () *storage* music
36+
(setf gain 0.05)))
3337
;; HACK: prime system bitmaps
3438
(ecs:run-systems *storage* :dt 0d0))
3539

src/sounds.lisp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
(when playing
2323
(incf sound-play-time dt)
2424
(when (> sound-play-time sound-length)
25-
(setf sound-play-time 0d0
26-
sound-playing 0
27-
playing 0)))
25+
(setf sound-play-time 0d0)
26+
(unless (eq (al:get-sample-instance-playmode sound-sample-instance)
27+
:loop)
28+
(setf sound-playing 0
29+
playing nil))))
2830
(unless (eq playing (al:get-sample-instance-playing sound-sample-instance))
2931
(al:set-sample-instance-playing sound-sample-instance playing))
3032
(when playing

thoughtbound.asd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defsystem "thoughtbound"
2-
:version "0.0.1"
2+
:version "0.0.2"
33
:author "Andrew Kravchuk"
44
:license "MIT"
55
:depends-on (#:alexandria

0 commit comments

Comments
 (0)