diff options
| -rw-r--r-- | TODO.org | 16 | ||||
| -rw-r--r-- | src/game.scm | 20 |
2 files changed, 14 insertions, 22 deletions
@@ -3,7 +3,7 @@ * Milestone 1: A World That Moves ** Map & Rendering *** DONE Update map parser to read layer information. :graphics: -*** TODO Render multiple tile layers (simple implementation). :graphics: +*** DONE Render multiple tile layers (simple implementation). :graphics: ** Input & Player Basics *** TODO Build a simple input-state map (keys pressed/held). :input: @@ -14,11 +14,9 @@ *** TODO Implement a basic `scene` that holds a list of entities. :scene: *** TODO Write `scene-add-entity!` and `scene-foreach-entity`. :scene: ---- - * Milestone 2: Seeing & Controlling Things ** Sprite Rendering -*** TODO Load a texture and draw a static sprite. :graphics:sprites: +*** DONE Load a texture and draw a static sprite. :graphics:sprites: *** TODO Add sprite reference to player entity plist. :entities: ** Input → Actions @@ -28,8 +26,6 @@ ** Entity Utilities *** TODO Write plist helpers for entity data (ref, set!, update!). :entities:plist: ---- - * Milestone 3: A Moving Camera, Gravity & Scene Loading ** Camera *** TODO Implement a basic camera struct with x/y. :graphics:camera: @@ -43,8 +39,6 @@ *** TODO Make a function to load a scene from a tilemap name + prefab list. :scene_management: *** TODO Add a per-entity :init function for initialization. :entities: ---- - * Milestone 4: Collisions, Prefabs & Simple Enemies ** Collision *** TODO AABB overlap function. :physics:collision: @@ -58,8 +52,6 @@ *** TODO Add simple FSM fields (:state, :next-state) to an enemy entity. :ai: *** TODO Implement “idle → patrol” logic in enemy update. :ai: ---- - * Milestone 5: Animated Tiles, Entity Collisions & More Player Feel ** Graphics Polish *** TODO Add tile animation metadata to tileset. :graphics:animation: @@ -73,8 +65,6 @@ *** TODO Add :speed and :jump-strength fields to player plist. :entities: *** TODO Make movement feel nicer by tweaking acceleration/velocity. :physics: ---- - * Milestone 6: Audio, UI & Better Enemy Logic ** Audio *** TODO Bind essential SDL2_mixer functions via FFI. :audio: @@ -89,8 +79,6 @@ *** TODO Implement “patrol direction switch” when hitting tile edges. :ai: *** TODO Let enemy react to player proximity (simple check). :ai: ---- - * Milestone 7: Pathfinding, Better Scenes, More Polish ** Pathfinding *** TODO Implement A* node structure and open/closed sets. :ai:pathfinding: diff --git a/src/game.scm b/src/game.scm index 4206533..bdabbf1 100644 --- a/src/game.scm +++ b/src/game.scm @@ -71,18 +71,22 @@ (define (draw-tilemap-rows draw-fn rows row-num) (unless (null? rows) - (for-each (lambda (tile-id col-num) (draw-fn tile-id row-num col-num)) - (car rows) - (iota (length (car rows)))) + (for-each + (cut draw-fn <> row-num <>) + (car rows) + (iota (length (car rows)))) (draw-tilemap-rows draw-fn (cdr rows) (+ row-num 1)))) (define (draw-tilemap renderer tilemap) - (let ((map-layer (layer-map (car (tilemap-layers tilemap)))) + (let ((map-layers (tilemap-layers tilemap)) (tileset (tilemap-tileset tilemap))) - (draw-tilemap-rows - (lambda (tile-id row-num col-num) (draw-tile renderer tileset tile-id row-num col-num)) - map-layer - 0))) + (for-each + (lambda (layer) + (draw-tilemap-rows + (cut draw-tile renderer tileset <> <> <>) + (layer-map layer) + 0)) + map-layers))) (define (draw-objects renderer tilemap) (let ((objects (tilemap-objects tilemap)) |
