diff options
Diffstat (limited to 'bonnie-bee/assets.scm')
-rw-r--r-- | bonnie-bee/assets.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bonnie-bee/assets.scm b/bonnie-bee/assets.scm new file mode 100644 index 0000000..3c71bcc --- /dev/null +++ b/bonnie-bee/assets.scm @@ -0,0 +1,16 @@ +(define-module (bonnie-bee assets) + #:use-module (chickadee audio) + #:use-module (chickadee graphics font) + #:use-module (chickadee graphics texture) + #:use-module (starling asset) + #:export (chonkly-font + bee-atlas + bullet-atlas)) + +(define (scope-datadir file-name) + (let ((prefix (or (getenv "BONNIE_BEE_DATADIR") (getcwd)))) + (string-append prefix "/" file-name))) + +(define-asset chonkly-font (load-font (scope-datadir "assets/fonts/Chonkly.otf") 16)) +(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)) |