mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
added hooks_initgame, hooks_drawcell allows replacement
This commit is contained in:
parent
5cd3ccabb8
commit
aafe464bc6
@ -12,7 +12,7 @@ bool mmspatial, mmhigh, mmmon, mmitem;
|
||||
int detaillevel = 0;
|
||||
|
||||
hookset<bool(int sym, int uni)> *hooks_handleKey;
|
||||
hookset<void(cell *c, const transmatrix& V)> *hooks_drawcell;
|
||||
hookset<bool(cell *c, const transmatrix& V)> *hooks_drawcell;
|
||||
purehookset hooks_frame;
|
||||
|
||||
#define WOLNIEJ 1
|
||||
@ -3447,7 +3447,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
||||
|
||||
// if(behindsphere(V)) return;
|
||||
|
||||
callhooks(hooks_drawcell, c, V);
|
||||
if(callhandlers(0, hooks_drawcell, c, V)) return;
|
||||
|
||||
ld dist0 = hdist0(tC0(V)) - 1e-6;
|
||||
if(dist0 < geom3::highdetail) detaillevel = 2;
|
||||
|
2
hyper.h
2
hyper.h
@ -1938,7 +1938,7 @@ template<class T, class V, class... U> V callhandlers(V zero, hookset<T> *h, U&.
|
||||
}
|
||||
|
||||
extern hookset<bool(int sym, int uni)> *hooks_handleKey;
|
||||
extern hookset<void(cell *c, const transmatrix& V)> *hooks_drawcell;
|
||||
extern hookset<bool(cell *c, const transmatrix& V)> *hooks_drawcell;
|
||||
extern hookset<bool(int argc, char** argv)> *hooks_main;
|
||||
extern hookset<int()> *hooks_args;
|
||||
extern hookset<eLand(eLand)> *hooks_nextland;
|
||||
|
@ -85,10 +85,13 @@ void welcomeMessage() {
|
||||
int trailer_cash0 = 5;
|
||||
int trailer_cash1 = 15;
|
||||
bool trailer_safety = true;
|
||||
|
||||
|
||||
hookset<void()> *hooks_initgame;
|
||||
|
||||
// initialize the game
|
||||
void initgame() {
|
||||
DEBB(DF_INIT, (debugfile,"initGame\n"));
|
||||
callhooks(hooks_initgame);
|
||||
|
||||
yendor::init(1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user