1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-29 21:13:00 +00:00

Replace IF_KEY_EXISTS with a plain old function, not a macro.

This commit is contained in:
Arthur O'Dwyer
2021-07-18 17:02:52 -04:00
parent 8c6aba5f6f
commit 74052ef2bf
3 changed files with 15 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ EX bool hide_player() {
;
}
#define ADC(V,c) IF_KEY_EXISTS(it, current_display->all_drawn_copies, c) for(const shiftmatrix& V: it->second)
#define ADC(V,c) if (auto *it = hr::find_or_null(current_display->all_drawn_copies, c)) for(const shiftmatrix& V: it->second)
EX hookset<bool(int sym, int uni)> hooks_handleKey;
EX hookset<bool(cell *c, const shiftmatrix& V)> hooks_drawcell;