1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-20 04:50:10 +00:00

rogueviz:: removed dep on collatz

This commit is contained in:
Zeno Rogue 2020-03-29 14:41:24 +02:00
parent ed58bc9c6c
commit 2d39bac2ef
3 changed files with 8 additions and 3 deletions

View File

@ -75,6 +75,7 @@ namespace collatz {
} }
void act(vertexdata& vd, cell *c, shmup::monster *m, int i) { void act(vertexdata& vd, cell *c, shmup::monster *m, int i) {
if(kind != kCollatz) return;
if(c->cpdist > 7 && euclid) ; if(c->cpdist > 7 && euclid) ;
else if(vd.data == 2) { else if(vd.data == 2) {
// doubler vertex // doubler vertex
@ -329,7 +330,9 @@ int ah = addHook(hooks_args, 100, readArgs) +
rogueviz::collatz::start(); rogueviz::collatz::start();
}) })
}); });
}); })
+ addHook(hooks_drawvertex, 100, act);
EX } EX }

View File

@ -822,8 +822,7 @@ bool drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
} }
} }
if(kind == kCollatz) callhooks(hooks_drawvertex, vd, c, m, i);
collatz::act(vd, c, m, i);
return true; return true;
} }

View File

@ -85,6 +85,9 @@ namespace rogueviz {
extern bool rvwarp; extern bool rvwarp;
extern colorpair dftcolor; extern colorpair dftcolor;
inline hookset<void(vertexdata&, cell*, shmup::monster*, int)> *hooks_drawvertex;
namespace collatz { namespace collatz {
extern double s2, s3, p2, p3; extern double s2, s3, p2, p3;
void start(); void start();