1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-17 19:48:06 +00:00

show the big numbers in the Clearing

This commit is contained in:
Zeno Rogue
2019-12-25 11:53:50 +01:00
parent e5e4db5ef1
commit 4848cb1b87
6 changed files with 117 additions and 16 deletions

View File

@@ -394,7 +394,7 @@ bool havesave = true;
#if HDR
#define MAXBOX 500
#define POSSCORE 371 // update this when new boxes are added!
#define POSSCORE 373 // update this when new boxes are added!
struct score {
string ver;
int box[MAXBOX];
@@ -414,6 +414,16 @@ void applyBox(int& t) {
else boxid++;
}
void applyBoxBignum(bignum& tb) {
float tf;
int ti;
if(saving) tf = tb.approx_ld();
if(saving) memcpy(&ti, &tf, 4);
applyBox(ti);
if(loading) memcpy(&tf, &ti, 4);
if(loading) tb = bignum(tf);
}
EX void applyBoxNum(int& i, string name IS("")) {
fakebox[boxid] = (name == "");
boxname[boxid] = name;
@@ -814,6 +824,9 @@ EX void applyBoxes() {
applyBoxM(moNarciss);
applyBoxM(moMirrorSpirit);
applyBox(clearing::direct);
applyBoxBignum(clearing::imputed);
if(POSSCORE != boxid) printf("ERROR: %d boxes\n", boxid);
}