From 1ce62a60d6da7588a0bf26329fd2cc831241fc19 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 28 Oct 2023 22:08:54 -0400 Subject: Boss placeholder, pre-boss WARNING message. --- game.scm | 26 +++++++++++++++++++++++--- images/boss.ase | Bin 899 -> 2032 bytes images/boss.png | Bin 899 -> 2354 bytes level.tmx | 3 ++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/game.scm b/game.scm index 7a6b2b8..f5ed7b4 100644 --- a/game.scm +++ b/game.scm @@ -737,6 +737,7 @@ (duration (or (assq-ref properties 'duration) 0))) (when speed (change-scroll-speed speed duration)))) + ('warning (do-warning)) (_ #t))) (define max-scroll (- (* (level-height level) tile-height) game-height)) (define (level-update! level) @@ -1013,9 +1014,9 @@ (define (spawn-boss x y) (spawn-enemy - (make-enemy 'boss 300 (vec2 x y) (vec2 100.0 40.0) - (vec2 0.0 0.0) #f 1000000 - #(0.0 0.0 0.0 0.0) image:boss (vec2 120.0 80.0)))) + (make-enemy 'boss 300 (vec2 x y) (vec2 144.0 50.0) + (vec2 0.0 0.0) #f 500000 + #(0.0 0.0 0.0 0.0) image:boss (vec2 144.0 96.0)))) ;; Player state: (define player-position (vec2 (/ game-width 2.0) (- game-height 12.0))) @@ -1271,6 +1272,18 @@ (set! *canvas-width* (* game-width *canvas-scale*)) (set! *canvas-height* (* game-height *canvas-scale*)))) + ;; Boss warning message state + (define *show-warning?* #f) + (define (do-warning) + (run-script + (lambda () + (do ((i 0 (+ i 1))) + ((= i 10)) + (set! *show-warning?* #t) + (wait 15) + (set! *show-warning?* #f) + (wait 15))))) + (define (clear-screen) (clear-rect context 0.0 0.0 *canvas-width* *canvas-height*)) @@ -1323,6 +1336,13 @@ (draw-enemies enemies time) (draw-player) (draw-enemy-bullets) + (when *show-warning?* + (set-fill-color! context "#d27d2c") + (set-text-align! context "center") + (set-font! context "bold 72px monogram") + (fill-text context "WARNING" + (/ game-width 2.0) + (/ game-height 2.0))) (draw-hud)) (define (draw-pause time) diff --git a/images/boss.ase b/images/boss.ase index 2cd8f96..70b2ee5 100644 Binary files a/images/boss.ase and b/images/boss.ase differ diff --git a/images/boss.png b/images/boss.png index 17c2b22..0b1ab82 100644 Binary files a/images/boss.png and b/images/boss.png differ diff --git a/level.tmx b/level.tmx index 41091ac..f16c319 100644 --- a/level.tmx +++ b/level.tmx @@ -1,5 +1,5 @@ - + @@ -1227,5 +1227,6 @@ + -- cgit v1.2.3