From 9ace1c97a1c8726f8b5d31805d61f359318361e9 Mon Sep 17 00:00:00 2001 From: Hans Kokx Date: Sun, 13 Sep 2026 17:24:26 +0200 Subject: [PATCH] Add floor and ceiling map data Signed-off-by: Hans Kokx --- lib/main.dart | 26 ++++++++++++++++++++++++++ raycaster.c | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 6fcf8a1..103e5d3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -945,6 +945,32 @@ abstract class GameMap { ]; // dart format on + // dart format off + static const List floor = [ + 0,0,0,0,0,0,0,0, + 0,0,0,0,1,1,0,0, + 0,0,0,0,2,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,1,1,1,1,0,0,0, + 0,0,0,0,0,0,0,0, + ]; + // dart format on + + // dart format off + static const List ceiling = [ + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,0, + 0,1,3,1,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + ]; + // dart format on + static const Size dimensions = Size(8, 8); static const int size = 32; } diff --git a/raycaster.c b/raycaster.c index 4ee789b..a3e1dcd 100644 --- a/raycaster.c +++ b/raycaster.c @@ -203,7 +203,7 @@ int mapF[]= //floors 0,0,2,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,1,1,1,1,0,0,0, - 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, }; int mapC[]= //ceiling @@ -215,7 +215,7 @@ int mapC[]= //ceiling 0,1,3,1,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, }; // clang-format on