1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 15:37:40 +00:00

MAJOR REWRITE of floor patterns

This commit is contained in:
Zeno Rogue
2018-05-07 20:13:56 +02:00
parent 6cf86f9604
commit 666ddb007e
10 changed files with 1037 additions and 1032 deletions

View File

@@ -3343,8 +3343,18 @@ transmatrix master_relative(cell *c, bool get_inverse) {
transmatrix calc_relative_matrix(cell *c2, cell *c1) {
if(sphere) {
if(!gmatrix0.count(c2) || !gmatrix0.count(c1)) {
printf("building gmatrix0 (size=%d)\n", size(gmatrix0));
auto bak = gp::draw_li;
swap(gmatrix, gmatrix0);
just_gmatrix = true;
drawrec(viewctr, hsOrigin, Id);
just_gmatrix = false;
swap(gmatrix, gmatrix0);
gp::draw_li = bak;
}
if(gmatrix0.count(c2) && gmatrix0.count(c1))
return inverse(gmatrix0[c1]) * gmatrix0[c2];
return inverse(gmatrix0[c1]) * gmatrix0[c2];
else {
printf("error: gmatrix0 not known\n");
return Id;