summaryrefslogtreecommitdiff
path: root/bonnie-bee/assets.scm
blob: 5337215b2faac51dc8040b73edc9cf4906fe7784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(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
            flower-image))

(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))
(define-asset flower-image (load-image (scope-datadir "assets/images/flower.png")))