mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-10 22:36:02 +00:00
rogueviz:: used rv_hook in some viz
This commit is contained in:
@@ -21,6 +21,8 @@ namespace spiral {
|
||||
void place(int N, ld _mul) {
|
||||
mul = _mul;
|
||||
init(&spiral_id, RV_GRAPH | RV_HAVE_WEIGHT | RV_INVERSE_WEIGHT);
|
||||
rv_hook(hooks_alt_edges, 100, spiral_altedge);
|
||||
rv_hook(hooks_frame, 0, drawExtra);
|
||||
weight_label = "extent";
|
||||
vdata.resize(N);
|
||||
|
||||
@@ -65,7 +67,7 @@ namespace spiral {
|
||||
}
|
||||
|
||||
bool spiral_altedge(edgeinfo* ei, bool store) {
|
||||
bool onspiral = (vizid == &spiral::spiral_id) && abs(ei->i - ei->j) == 1;
|
||||
bool onspiral = abs(ei->i - ei->j) == 1;
|
||||
|
||||
if(onspiral) {
|
||||
const int prec = 20;
|
||||
@@ -88,8 +90,6 @@ bool spiral_altedge(edgeinfo* ei, bool store) {
|
||||
}
|
||||
|
||||
auto hooks =
|
||||
addHook(hooks_frame, 0, drawExtra) +
|
||||
addHook(hooks_alt_edges, 100, spiral_altedge) +
|
||||
addHook(hooks_args, 100, [] {
|
||||
using namespace arg;
|
||||
|
||||
|
Reference in New Issue
Block a user