summaryrefslogtreecommitdiff
path: root/compile-map.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2024-04-10 14:49:03 -0400
committerDavid Thompson <dthompson2@worcester.edu>2024-04-10 14:49:03 -0400
commit6696a0b5fcb1b17895285d80d9636defb2df3f9d (patch)
tree2cce306afcd7776925f725a382ae1a834513636c /compile-map.scm
parent20b4e7c566cd268f8fafd3e2d3846513e31949e7 (diff)
Sloppily refactor into modules.
Diffstat (limited to 'compile-map.scm')
-rw-r--r--compile-map.scm14
1 files changed, 9 insertions, 5 deletions
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"))))))