summaryrefslogtreecommitdiff
path: root/bonnie-bee/assets.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bonnie-bee/assets.scm')
-rw-r--r--bonnie-bee/assets.scm63
1 files changed, 36 insertions, 27 deletions
diff --git a/bonnie-bee/assets.scm b/bonnie-bee/assets.scm
index 3dc35cc..a6c2358 100644
--- a/bonnie-bee/assets.scm
+++ b/bonnie-bee/assets.scm
@@ -1,8 +1,8 @@
(define-module (bonnie-bee assets)
#:use-module (chickadee audio)
- #:use-module (chickadee graphics font)
+ #:use-module (chickadee graphics text)
#:use-module (chickadee graphics texture)
- #:use-module (starling asset)
+ #:use-module (catbird asset)
#:export (monogram-font
background-image
particle-image
@@ -33,28 +33,37 @@
(let ((prefix (or (getenv "BONNIE_BEE_DATADIR") (getcwd))))
(string-append prefix "/" file-name)))
-(define-asset monogram-font (load-font (scope-datadir "assets/fonts/monogram_extended.ttf") 12))
-(define-asset background-image (load-image (scope-datadir "assets/images/background.png")))
-(define-asset particle-image (load-image (scope-datadir "assets/images/particle.png")))
-(define-asset darkness-image (load-image (scope-datadir "assets/images/darkness.png")))
-(define-asset lightness-image (load-image (scope-datadir "assets/images/lightness.png")))
-(define-asset chickadee-image (load-image (scope-datadir "assets/images/chickadee.png")))
-(define-asset bee-atlas (load-tileset (scope-datadir "assets/images/bee.png") 32 32))
-(define-asset bullet-atlas (load-tileset (scope-datadir "assets/images/bullets.png") 16 16))
-(define-asset flower-atlas (load-tileset (scope-datadir "assets/images/flower.png") 64 64))
-(define-asset popcorn-atlas (load-tileset (scope-datadir "assets/images/popcorn.png") 32 32))
-(define-asset turret-atlas (load-tileset (scope-datadir "assets/images/turret.png") 64 64))
-(define-asset moth-atlas (load-tileset (scope-datadir "assets/images/moth.png") 64 64))
-(define-asset beetle-atlas (load-tileset (scope-datadir "assets/images/beetle.png") 128 64))
-(define-asset explosion-sound (load-audio (scope-datadir "assets/sounds/explosion.wav")))
-(define-asset pickup-sound (load-audio (scope-datadir "assets/sounds/pickup.wav")))
-(define-asset enemy-shoot-sound (load-audio (scope-datadir "assets/sounds/enemy-shoot.wav")))
-(define-asset enemy-hit-sound (load-audio (scope-datadir "assets/sounds/enemy-hit.wav")))
-(define-asset player-death-sound (load-audio (scope-datadir "assets/sounds/player-death.wav")))
-(define-asset player-shoot-sound (load-audio (scope-datadir "assets/sounds/player-shoot.wav")))
-(define-asset player-bomb-sound (load-audio (scope-datadir "assets/sounds/player-bomb.wav")))
-(define-asset pollen-release-sound (load-audio (scope-datadir "assets/sounds/pollen-release.wav")))
-(define-asset hehehe-sound (load-audio (scope-datadir "assets/sounds/hehehe.wav")))
-(define-asset alarm-sound (load-audio (scope-datadir "assets/sounds/alarm.wav")))
-(define-asset intro-music (load-audio (scope-datadir "assets/sounds/intro.ogg") #:mode 'stream))
-(define-asset main-music (load-audio (scope-datadir "assets/sounds/main.ogg") #:mode 'stream))
+(define (font-file file-name)
+ (scope-datadir (string-append "assets/fonts/" file-name)))
+
+(define (image-file file-name)
+ (scope-datadir (string-append "assets/images/" file-name)))
+
+(define (audio-file file-name)
+ (scope-datadir (string-append "assets/sounds/" file-name)))
+
+(define-font monogram-font (font-file "monogram_extended.ttf") 12)
+(define-image background-image (image-file "background.png"))
+(define-image particle-image (image-file "particle.png"))
+(define-image darkness-image (image-file "darkness.png"))
+(define-image lightness-image (image-file "lightness.png"))
+(define-image chickadee-image (image-file "chickadee.png"))
+(define-tileset bee-atlas (image-file "bee.png") 32 32)
+(define-tileset bullet-atlas (image-file "bullets.png") 16 16)
+(define-tileset flower-atlas (image-file "flower.png") 64 64)
+(define-tileset popcorn-atlas (image-file "popcorn.png") 32 32)
+(define-tileset turret-atlas (image-file "turret.png") 64 64)
+(define-tileset moth-atlas (image-file "moth.png") 64 64)
+(define-tileset beetle-atlas (image-file "beetle.png") 128 64)
+(define-audio explosion-sound (audio-file "explosion.wav"))
+(define-audio pickup-sound (audio-file "pickup.wav"))
+(define-audio enemy-shoot-sound (audio-file "enemy-shoot.wav"))
+(define-audio enemy-hit-sound (audio-file "enemy-hit.wav"))
+(define-audio player-death-sound (audio-file "player-death.wav"))
+(define-audio player-shoot-sound (audio-file "player-shoot.wav"))
+(define-audio player-bomb-sound (audio-file "player-bomb.wav"))
+(define-audio pollen-release-sound (audio-file "pollen-release.wav"))
+(define-audio hehehe-sound (audio-file "hehehe.wav"))
+(define-audio alarm-sound (audio-file "alarm.wav"))
+(define-audio intro-music (audio-file "intro.ogg") #:mode 'stream)
+(define-audio main-music (audio-file "main.ogg") #:mode 'stream)