From 6696a0b5fcb1b17895285d80d9636defb2df3f9d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 10 Apr 2024 14:49:03 -0400 Subject: Sloppily refactor into modules. --- compile-map.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'compile-map.scm') diff --git a/compile-map.scm b/compile-map.scm index 486145f..fef30a0 100644 --- a/compile-map.scm +++ b/compile-map.scm @@ -559,8 +559,12 @@ the default ORIENTATION value of 'orthogonal' is supported." (iota (tile-map-height tile-map)))))) (pretty-print - `(make-level - ,(tile-map-height tile-map) - ,(compile-tile-layer (tile-map-layer-ref tile-map "foreground")) - ,(compile-collision-layer (tile-map-layer-ref tile-map "collision")) - ,(compile-object-layer (tile-map-layer-ref tile-map "objects")))) + `(library (strigoform level-1) + (export load-level-1) + (import (scheme base) + (strigoform level)) + (define (load-level-1) + (make-level ,(tile-map-height tile-map) + ,(compile-tile-layer (tile-map-layer-ref tile-map "foreground")) + ,(compile-collision-layer (tile-map-layer-ref tile-map "collision")) + ,(compile-object-layer (tile-map-layer-ref tile-map "objects")))))) -- cgit v1.2.3