summaryrefslogtreecommitdiffhomepage
path: root/test/dijkstra.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-10-09 04:10:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-10-09 04:12:11 +0200
commitc6d756cf39cbfdc7e35427a9d9a84fcc7432dafd (patch)
tree683700729212d6a69339e4af493fda703a879181 /test/dijkstra.cpp
parent4ca3d5a217f48461776ded658cfac002c9d13b53 (diff)
bb
Diffstat (limited to 'test/dijkstra.cpp')
-rw-r--r--test/dijkstra.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/dijkstra.cpp b/test/dijkstra.cpp
index ff88df71..d5ab6798 100644
--- a/test/dijkstra.cpp
+++ b/test/dijkstra.cpp
@@ -36,16 +36,16 @@ void test_app::test_dijkstra()
auto w = world();
auto a = astar();
-#if 1
constexpr auto wcx = 1, wcy = 1, wtx = 8, wty = 8, wox = 0, woy = 0;
constexpr auto max_dist = (uint32_t)(Vector2i(Math::abs(wcx)+1, Math::abs(wcy)+1)*TILE_MAX_DIM*iTILE_SIZE2).length();
- constexpr auto wch = chunk_coords_{chunk_coords_{wcx, wcy,0}};
+ constexpr auto wch = chunk_coords_{chunk_coords_{wcx, wcy, 0}};
constexpr auto wt = local_coords{wtx, wty};
constexpr auto wpos = global_coords{wch, wt};
- auto metal2 = tile_image_proto{loader.tile_atlas("metal2", {2, 2}, pass_mode::blocked), 0};
auto& ch = w[chunk_coords_{0,0,0}];
+#if 1
auto& ch2 = w[wch];
+ auto metal2 = tile_image_proto{loader.tile_atlas("metal2", {2, 2}, pass_mode::blocked), 0};
ch[{4, 4}].wall_west() = metal2;
ch[{4, 4}].wall_north() = metal2;
@@ -60,9 +60,9 @@ void test_app::test_dijkstra()
bench_run("Dijkstra", [&] {
a.Dijkstra(w,
- {{ 0, 0, 0}, {11, 9}}, // from
- {wpos, {wox, woy}}, // to
- 0, max_dist, {32,32}, // size
+ {{0,0,0}, {11,9}}, // from
+ {wpos, {wox, woy}}, // to
+ 0, max_dist, {32,32}, // size
1);
});
}