dhrg:: support tallying other edges

This commit is contained in:
Zeno Rogue
2026-01-27 10:23:01 +01:00
parent f4da2507fb
commit 1a53efb2b5
+2 -1
View File
@@ -5,13 +5,14 @@ namespace dhrg {
// tally edges of the given vertex at the given index
int edgetally[MAXDIST];
int *whichedgetally = edgetally;
void tallyedgesof(int i, int delta, mycell *mc) {
using namespace rogueviz;
for(auto p: vdata[i].edges) {
int j = p.second->i ^ p.second->j ^ i;
if(j==i) printf("LOOP!\n");
edgetally[quickdist(mc, vertices[j], 0)] += delta;
whichedgetally[quickdist(mc, vertices[j], 0)] += delta;
}
}