1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

hooks in drawmarkers

This commit is contained in:
Zeno Rogue 2018-09-06 22:34:35 +02:00
parent 2d5d5a1966
commit 621220cf13
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@ int detaillevel = 0;
hookset<bool(int sym, int uni)> *hooks_handleKey;
hookset<bool(cell *c, const transmatrix& V)> *hooks_drawcell;
purehookset hooks_frame;
purehookset hooks_frame, hooks_markers;
#define WOLNIEJ 1
#define BTOFF 0x404040
@ -4973,6 +4973,7 @@ void drawMarkers() {
if(!(cmode & sm::NORMAL)) return;
callhooks(hooks_markers);
viewmat();
for(cell *c1: crush_now)

View File

@ -2231,7 +2231,7 @@ template<class T, class U> int addHook(hookset<T>*& m, int prio, const U& hook)
return 0;
}
extern purehookset hooks_frame, hooks_stats, clearmemory, hooks_config, hooks_tests, hooks_removecells, hooks_initgame, hooks_calcparam, hooks_mainmenu, hooks_startmenu;
extern purehookset hooks_frame, hooks_stats, clearmemory, hooks_config, hooks_tests, hooks_removecells, hooks_initgame, hooks_calcparam, hooks_mainmenu, hooks_startmenu, hooks_markers;
template<class T, class... U> void callhooks(hookset<T> *h, U... args) {
if(h) for(auto& p: *h) p.second(args...);