1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-05 11:57:58 +00:00

atscreenpos now returns shiftmatrix; changed the atscreenpos references in hyperrogue to use new atscreenpos and eupoint when applicable

This commit is contained in:
Zeno Rogue
2025-03-02 21:44:27 +01:00
parent 356deb63a2
commit f3cd8248ef
7 changed files with 79 additions and 89 deletions

View File

@@ -2563,7 +2563,7 @@ struct flat_model_enabler {
};
#endif
EX transmatrix atscreenpos(ld x, ld y) {
EX shiftmatrix atscreenpos(ld x, ld y) {
transmatrix V = Id;
if(pmodel == mdPixel) {
@@ -2588,14 +2588,14 @@ EX transmatrix atscreenpos(ld x, ld y) {
if(S3 >= OINF) V[0][0] /= 5, V[1][1] /= 5;
}
return V;
return shiftless(V);
}
EX transmatrix atscreenpos(ld x, ld y, ld size) {
transmatrix V = atscreenpos(x, y);
EX shiftmatrix atscreenpos(ld x, ld y, ld size) {
shiftmatrix V = atscreenpos(x, y);
ld s = size * 2 * cgi.hcrossf / cgi.crossf;
V[0][0] *= s;
V[1][1] *= s;
V.T[0][0] *= s;
V.T[1][1] *= s;
return V;
}