diff --git a/assets/items.json b/assets/items.json index 85c74ff..109fab9 100644 --- a/assets/items.json +++ b/assets/items.json @@ -38,7 +38,7 @@ "foreground": [24, 205, 210], "background": [24, 205, 210] }, - {"_type": "LightSource", "strength": 80, "radius": 2.8}, + {"_type": "LightSource", "strength": 50, "radius": 2.8}, {"_type": "Sprite", "name": "torch_pillar", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sound", "attack": "pickup", "death": "blank"} ] diff --git a/assets/tiles.json b/assets/tiles.json index 0e5cbe0..043e848 100644 --- a/assets/tiles.json +++ b/assets/tiles.json @@ -11,14 +11,14 @@ "foreground": [230, 20, 30], "background": [230, 20, 120], "collision": true, - "display": 37 + "display": 9608 }, "WALL_PLAIN": { "texture": "assets/wall_texture_test-256.png", "foreground": [230, 20, 30], "background": [230, 20, 120], "collision": true, - "display": 9608 + "display": 37 }, "WALL_VINES": { "texture": "assets/wall_with_vines-256.png", diff --git a/maze.cpp b/maze.cpp index c6ab7b9..035b395 100644 --- a/maze.cpp +++ b/maze.cpp @@ -116,15 +116,13 @@ namespace maze { } } - void Builder::hunt_and_kill() { + void Builder::hunt_and_kill(Point on) { for(auto& room : $rooms) { for(matrix::box it{$walls, room.x, room.y, room.width}; it.next();) { $walls[it.y][it.x] = 0; } } - Point on{1,1}; - while(!complete($walls)) { auto n = neighbors($walls, on); if(n.size() == 0) { diff --git a/maze.hpp b/maze.hpp index 48e98df..0751177 100644 --- a/maze.hpp +++ b/maze.hpp @@ -16,7 +16,7 @@ namespace maze { init(); } - void hunt_and_kill(); + void hunt_and_kill(Point on={1,1}); void init(); void randomize_rooms(); diff --git a/worldbuilder.cpp b/worldbuilder.cpp index 5891295..fbc0845 100644 --- a/worldbuilder.cpp +++ b/worldbuilder.cpp @@ -10,10 +10,23 @@ using namespace fmt; using namespace components; +void big_donut() { + // maze.inner_donut(12, 3); + // $map.invert_space(); + // maze.hunt_and_kill({11,11}); + + // maze.init(); + // maze.inner_donut(12, 3); + // $map.invert_space(); + // maze.hunt_and_kill({11,11}); +} + void WorldBuilder::generate_map() { maze::Builder maze($map); maze.hunt_and_kill(); + maze.init(); + maze.randomize_rooms(); if($map.width() > 20) {