mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-09 00:22:06 +00:00
removed some more unused variables
This commit is contained in:
+1
-7
@@ -548,8 +548,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push,
|
||||
|
||||
auto gbody = body;
|
||||
|
||||
int it = 0;
|
||||
|
||||
vector<int> nextid(n);
|
||||
vector<int> lastid(n);
|
||||
vector<bool> stillin(n, true);
|
||||
@@ -558,7 +556,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push,
|
||||
nextid[n-1] = n-1; lastid[0] = 0;
|
||||
|
||||
while(true) {
|
||||
it++;
|
||||
int cand = -1;
|
||||
ld cv = 0;
|
||||
for(int i=1; i<n-1; i++) if(stillin[i]) {
|
||||
@@ -787,8 +784,6 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye
|
||||
hyperpoint pscenter = psmin(center);
|
||||
|
||||
ld pos = 0;
|
||||
int qty = 0, qtyall = 0;
|
||||
|
||||
vector<hyperpoint> pss;
|
||||
|
||||
for(int i=head.s; i<head.e; i++) pss.push_back(psmin(lzpush(shift_head - cgi.emb->center_z()) * hpc[i]));
|
||||
@@ -800,8 +795,7 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye
|
||||
ld mindist = 1e9;
|
||||
for(int i=0; i<isize(pss); i+=3) if(pss[i][2] < zmid || (WDIM == 3 && !gproduct)) {
|
||||
ld d = sqhypot_d(2, pss[i]-pscenter) + sqhypot_d(2, pss[i+1]-pscenter) + sqhypot_d(2, pss[i+2]-pscenter);
|
||||
if(d < mindist) mindist = d, pos = min(min(pss[i][2], pss[i+1][2]), pss[i+2][2]), qty++;
|
||||
qtyall++;
|
||||
if(d < mindist) mindist = d, pos = min(min(pss[i][2], pss[i+1][2]), pss[i+2][2]);
|
||||
}
|
||||
|
||||
if(&eye == &shSkullEyes) cgi.eyelevel_human = pos = zc(eyepos) - 0.06 * SH * 0.05;
|
||||
|
||||
@@ -1051,8 +1051,6 @@ EX bool valid_dir(const vector<char>& ad, int j, cell *c) {
|
||||
int a = 0;
|
||||
for(auto& dd: ad1) if(dd == 1) a++;
|
||||
|
||||
int a0 = 0;
|
||||
for(auto& dd: ad) if(dd == 1) a0++;
|
||||
return a < 6;
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,6 @@ EX void create_yasc_message() {
|
||||
bool in_ctx = true;
|
||||
|
||||
set<string> blocks;
|
||||
int index = 0;
|
||||
for(auto c: all) {
|
||||
if(c.type == miENTITY && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c));
|
||||
else if(c.type == miWALL && c.subtype == siMONSTER && !captures.count({c.where, blocking_monster_name(c)})) blocks.insert(blocking_monster_name(c));
|
||||
@@ -361,7 +360,6 @@ EX void create_yasc_message() {
|
||||
else if(c.where && c.where->wall != cwt.at->wall) blocks.insert(dnameof(c.where->wall));
|
||||
}
|
||||
else if(c.type == siWARP) blocks.insert("warp");
|
||||
index++;
|
||||
}
|
||||
|
||||
if(!blocks.empty()) {
|
||||
|
||||
@@ -13,7 +13,6 @@ EX subdivision su = subdivision::conformal;
|
||||
pair<ld, ld> compute_all_areas(bool recolor) {
|
||||
map<ld, int> qty_of;
|
||||
map<ld, int> qty_of_standard;
|
||||
ld totar = 0;
|
||||
|
||||
map<cell*, ld> areas;
|
||||
|
||||
@@ -26,7 +25,6 @@ pair<ld, ld> compute_all_areas(bool recolor) {
|
||||
hs.push_back(hs[0]);
|
||||
|
||||
ld area = abs(compute_area(hs));
|
||||
totar += area;
|
||||
|
||||
qty_of[area]++;
|
||||
areas[c] = area;
|
||||
|
||||
+1
-2
@@ -1509,9 +1509,8 @@ EX int get_pattern_value(cell *c) {
|
||||
auto h3 = h0->cmodmove(d+1);
|
||||
auto h2 = (heptspin(h0, d)+wstep-1+wstep).at;
|
||||
auto t = current_li.relative; if(v.second < 0) t = loc(0,1) * t;
|
||||
int spins = 0;
|
||||
while(h1->fieldval > h0->fieldval || h2->fieldval > h0->fieldval || h3->fieldval > h0->fieldval) {
|
||||
tie(h0, h1, h2, h3) = make_tuple(h1, h2, h3, h0); spins++;
|
||||
tie(h0, h1, h2, h3) = make_tuple(h1, h2, h3, h0);
|
||||
t = t * loc(0,-1) + param * loc(0,1);
|
||||
}
|
||||
data = {h0->fieldval/S7, h1->fieldval/S7, t.first, t.second};
|
||||
|
||||
@@ -1288,9 +1288,6 @@ EX void test_transducers() {
|
||||
swap(cum, result);
|
||||
ctid = t_origin[ctid].at->cmove(c)->id;
|
||||
}
|
||||
int err = 0;
|
||||
for(auto duc: cum) for(auto p: duc.second.t)
|
||||
if(p.first.first == ENDED || p.first.second != p.first.first) err++;
|
||||
throw_identity_errors(cum, cyc.dirs);
|
||||
if(id_size != isize(cum)) println(hlog, "error: identity not recovered correctly");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user