1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-30 03:50:34 +00:00

ray:: rmap_get_by_id and rmap_get_id_of

This commit is contained in:
Zeno Rogue 2021-12-12 00:30:44 +01:00
parent 00c71c5212
commit 3dde8d805a

View File

@ -2415,6 +2415,14 @@ struct raycast_map {
unique_ptr<raycast_map> rmap; unique_ptr<raycast_map> rmap;
EX bool reset_rmap = false; 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() { EX void reset_raycaster() {
our_raycaster = nullptr; our_raycaster = nullptr;
reset_rmap = true; reset_rmap = true;