mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-08 00:01:24 +00:00
rogueviz:: removed unused variables
This commit is contained in:
@@ -256,9 +256,6 @@ void wfc() {
|
||||
int ca=0, cb=0, cc=0, cd=0, ce=0;
|
||||
int cur1 = (cur+1) % 3;
|
||||
int cur2 = (cur+2) % 3;
|
||||
int same = 0;
|
||||
int in1 = 0;
|
||||
int in2 = 0;
|
||||
for(int i=0; i<isize(v); i++) {
|
||||
auto va = v[i], vb = v[(i+1)%isize(v)];
|
||||
if(va == cur && vb == cur1) ca++;
|
||||
@@ -267,11 +264,8 @@ void wfc() {
|
||||
if(va == cur2 && vb == cur) cd++;
|
||||
if(va == cur1 && vb == cur2) ce++;
|
||||
if(va == cur2 && vb == cur1) ce++;
|
||||
if(va == cur) same++;
|
||||
if(va == cur1) in1++;
|
||||
if(va == cur2) in2++;
|
||||
}
|
||||
mul[a] = ca==1 && cb==1 && cc==1 && cd==1 && ce==0; // && in1 >= 2; // && in2 >= 2;
|
||||
mul[a] = ca==1 && cb==1 && cc==1 && cd==1 && ce==0;
|
||||
if(mul[a]) println(hlog, v, cur, " => ", mul[a]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -362,10 +362,10 @@ int mycanvas(cell *c) {
|
||||
|
||||
case 10: /* house */ {
|
||||
d[0]--;
|
||||
int is0 = 0, is1 = 0, is2 = 0, ismore = 0;
|
||||
int is1 = 0, is2 = 0, ismore = 0;
|
||||
for(int a=0; a<dim; a++) {
|
||||
int v = abs(d[a]);
|
||||
if(v == 0) is0++;
|
||||
if(v == 0) ;
|
||||
else if(v == 1) is1++;
|
||||
else if(v == 2) is2++;
|
||||
else if(v > 2) ismore++;
|
||||
|
||||
@@ -233,11 +233,8 @@ void create_model() {
|
||||
|
||||
transmatrix tester = spin(1.1) * xpush(1);
|
||||
|
||||
int idh = 0;
|
||||
|
||||
for(hyperpoint h: {ctr, tria[0], tria[1], tria[2], tria[3], tria[4], ctr}) {
|
||||
int good1 = 0, good2 = 0;
|
||||
// printf("%d: ", idh);
|
||||
for(int i=0; i<5; i++) {
|
||||
array<hyperpoint, 3> testplane;
|
||||
testplane[0] = tester * h;
|
||||
@@ -247,13 +244,9 @@ void create_model() {
|
||||
if(f[0] > -1e-6 || std::isnan(f[0])) good1++;
|
||||
if(f[0] < +1e-6 || std::isnan(f[0])) good2++;
|
||||
}
|
||||
// printf("\n");
|
||||
if(good1 == 5 || good2 == 5) {ctr = h; break; }
|
||||
idh++;
|
||||
}
|
||||
|
||||
// printf("idh = %d\n", idh);
|
||||
|
||||
// printf("createmodel with ticks = %d\n", ticks);
|
||||
|
||||
transmatrix t = hyperbolic ? hr::cspin180(0, 2) * xpush(sin(ticks * TAU / anims::period)) : hr::cspin(0, 2, ticks * TAU / anims::period);
|
||||
|
||||
@@ -162,7 +162,7 @@ bool kill_off(hyperpoint h1, hyperpoint h2, hyperpoint& h3) {
|
||||
int bad;
|
||||
|
||||
void test_reverse() {
|
||||
int ok = 0, killed = 0;
|
||||
int killed = 0;
|
||||
bad = 0;
|
||||
for(int a=0; a<100; a++) {
|
||||
hyperpoint h = random_spin3() * C0;
|
||||
@@ -172,7 +172,7 @@ void test_reverse() {
|
||||
reverse_model(h1, h2, pmodel);
|
||||
bool ko = kill_off(h, h1, h2);
|
||||
if(hdist(h, h2) < 1e-5)
|
||||
ok++;
|
||||
;
|
||||
else if(ko)
|
||||
killed++;
|
||||
else {
|
||||
@@ -180,7 +180,6 @@ void test_reverse() {
|
||||
println(hlog, h, " -> ", h1, " -> ", h2);
|
||||
}
|
||||
}
|
||||
// println(hlog, "ok ", ok, " bad ", bad, " killed ", killed);
|
||||
}
|
||||
|
||||
texture::texture_data *tgt_planet = &moon;
|
||||
|
||||
@@ -151,8 +151,7 @@ void draw_ro() {
|
||||
transmatrix S = Id;
|
||||
if(spinning) S = cspin(0, 1, ticks * TAU / anims::period);
|
||||
|
||||
int bid = 0;
|
||||
for(auto& b: bricks) { bid++;
|
||||
for(auto& b: bricks) {
|
||||
transmatrix V = eupush(b.location);
|
||||
|
||||
int which = b.walls;
|
||||
|
||||
@@ -41,11 +41,9 @@ bool restrict(cell *c, const shiftmatrix& V) {
|
||||
cellwalker cw(c, i);
|
||||
cellwalker cw0 = cw;
|
||||
|
||||
int q = 0;
|
||||
int walls = 0;
|
||||
vector<cellwalker> unknown;
|
||||
do {
|
||||
q++;
|
||||
cw += wstep;
|
||||
cw++;
|
||||
if(cw.at->wall == waWaxWall) walls++;
|
||||
|
||||
Reference in New Issue
Block a user