mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 10:20:32 +00:00
flat_model_enabler now sets the default variation, fixes issue #254
This commit is contained in:
parent
6999277715
commit
b544461dc7
@ -2133,6 +2133,7 @@ transmatrix screenpos(ld x, ld y) {
|
|||||||
|
|
||||||
EX int flat_on;
|
EX int flat_on;
|
||||||
eGeometry backup_geometry;
|
eGeometry backup_geometry;
|
||||||
|
eVariation backup_variation;
|
||||||
videopar backup_vid;
|
videopar backup_vid;
|
||||||
|
|
||||||
/** \brief enable the 'flat' model for drawing HUD. See hr::flat_model_enabler */
|
/** \brief enable the 'flat' model for drawing HUD. See hr::flat_model_enabler */
|
||||||
@ -2142,8 +2143,10 @@ EX void enable_flat_model(int val) {
|
|||||||
glClear(GL_DEPTH_BUFFER_BIT);
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
#endif
|
#endif
|
||||||
backup_geometry = geometry;
|
backup_geometry = geometry;
|
||||||
|
backup_variation = variation;
|
||||||
backup_vid = vid;
|
backup_vid = vid;
|
||||||
geometry = gNormal;
|
geometry = gNormal;
|
||||||
|
variation = eVariation::bitruncated;
|
||||||
pmodel = mdDisk;
|
pmodel = mdDisk;
|
||||||
pconf.alpha = 1;
|
pconf.alpha = 1;
|
||||||
pconf.scale = 1;
|
pconf.scale = 1;
|
||||||
@ -2162,6 +2165,7 @@ EX void enable_flat_model(int val) {
|
|||||||
}
|
}
|
||||||
if(flat_on >= 1 && flat_on + val < 1) {
|
if(flat_on >= 1 && flat_on + val < 1) {
|
||||||
geometry = backup_geometry;
|
geometry = backup_geometry;
|
||||||
|
variation = backup_variation;
|
||||||
vid = backup_vid;
|
vid = backup_vid;
|
||||||
geom3::apply_always3();
|
geom3::apply_always3();
|
||||||
calcparam();
|
calcparam();
|
||||||
|
Loading…
Reference in New Issue
Block a user