1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-06 11:32:49 +00:00

racing:: added CAP_CRYSTAL guards

This commit is contained in:
? 2019-02-27 15:53:07 +01:00 committed by Zeno Rogue
parent 142ddc9630
commit 365b6595d3

View File

@ -195,13 +195,17 @@ bool bad(cell *c2, cell *c) {
} }
int rcelldist(cell *c) { int rcelldist(cell *c) {
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::space_distance(c, currentmap->gamestart()); if(geometry == gCrystal) return crystal::space_distance(c, currentmap->gamestart());
else return celldist(c); #endif
return celldist(c);
} }
int pcelldist(cell *c) { int pcelldist(cell *c) {
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::precise_distance(c, currentmap->gamestart()); if(geometry == gCrystal) return crystal::precise_distance(c, currentmap->gamestart());
else return celldist(c); #endif
return celldist(c);
} }
int trackval(cell *c) { int trackval(cell *c) {
@ -1291,7 +1295,9 @@ void markers() {
if(invalid_point(H)) return; if(invalid_point(H)) return;
queuechr(H, 2*vid.fsize, 'X', 0x10100 * int(128 + 100 * sintick(150))); queuechr(H, 2*vid.fsize, 'X', 0x10100 * int(128 + 100 * sintick(150)));
queuestr(H, vid.fsize, queuestr(H, vid.fsize,
#if CAP_CRYSTAL
(geometry == gCrystal && !crystal::pure()) ? fts(crystal::space_distance(cwt.at, track.back())) : (geometry == gCrystal && !crystal::pure()) ? fts(crystal::space_distance(cwt.at, track.back())) :
#endif
its(celldistance(cwt.at, track.back())), 0x10101 * int(128 - 100 * sintick(150))); its(celldistance(cwt.at, track.back())), 0x10101 * int(128 - 100 * sintick(150)));
addauraspecial(H, 0xFFD500, 0); addauraspecial(H, 0xFFD500, 0);
} }