1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-18 14:45:12 +00:00

3d:: 2D/3D is now selectable at runtime

This commit is contained in:
?
2019-02-24 19:40:01 +01:00
committed by Zeno Rogue
parent 1f8510bc71
commit d08e58f404
17 changed files with 208 additions and 232 deletions

View File

@@ -599,14 +599,15 @@ void init() {
hyperpoint gltopoint(const glvertex& t) {
hyperpoint h;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2]; h[3] = t[3];
// if(DIM == 3) h[3] = 0;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2];
if(SHDIM == 4 && MAXDIM == 4) h[3] = t[3];
return h;
}
glvertex pointtogl(const hyperpoint& t) {
glvertex h;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2]; h[3] = t[3];
h[0] = t[0]; h[1] = t[1]; h[2] = t[2];
if(SHDIM == 4) h[3] = (DIM == 3) ? t[3] : 1;
return h;
}