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

improved geometry2 and displaydir functions for syntetic

This commit is contained in:
Zeno Rogue
2018-08-18 17:40:02 +02:00
parent dcee5d6d58
commit 5c90e6bcec
2 changed files with 11 additions and 5 deletions

View File

@@ -235,7 +235,12 @@ void drawLightning(const transmatrix& V) {
}
int displaydir(cell *c, int d) {
if(irr::on) {
if(syntetic) {
auto& t1 = synt::get_triangle(c->master, d);
auto p = spin(-t1.first + M_PI / c->type) * xpush(t1.second) * C0;
return -int(atan2(p[1], p[0]) * S84 / 2 / M_PI + .5);
}
else if(irr::on) {
auto id = irr::cellindex[c];
auto& vs = irr::cells[id];
if(d < 0 || d >= c->type) return 0;