From 8255712c62cc0da844233995e04b1fa2cada5564 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 6 Dec 2022 08:05:30 -0500 Subject: Add more previously uncommitted changes that I left hanging around. --- apple-town-fair/game.scm | 21 ++++++++++----------- apple-town-fair/place.scm | 9 +++++---- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'apple-town-fair') diff --git a/apple-town-fair/game.scm b/apple-town-fair/game.scm index 5ede549..71ee13a 100644 --- a/apple-town-fair/game.scm +++ b/apple-town-fair/game.scm @@ -490,29 +490,28 @@ August 1675") (define-class ()) (define-method (advance-clock-once (mode )) - (advance-clock (parent mode) 1)) + (advance-clock ($) 1)) (define-method (quit-game (mode )) (exit-catbird)) (define-method (up-selection (mode )) - (up-selection (& (parent mode) menu) 1)) + (up-selection ($ menu) 1)) (define-method (down-selection (mode )) - (down-selection (& (parent mode) menu) 1)) + (down-selection ($ menu) 1)) (define-method (confirm-selection (mode )) - (let* ((scene (parent mode)) - (place (& scene place)) - (chosen (selection (& scene menu))) + (let* ((place ($ place)) + (chosen (selection ($ menu))) (action (find (lambda (a) (string=? (name a) chosen)) (actions place)))) - (run-script scene - (hide (& scene menu)) - (perform action scene) - (hide (& scene dialog)) - (show (& scene menu))))) + (scene-script + (hide ($ menu)) + (perform action) + (hide ($ dialog)) + (show ($ menu))))) (bind-input (key-press 'r) reset-game) (bind-input (key-press 'escape) quit-game) diff --git a/apple-town-fair/place.scm b/apple-town-fair/place.scm index b96130d..01750da 100644 --- a/apple-town-fair/place.scm +++ b/apple-town-fair/place.scm @@ -17,6 +17,7 @@ #:use-module (catbird config) #:use-module (catbird node) #:use-module (catbird node-2d) + #:use-module (catbird scene) #:use-module (oop goops) #:export ( condition @@ -34,11 +35,11 @@ #:init-form (const #t)) (exec #:accessor exec #:init-keyword #:exec)) -(define-method (performable? (action ) scene) - ((condition action) scene)) +(define-method (performable? (action )) + ((condition action) (current-scene))) -(define-method (perform (action ) scene) - ((exec action) scene)) +(define-method (perform (action )) + ((exec action) (current-scene))) (define-class () (title #:accessor title #:init-keyword #:title #:init-value "Unknown") -- cgit v1.2.3