1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-15 21:27:10 +00:00

fixed the errors caused by non_spatial_model giving incorrect results

This commit is contained in:
Zeno Rogue
2025-09-09 10:29:41 +02:00
parent c5ce82b2c7
commit 9b82538f04
3 changed files with 8 additions and 0 deletions

View File

@@ -3191,6 +3191,8 @@ EX void show3D() {
}
#endif
current_display->set_all(0, 0);
if(0);
#if CAP_RUG
else if(rug::rugged && !rug::spatial_rug)

View File

@@ -1400,6 +1400,8 @@ EX void drawthemap() {
mmhigh = vid.highlightmode >= 1;
if(hiliteclick) mmhigh = !mmhigh;
current_display->set_all(0, 0); /* so that non_spatial_model works correctly */
spatial_graphics = wmspatial || mmspatial;
spatial_graphics = spatial_graphics && GDIM == 2;
#if CAP_RUG

View File

@@ -29,6 +29,10 @@ EX void camrotate(ld& hx, ld& hy) {
hx = p[0] / p[2], hy = p[1] / p[2];
}
/** Does the current model support 3D
* Warning: since it depends on get_shader_flags(), you may need to current_display->set_all(0,0) for it to work correctly.
*/
EX bool non_spatial_model() {
if(among(pmodel, mdRotatedHyperboles, mdJoukowsky, mdJoukowskyInverted, mdPolygonal, mdPolynomial))
return true;