1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-17 18:59:59 +00:00

potential bugfix

This commit is contained in:
Zeno Rogue 2020-07-25 03:13:46 +02:00
parent c931cb93d5
commit a3c5773864

View File

@ -1573,13 +1573,14 @@ EX void enable_flat_model() {
#if HDR
/** \brief enable the 'flat' model for drawing HUD. Use RAII so it will be switched back later */
namespace stretch { extern ld factor; }
namespace stretch { extern ld factor; } namespace ray { extern bool in_use; }
struct flat_model_enabler {
projection_configuration bak;
ld sf;
flat_model_enabler() { bak = pconf; sf = stretch::factor; stretch::factor = 0; enable_flat_model(); }
~flat_model_enabler() { pconf = bak; stretch::factor = sf; calcparam(); }
ld sf;
bool ru;
flat_model_enabler() { bak = pconf; sf = stretch::factor; stretch::factor = 0; ru = ray::in_use; ray::in_use = false; enable_flat_model(); }
~flat_model_enabler() { pconf = bak; stretch::factor = sf; ray::in_use = ru; calcparam(); }
};
#endif