all save boxes are now named (fakeboxes start with @)
This commit is contained in:
parent
14cb26b986
commit
db4be83091
|
@ -689,7 +689,7 @@ EX namespace inv {
|
||||||
|
|
||||||
#if CAP_SAVE
|
#if CAP_SAVE
|
||||||
EX void applyBox(eItem it) {
|
EX void applyBox(eItem it) {
|
||||||
scores::applyBoxNum(inv::usedup[it]);
|
scores::applyBoxNum(inv::usedup[it], "@inv-" + dnameof(it));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
54
system.cpp
54
system.cpp
|
@ -439,19 +439,19 @@ void applyBox(int& t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief the next box should contain tb */
|
/** \brief the next box should contain tb */
|
||||||
void applyBoxBignum(bignum& tb) {
|
void applyBoxBignum(bignum& tb, string name) {
|
||||||
float tf;
|
float tf;
|
||||||
int ti;
|
int ti;
|
||||||
if(saving) tf = tb.approx_ld();
|
if(saving) tf = tb.approx_ld();
|
||||||
if(saving) memcpy(&ti, &tf, 4);
|
if(saving) memcpy(&ti, &tf, 4);
|
||||||
applyBox(ti);
|
applyBoxNum(ti, name);
|
||||||
if(loading) memcpy(&tf, &ti, 4);
|
if(loading) memcpy(&tf, &ti, 4);
|
||||||
if(loading) tb = bignum(tf);
|
if(loading) tb = bignum(tf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief the next box should contain i, and possibly be named name */
|
/** \brief the next box should contain i, and possibly be named name */
|
||||||
EX void applyBoxNum(int& i, string name IS("")) {
|
EX void applyBoxNum(int& i, string name IS("")) {
|
||||||
fakebox[boxid] = (name == "");
|
fakebox[boxid] = (name == "" || name[0] == '@');
|
||||||
boxname[boxid] = name;
|
boxname[boxid] = name;
|
||||||
monsbox[boxid] = false;
|
monsbox[boxid] = false;
|
||||||
applyBox(i);
|
applyBox(i);
|
||||||
|
@ -575,8 +575,8 @@ EX void applyBoxes() {
|
||||||
applyBoxNum(cheater, "number of cheats");
|
applyBoxNum(cheater, "number of cheats");
|
||||||
|
|
||||||
fakebox[boxid] = true;
|
fakebox[boxid] = true;
|
||||||
if(saving) applyBoxSave(items[itOrbSafety] ? safetyland : cwt.at->land, "");
|
if(saving) applyBoxSave(items[itOrbSafety] ? safetyland : cwt.at->land, "@safetyland");
|
||||||
else if(loading) firstland = safetyland = eLand(applyBoxLoad());
|
else if(loading) firstland = safetyland = eLand(applyBoxLoad("@safetyland"));
|
||||||
else lostin = eLand(save.box[boxid++]);
|
else lostin = eLand(save.box[boxid++]);
|
||||||
|
|
||||||
for(int i=itOrbLightning; i<25; i++) applyBoxOrb(eItem(i));
|
for(int i=itOrbLightning; i<25; i++) applyBoxOrb(eItem(i));
|
||||||
|
@ -623,9 +623,9 @@ EX void applyBoxes() {
|
||||||
applyBoxOrb(itOrbSpace);
|
applyBoxOrb(itOrbSpace);
|
||||||
|
|
||||||
int geo = geometry;
|
int geo = geometry;
|
||||||
applyBoxNum(geo, ""); geometry = eGeometry(geo);
|
applyBoxNum(geo, "@geometry"); geometry = eGeometry(geo);
|
||||||
applyBoxBool(hardcore, "hardcore");
|
applyBoxBool(hardcore, "hardcore");
|
||||||
applyBoxNum(hardcoreAt, "");
|
applyBoxNum(hardcoreAt, "@hardcoreAt");
|
||||||
applyBoxBool(shmup::on, "shmup");
|
applyBoxBool(shmup::on, "shmup");
|
||||||
if(saving) applyBoxSave(specialland, "euclid land");
|
if(saving) applyBoxSave(specialland, "euclid land");
|
||||||
else if(loading) specialland = eLand(applyBoxLoad("euclid land"));
|
else if(loading) specialland = eLand(applyBoxLoad("euclid land"));
|
||||||
|
@ -659,8 +659,8 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moPrincessMoved, false); // live Princess for Safety
|
applyBoxM(moPrincessMoved, false); // live Princess for Safety
|
||||||
applyBoxM(moPrincessArmedMoved, false); // live Princess for Safety
|
applyBoxM(moPrincessArmedMoved, false); // live Princess for Safety
|
||||||
applyBoxM(moMouse);
|
applyBoxM(moMouse);
|
||||||
applyBoxNum(princess::saveArmedHP, "");
|
applyBoxNum(princess::saveArmedHP, "@saveArmedHP");
|
||||||
applyBoxNum(princess::saveHP, "");
|
applyBoxNum(princess::saveHP, "@saveHP");
|
||||||
|
|
||||||
applyBoxI(itIvory);
|
applyBoxI(itIvory);
|
||||||
applyBoxI(itElemental);
|
applyBoxI(itElemental);
|
||||||
|
@ -690,8 +690,8 @@ EX void applyBoxes() {
|
||||||
applyBoxOrb(itOrbLuck);
|
applyBoxOrb(itOrbLuck);
|
||||||
applyBoxOrb(itOrbStunning);
|
applyBoxOrb(itOrbStunning);
|
||||||
|
|
||||||
applyBoxBool(tactic::on, "");
|
applyBoxBool(tactic::on, "@tactic");
|
||||||
applyBoxNum(elec::lightningfast, "");
|
applyBoxNum(elec::lightningfast, "@lightningfast");
|
||||||
|
|
||||||
// if(save.box[boxid]) printf("lotus = %d (lost = %d)\n", save.box[boxid], isHaunted(lostin));
|
// if(save.box[boxid]) printf("lotus = %d (lost = %d)\n", save.box[boxid], isHaunted(lostin));
|
||||||
if(loadingHi && isHaunted(lostin)) boxid++;
|
if(loadingHi && isHaunted(lostin)) boxid++;
|
||||||
|
@ -703,7 +703,7 @@ EX void applyBoxes() {
|
||||||
applyBoxOrb(itMutant2);
|
applyBoxOrb(itMutant2);
|
||||||
applyBoxOrb(itOrbFreedom);
|
applyBoxOrb(itOrbFreedom);
|
||||||
applyBoxM(moRedFox);
|
applyBoxM(moRedFox);
|
||||||
applyBoxBool(survivalist);
|
applyBoxBool(survivalist, "@survivalist");
|
||||||
if(loadingHi) applyBoxI(itLotus);
|
if(loadingHi) applyBoxI(itLotus);
|
||||||
else applyBoxNum(truelotus, "lotus/escape");
|
else applyBoxNum(truelotus, "lotus/escape");
|
||||||
|
|
||||||
|
@ -733,17 +733,17 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moDragonHead);
|
applyBoxM(moDragonHead);
|
||||||
applyBoxOrb(itOrbDomination);
|
applyBoxOrb(itOrbDomination);
|
||||||
applyBoxI(itBabyTortoise);
|
applyBoxI(itBabyTortoise);
|
||||||
applyBoxNum(tortoise::seekbits, "");
|
applyBoxNum(tortoise::seekbits, "@seekbits");
|
||||||
applyBoxM(moTortoise);
|
applyBoxM(moTortoise);
|
||||||
applyBoxOrb(itOrbShell);
|
applyBoxOrb(itOrbShell);
|
||||||
|
|
||||||
applyBoxNum(safetyseed);
|
applyBoxNum(safetyseed, "@safetyseed");
|
||||||
|
|
||||||
// (+18)
|
// (+18)
|
||||||
for(int i=0; i<6; i++) {
|
for(int i=0; i<6; i++) {
|
||||||
applyBoxNum(multi::treasures[i]);
|
applyBoxNum(multi::treasures[i], "@multi-treasures" + its(i));
|
||||||
applyBoxNum(multi::kills[i]);
|
applyBoxNum(multi::kills[i], "@multi-kills" + its(i));
|
||||||
applyBoxNum(multi::deaths[i]);
|
applyBoxNum(multi::deaths[i], "@multi-deaths" + its(i));
|
||||||
}
|
}
|
||||||
// (+8)
|
// (+8)
|
||||||
applyBoxM(moDragonTail);
|
applyBoxM(moDragonTail);
|
||||||
|
@ -760,7 +760,7 @@ EX void applyBoxes() {
|
||||||
bool sph;
|
bool sph;
|
||||||
sph = false; applyBoxBool(sph, "sphere"); if(sph) geometry = gSphere;
|
sph = false; applyBoxBool(sph, "sphere"); if(sph) geometry = gSphere;
|
||||||
sph = false; applyBoxBool(sph, "elliptic"); if(sph) geometry = gElliptic;
|
sph = false; applyBoxBool(sph, "elliptic"); if(sph) geometry = gElliptic;
|
||||||
applyBox(princess::reviveAt);
|
applyBoxNum(princess::reviveAt, "@reviveAt");
|
||||||
|
|
||||||
applyBoxI(itDodeca);
|
applyBoxI(itDodeca);
|
||||||
applyBoxI(itAmethyst);
|
applyBoxI(itAmethyst);
|
||||||
|
@ -783,13 +783,13 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moGadfly);
|
applyBoxM(moGadfly);
|
||||||
|
|
||||||
// 10.0:
|
// 10.0:
|
||||||
applyBoxNum(hinttoshow); // 258
|
applyBoxNum(hinttoshow, "@hinttoshow"); // 258
|
||||||
addinv(itOrbMirror);
|
addinv(itOrbMirror);
|
||||||
addinv(itGreenStone);
|
addinv(itGreenStone);
|
||||||
list_invorb();
|
list_invorb();
|
||||||
applyBoxBool(inv::on, "inventory"); // 306
|
applyBoxBool(inv::on, "inventory"); // 306
|
||||||
#if CAP_INV
|
#if CAP_INV
|
||||||
applyBoxNum(inv::rseed);
|
applyBoxNum(inv::rseed, "@inv-rseed");
|
||||||
#else
|
#else
|
||||||
{ int u; applyBoxNum(u); }
|
{ int u; applyBoxNum(u); }
|
||||||
#endif
|
#endif
|
||||||
|
@ -831,16 +831,16 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moMonk);
|
applyBoxM(moMonk);
|
||||||
|
|
||||||
bool v2 = false;
|
bool v2 = false;
|
||||||
applyBoxBool(v2); if(loading && v2) variation = eVariation::goldberg;
|
applyBoxBool(v2, "@variation"); if(loading && v2) variation = eVariation::goldberg;
|
||||||
applyBox(gp::param.first);
|
applyBoxNum(gp::param.first, "@gp-first");
|
||||||
applyBox(gp::param.second);
|
applyBoxNum(gp::param.second, "@gp-second");
|
||||||
|
|
||||||
v2 = false; applyBoxBool(v2); if(loading && v2) variation = eVariation::irregular;
|
v2 = false; applyBoxBool(v2); if(loading && v2) variation = eVariation::irregular;
|
||||||
applyBox(irr::cellcount);
|
applyBoxNum(irr::cellcount, "@irr-cellcount");
|
||||||
|
|
||||||
list_invorb();
|
list_invorb();
|
||||||
|
|
||||||
applyBox(irr::bitruncations_performed);
|
applyBoxNum(irr::bitruncations_performed, "@irr-bitruncations");
|
||||||
|
|
||||||
applyBoxI(itVarTreasure);
|
applyBoxI(itVarTreasure);
|
||||||
applyBoxI(itBrownian);
|
applyBoxI(itBrownian);
|
||||||
|
@ -858,8 +858,8 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moNarciss);
|
applyBoxM(moNarciss);
|
||||||
applyBoxM(moMirrorSpirit);
|
applyBoxM(moMirrorSpirit);
|
||||||
|
|
||||||
applyBox(clearing::direct);
|
applyBoxNum(clearing::direct, "@clearing-direct");
|
||||||
applyBoxBignum(clearing::imputed);
|
applyBoxBignum(clearing::imputed, "@clearing-imputed");
|
||||||
|
|
||||||
applyBoxOrb(itOrbImpact);
|
applyBoxOrb(itOrbImpact);
|
||||||
applyBoxOrb(itOrbChaos);
|
applyBoxOrb(itOrbChaos);
|
||||||
|
|
Loading…
Reference in New Issue