1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-25 22:53:19 +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) {
if(kind != kCollatz) return;
if(c->cpdist > 7 && euclid) ;
else if(vd.data == 2) {
// doubler vertex
@ -329,7 +330,9 @@ int ah = addHook(hooks_args, 100, readArgs) +
rogueviz::collatz::start();
})
});
});
})
+ addHook(hooks_drawvertex, 100, act);
EX }

View File

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

View File

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