hooks in drawmarkers
This commit is contained in:
parent
2d5d5a1966
commit
621220cf13
|
@ -15,7 +15,7 @@ int detaillevel = 0;
|
||||||
|
|
||||||
hookset<bool(int sym, int uni)> *hooks_handleKey;
|
hookset<bool(int sym, int uni)> *hooks_handleKey;
|
||||||
hookset<bool(cell *c, const transmatrix& V)> *hooks_drawcell;
|
hookset<bool(cell *c, const transmatrix& V)> *hooks_drawcell;
|
||||||
purehookset hooks_frame;
|
purehookset hooks_frame, hooks_markers;
|
||||||
|
|
||||||
#define WOLNIEJ 1
|
#define WOLNIEJ 1
|
||||||
#define BTOFF 0x404040
|
#define BTOFF 0x404040
|
||||||
|
@ -4973,6 +4973,7 @@ void drawMarkers() {
|
||||||
|
|
||||||
if(!(cmode & sm::NORMAL)) return;
|
if(!(cmode & sm::NORMAL)) return;
|
||||||
|
|
||||||
|
callhooks(hooks_markers);
|
||||||
viewmat();
|
viewmat();
|
||||||
|
|
||||||
for(cell *c1: crush_now)
|
for(cell *c1: crush_now)
|
||||||
|
|
2
hyper.h
2
hyper.h
|
@ -2231,7 +2231,7 @@ template<class T, class U> int addHook(hookset<T>*& m, int prio, const U& hook)
|
||||||
return 0;
|
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) {
|
template<class T, class... U> void callhooks(hookset<T> *h, U... args) {
|
||||||
if(h) for(auto& p: *h) p.second(args...);
|
if(h) for(auto& p: *h) p.second(args...);
|
||||||
|
|
Loading…
Reference in New Issue