1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-23 08:54:48 +00:00

symmetric texture editing

This commit is contained in:
Zeno Rogue
2017-12-22 21:57:55 +01:00
parent 5a2ae1a865
commit dd108cde6b
3 changed files with 29 additions and 11 deletions

View File

@@ -1045,6 +1045,8 @@ void fillcircle(hyperpoint h, int col) {
}
}
bool texturesym = false;
void drawPixel(cell *c, hyperpoint h, int col) {
try {
@@ -1054,6 +1056,8 @@ void drawPixel(cell *c, hyperpoint h, int col) {
auto& tinf = texture_map[si.id];
for(auto& M2: tinf.matrices) for(int i = 0; i<c->type; i += si.symmetries) {
fillcircle(M2 * spin(2 * M_PI * i / c->type) * h, col);
if(texturesym)
fillcircle(M2 * spin(2 * M_PI * i / c->type) * Mirror * h, col);
lastupdate = ticks;
}
}