;;; Copyright 2023 David Thompson ;;; ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed to in writing, software ;;; distributed under the License is distributed on an "AS IS" BASIS, ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;;; See the License for the specific language governing permissions and ;;; limitations under the License. (define-module (super-bloom splash) #:use-module (catbird) #:use-module (catbird asset) #:use-module (catbird camera) #:use-module (catbird kernel) #:use-module (catbird mixins) #:use-module (catbird mode) #:use-module (catbird node) #:use-module (catbird node-2d) #:use-module (catbird region) #:use-module (catbird scene) #:use-module (chickadee data quadtree) #:use-module (chickadee graphics color) #:use-module (chickadee graphics path) #:use-module (chickadee graphics texture) #:use-module (chickadee math rect) #:use-module (chickadee math vector) #:use-module (chickadee scripting) #:use-module (oop goops) #:use-module (super-bloom common) #:use-module (super-bloom game) #:export ()) (define-asset (chickadee-texture (file (scope-datadir "images/chickadee.png"))) (load-image file)) (define-class ()) (define-method (go-to-game (mode )) (let ((region (find-region-by-name 'main)) (scene (make #:name 'super-bloom))) (replace-scene region scene) (replace-major-mode scene (make )))) (define-method (on-enter (mode )) (define (full-rect color) (with-style ((fill-color color)) (fill (rectangle (vec2 0.0 0.0) %game-width:float %game-height:float)))) (let ((scene (parent mode)) (bg (make #:name 'background #:rank 0 #:painter (full-rect white))) (fader (make #:name 'fader #:rank 999 #:width %game-width:float #:height %game-height:float)) (sprite (make #:name 'sprite #:rank 1 #:texture chickadee-texture #:origin (vec2 8.0 8.0) #:scale 0.5)) (label1 (make