1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 22:36:02 +00:00

clearing:: fixed some bugs when reached too far into the center

This commit is contained in:
Zeno Rogue
2020-03-01 02:35:19 +01:00
parent 62734bbfc5
commit 70d7fde8d4
4 changed files with 28 additions and 11 deletions

10
hud.cpp
View File

@@ -255,14 +255,8 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int
buttonsize / 3;
if(id == moMutant + ittypes && clearing::imputed.nonzero()) {
ld d = qty + clearing::imputed.approx_ld();
if(d < 100000) str = its(int(d));
else {
int digits = 0;
while(d >= 10) digits++, d /= 10;
str = its(int(d*100)) + "E" + its(digits);
str.insert(1, ".");
}
bignum bn = clearing::imputed + qty;
str = short_form(bn);
bsize = buttonsize / 4;
}