mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-24 05:17:17 +00:00
style improved
This commit is contained in:
parent
89aa64d52b
commit
1fdcb42195
@ -45,51 +45,57 @@ void make() {
|
|||||||
|
|
||||||
heps.emplace_back(Id, 0xFFFFFFFF);
|
heps.emplace_back(Id, 0xFFFFFFFF);
|
||||||
|
|
||||||
|
auto advance = [&] (int i, int j, bool mirror = false) {
|
||||||
|
transmatrix T = heps.back().first * get_adj(i, j);
|
||||||
|
if(mirror) T = T * MirrorY;
|
||||||
|
heps.emplace_back(T, heps.back().second ^ 0xFFFF00);
|
||||||
|
};
|
||||||
|
|
||||||
switch(magmashape) {
|
switch(magmashape) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
for(int i=0; i<13; i++)
|
for(int i=0; i<13; i++)
|
||||||
heps.emplace_back(heps.back().first * get_adj(0, 3), heps.back().second ^ 0xFFFF00);
|
advance(0, 3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
for(int i=0; i<8; i++)
|
for(int i=0; i<8; i++)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 6), heps.back().second ^ 0xFFFF00);
|
advance(3, 6);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
for(int a=0; a<2; a++) {
|
for(int a=0; a<2; a++) {
|
||||||
heps.emplace_back(heps.back().first * get_adj(2, 0), heps.back().second ^ 0xFFFF00);
|
advance(2, 0);
|
||||||
for(int i=a; i<8; i++)
|
for(int i=a; i<8; i++)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
for(int a=0; a<4; a++)
|
for(int a=0; a<4; a++)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 1), heps.back().second ^ 0xFFFF00);
|
advance(3, 1);
|
||||||
for(int a=0; a<4; a++)
|
for(int a=0; a<4; a++)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
for(int a=0; a<6; a++) {
|
for(int a=0; a<6; a++) {
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
}
|
}
|
||||||
for(int b=0; b<magmalong; b++) {
|
for(int b=0; b<magmalong; b++) {
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 6), heps.back().second ^ 0xFFFF00);
|
advance(3, 6);
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int a=0; a<7; a++) {
|
for(int a=0; a<7; a++) {
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int b=0; b<magmalong; b++) {
|
for(int b=0; b<magmalong; b++) {
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 6), heps.back().second ^ 0xFFFF00);
|
advance(3, 6);
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -121,23 +127,23 @@ void make() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(small == 14 && inner == 0 && big == 0)
|
if(small == 14 && inner == 0 && big == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(5, 5) * MirrorY, heps.back().second ^ 0xFFFF00);
|
advance(5, 5, true);
|
||||||
|
|
||||||
else if(small == 4 && big == 2 && inner == 0)
|
else if(small == 4 && big == 2 && inner == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(5, 5) * MirrorY, heps.back().second ^ 0xFFFF00);
|
advance(5, 5, true);
|
||||||
|
|
||||||
else if(small == 9 && big == 1 && inner == 0)
|
else if(small == 9 && big == 1 && inner == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(5, 5) * MirrorY, heps.back().second ^ 0xFFFF00);
|
advance(5, 5, true);
|
||||||
|
|
||||||
else if(inner == 1 && small == 5 && big == 0)
|
else if(inner == 1 && small == 5 && big == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(5, 5) * MirrorY, heps.back().second ^ 0xFFFF00);
|
advance(5, 5, true);
|
||||||
|
|
||||||
else if(small == 4 && big == 1 && inner == 0)
|
else if(small == 4 && big == 1 && inner == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 6), heps.back().second ^ 0xFFFF00);
|
advance(3, 6);
|
||||||
else if(big == 1 && small < 4 && inner == 0)
|
else if(big == 1 && small < 4 && inner == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
else if(big == 2 && small < 4 && inner == 0)
|
else if(big == 2 && small < 4 && inner == 0)
|
||||||
heps.emplace_back(heps.back().first * get_adj(3, 0), heps.back().second ^ 0xFFFF00);
|
advance(3, 0);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
println(hlog, "big = ", big, "small = ", small);
|
println(hlog, "big = ", big, "small = ", small);
|
||||||
|
Loading…
Reference in New Issue
Block a user