1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-30 17:27:57 +00:00

rewritten the embeddings more nicely

This commit is contained in:
Zeno Rogue
2023-01-27 00:27:10 +01:00
parent 8744420504
commit 85dffdbeff
28 changed files with 1148 additions and 1090 deletions

View File

@@ -137,14 +137,10 @@ EX namespace euc {
map<gp::loc, struct cdata> eucdata;
void compute_tmatrix() {
bool b = geom3::flipped;
cgi.prepare_basics();
if(b) geom3::light_flip(false);
shifttable = get_shifttable();
tmatrix.resize(S7);
for(int i=0; i<S7; i++)
tmatrix[i] = eumove(shifttable[i]);
if(b) geom3::light_flip(true);
for(int i=0; i<S7; i++) tmatrix[i] = eumove(shifttable[i]);
}
void on_dim_change() override {
@@ -1212,7 +1208,7 @@ EX transmatrix eumove(coord co) {
Mat[0][2] += (co[0] + co[1] * .5) * cgi.tessf;
Mat[1][2] += co[1] * q3 /2 * cgi.tessf;
}
if(embedded_plane) swapmatrix(Mat);
if(embedded_plane) Mat = cgi.emb->base_to_actual(Mat);
return Mat;
}