From d2ca3fe8b59c93baf9f5c29b14710e5d1eed2e7a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 28 Oct 2022 08:00:48 -0400 Subject: First commit! --- apple-town-fair/splash.scm | 95 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 apple-town-fair/splash.scm (limited to 'apple-town-fair/splash.scm') diff --git a/apple-town-fair/splash.scm b/apple-town-fair/splash.scm new file mode 100644 index 0000000..8a1b0e3 --- /dev/null +++ b/apple-town-fair/splash.scm @@ -0,0 +1,95 @@ +;;; Copyright © 2022 David Thompson +;;; +;;; This program is free software: you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see +;;; . +(define-module (apple-town-fair splash) + #:use-module (apple-town-fair assets) + #:use-module (apple-town-fair config) + #:use-module (apple-town-fair common) + #:use-module (chickadee graphics color) + #:use-module (chickadee graphics path) + #:use-module (chickadee math vector) + #:use-module (chickadee scripting) + #:use-module (oop goops) + #:use-module (catbird) + #:use-module (catbird camera) + #:use-module (catbird kernel) + #:use-module (catbird mode) + #:use-module (catbird node) + #:use-module (catbird node-2d) + #:use-module (catbird region) + #:use-module (catbird scene) + #:export (launch-game)) + +(define-class ()) + +(define %text-color (rgb #x181425)) +(define %background-color white) + +(define-method (on-enter (mode )) + (let ((scene (parent mode))) + (attach-to scene + (make + #:painter + (with-style ((fill-color %background-color)) + (fill + (rectangle (vec2 0.0 0.0) %game-width %game-height)))) + (make + #:texture chickadee-image + #:position (vec2 (/ %game-width 2.0) + (/ %game-height 2.0)) + #:origin (vec2 8.0 8.0) + #:scale (vec2 4.0 4.0)) + (make