summaryrefslogtreecommitdiff
path: root/bonnie-bee/bullet.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bonnie-bee/bullet.scm')
-rw-r--r--bonnie-bee/bullet.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/bonnie-bee/bullet.scm b/bonnie-bee/bullet.scm
index 4f79792..5342271 100644
--- a/bonnie-bee/bullet.scm
+++ b/bonnie-bee/bullet.scm
@@ -1,6 +1,7 @@
(define-module (bonnie-bee bullet)
#:use-module (bonnie-bee actor)
#:use-module (bonnie-bee assets)
+ #:use-module (bonnie-bee common)
#:use-module (chickadee data quadtree)
#:use-module (chickadee graphics sprite)
#:use-module (chickadee graphics texture)
@@ -10,9 +11,9 @@
#:use-module (chickadee utils)
#:use-module (oop goops)
#:use-module (srfi srfi-9)
- #:use-module (starling asset)
- #:use-module (starling node)
- #:use-module (starling node-2d)
+ #:use-module (catbird asset)
+ #:use-module (catbird node)
+ #:use-module (catbird node-2d)
#:export (<bullet-type>
player-bullet?
player-primary-bullet?
@@ -37,7 +38,7 @@
(hitbox #:getter hitbox #:init-keyword #:hitbox))
(define (bullet-texture bullet)
- (texture-atlas-ref (asset-ref bullet-atlas)
+ (texture-atlas-ref (artifact bullet-atlas)
(atlas-index (type bullet))))
(define player-primary-bullet
@@ -68,7 +69,7 @@
(define (make-bullet-sprite-batch)
(make-sprite-batch
(texture-parent
- (texture-atlas-ref (asset-ref bullet-atlas) 0))))
+ (texture-atlas-ref (artifact bullet-atlas) 0))))
(define (make-vector* size proc)
(let ((v (make-vector size)))
@@ -104,6 +105,12 @@
(set! (hitboxes bullets) (make-vector* %max-bullets make-null-rect))
(set! (regions bullets) (make-vector* %max-bullets make-null-rect)))
+(define-method (default-width (bullets <bullets>))
+ %game-width)
+
+(define-method (default-height (bullets <bullets>))
+ %game-height)
+
(define-method (clear-bullets (bullets <bullets>))
(set! (num-bullets bullets) 0))