From 255fbd76234e0411a9e95b7b80a28bf79c8dfff1 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 26 May 2023 07:37:38 -0400 Subject: First commit! --- super-bloom/main.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 super-bloom/main.scm (limited to 'super-bloom') diff --git a/super-bloom/main.scm b/super-bloom/main.scm new file mode 100644 index 0000000..2f49e9a --- /dev/null +++ b/super-bloom/main.scm @@ -0,0 +1,50 @@ +;;; 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 main) + #:use-module (catbird) + #:use-module (catbird asset) + #:use-module (catbird camera) + #:use-module (catbird kernel) + #:use-module (catbird node) + #:use-module (catbird node-2d) + #:use-module (catbird region) + #:use-module (catbird scene) + #:use-module (chickadee) + #:use-module (chickadee math vector) + #:use-module (chickadee graphics sprite) + #:use-module (chickadee graphics texture) + #:use-module (oop goops) + #:export (launch-game)) + +(define %default-width 1366) +(define %default-height 768) + +(define-asset (chickadee-texture (file "assets/images/chickadee.png")) + (load-image file)) + +(define (init) + (let ((region (create-full-region #:name 'main)) + (scene (make #:name 'super-bloom))) + (replace-scene region scene) + (set-camera region (make )) + (attach-to scene (make + #:name 'chickadee + #:texture chickadee-texture)) + (center-in-parent (& scene chickadee)))) + +(define (launch-game) + (run-catbird init + #:width %default-width + #:height %default-height)) -- cgit v1.2.3