1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-24 10:27:45 +00:00

arcm:: digons

This commit is contained in:
Zeno Rogue
2018-08-21 04:24:14 +02:00
parent 598cbc5f2f
commit 903fd179d9
2 changed files with 80 additions and 27 deletions

View File

@@ -373,8 +373,13 @@ void generate_floorshapes_for(int id, cell *c, int siid, int sidir) {
sizeto(fsh.b, id);
bshape(fsh.b[id], fsh.prio);
if(&fsh == &shTriheptaFloor && cor == 4 && siid)
/* draw digons specially */
if(cor == 2) {
/* give digons some width */
for(int i=0; i<cor; i++) hpcpush(spin(-.1) * cornerlist[i]), hpcpush(spin(+.1) * cornerlist[i]);
hpcpush(spin(-.1) * cornerlist[0]);
}
else if(&fsh == &shTriheptaFloor && cor == 4 && siid)
/* trihepta floors generate digons too */
for(int i=0; i<=cor; i++) hpcpush(spin((i&1) ? .1 : -.1) * cornerlist[i%cor]);
else
for(int i=0; i<=cor; i++) hpcpush(cornerlist[i%cor]);