mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
fixed more fallthroughs, added exception hr_wrong_geometry
This commit is contained in:
parent
eb6322b864
commit
5f86ed6b4b
@ -427,7 +427,7 @@ EX namespace bt {
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
throw hr_wrong_dir();
|
||||
throw hr_wrong_geometry();
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,6 +484,7 @@ EX namespace bt {
|
||||
add(-2 * t0 + shift1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case gHoroRec: {
|
||||
ld r2 = sqrt(2);
|
||||
for(int y=-1; y<=1; y++) for(int x=-1; x<=1; x+=2) for(int z=-1; z<=1; z++)
|
||||
|
2
hyper.h
2
hyper.h
@ -103,6 +103,8 @@ struct hr_shortest_path_exception: hr_exception { };
|
||||
|
||||
struct hr_wrong_dir: hr_exception { };
|
||||
|
||||
struct hr_wrong_geometry: hr_exception { };
|
||||
|
||||
// genus (in grammar)
|
||||
#define GEN_M 0
|
||||
#define GEN_F 1
|
||||
|
@ -426,10 +426,12 @@ EX namespace sn {
|
||||
case 7:
|
||||
case 8:
|
||||
return xpush(bw*(4.5-j)) * zpush(-1) * ypush(bw*(i-7));
|
||||
default:
|
||||
throw hr_wrong_dir;
|
||||
}
|
||||
}
|
||||
|
||||
default: throw "not nihsolv";
|
||||
default: throw hr_wrong_geometry;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1761,6 +1761,7 @@ EX namespace patterns {
|
||||
if(arcm::in()) return colortables['A'][arcm::current.tilegroup[arcm::id_of(c->master)]];
|
||||
#endif
|
||||
if(arb::in()) return colortables['A'][c->master->zebraval + c->master->emeraldval * isize(arb::current.shapes)];
|
||||
return colortables['B'][c->type & 15];
|
||||
case 'B':
|
||||
return colortables['B'][c->type & 15];
|
||||
#if CAP_FIELD
|
||||
|
Loading…
Reference in New Issue
Block a user