From 3dde8d805a7398ce17de40d97c6da4bae0f89d2e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 12 Dec 2021 00:30:44 +0100 Subject: [PATCH] ray:: rmap_get_by_id and rmap_get_id_of --- raycaster.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/raycaster.cpp b/raycaster.cpp index dc141505..5256bf2c 100644 --- a/raycaster.cpp +++ b/raycaster.cpp @@ -2415,6 +2415,14 @@ struct raycast_map { unique_ptr rmap; EX bool reset_rmap = false; +EX cell* rmap_get_by_id(int id) { + return rmap->lst[id]; + } + +EX int rmap_get_id_of(cell *c) { + return rmap->ids[c]; + } + EX void reset_raycaster() { our_raycaster = nullptr; reset_rmap = true;