mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-06 11:32:49 +00:00
even again fixed flatmodel in 3D
This commit is contained in:
parent
0c5877a7ba
commit
7d9be4d40c
21
hypgraph.cpp
21
hypgraph.cpp
@ -1593,11 +1593,9 @@ transmatrix screenpos(ld x, ld y) {
|
|||||||
In 2D, this does not work (as HyperRogue reduces matrices to 3x3) so we use the native disk projection
|
In 2D, this does not work (as HyperRogue reduces matrices to 3x3) so we use the native disk projection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int flat_on;
|
EX int flat_on;
|
||||||
eGeometry backup_geometry;
|
eGeometry backup_geometry;
|
||||||
projection_configuration backup_pconf;
|
videopar backup_vid;
|
||||||
bool backup_always3;
|
|
||||||
ld backup_camera, backup_depth;
|
|
||||||
|
|
||||||
/** \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 */
|
||||||
EX void enable_flat_model(int val) {
|
EX void enable_flat_model(int val) {
|
||||||
@ -1606,17 +1604,19 @@ 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_pconf = pconf;
|
backup_vid = vid;
|
||||||
geometry = gNormal;
|
geometry = gNormal;
|
||||||
pmodel = mdDisk;
|
pmodel = mdDisk;
|
||||||
pconf.alpha = 1;
|
pconf.alpha = 1;
|
||||||
pconf.scale = 1;
|
pconf.scale = 1;
|
||||||
pconf.camera_angle = 0;
|
pconf.camera_angle = 0;
|
||||||
pconf.stretch = 1;
|
pconf.stretch = 1;
|
||||||
backup_always3 = vid.always3;
|
|
||||||
backup_camera = vid.camera;
|
|
||||||
backup_depth = vid.depth;
|
|
||||||
vid.always3 = false;
|
vid.always3 = false;
|
||||||
|
vid.wall_height = .3;
|
||||||
|
vid.human_wall_ratio = .7;
|
||||||
|
vid.camera = 1;
|
||||||
|
vid.depth = 1;
|
||||||
geom3::apply_always3();
|
geom3::apply_always3();
|
||||||
check_cgi();
|
check_cgi();
|
||||||
cgi.require_shapes();
|
cgi.require_shapes();
|
||||||
@ -1624,11 +1624,8 @@ 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;
|
||||||
pconf = backup_pconf;
|
vid = backup_vid;
|
||||||
vid.always3 = backup_always3;
|
|
||||||
geom3::apply_always3();
|
geom3::apply_always3();
|
||||||
vid.depth = backup_depth;
|
|
||||||
vid.camera = backup_camera;
|
|
||||||
calcparam();
|
calcparam();
|
||||||
check_cgi();
|
check_cgi();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user