mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-13 23:18:16 +00:00
gp:: acknowledged in save game, save map, scorelist, modecode
This commit is contained in:
parent
46523e4d5d
commit
8dcaed3aaf
@ -120,7 +120,13 @@ namespace mapstream {
|
||||
int32_t i = VERNUM; save(i);
|
||||
save(patterns::whichPattern);
|
||||
save(geometry);
|
||||
save(nonbitrunc);
|
||||
char nbtype = nonbitrunc;
|
||||
if(gp::on) nbtype = 2;
|
||||
save(nbtype);
|
||||
if(gp::on) {
|
||||
save(gp::param.first);
|
||||
save(gp::param.second);
|
||||
}
|
||||
if(geometry == gTorus) {
|
||||
save(torusconfig::qty);
|
||||
save(torusconfig::dx);
|
||||
@ -205,7 +211,14 @@ namespace mapstream {
|
||||
|
||||
if(vernum >= 10203) {
|
||||
load(geometry);
|
||||
load(nonbitrunc);
|
||||
char nbtype;
|
||||
load(nbtype);
|
||||
nonbitrunc = !!nbtype;
|
||||
gp::on = nbtype == 2;
|
||||
if(gp::on) {
|
||||
load(gp::param.first);
|
||||
load(gp::param.second);
|
||||
}
|
||||
if(geometry == gTorus) {
|
||||
load(torusconfig::qty);
|
||||
load(torusconfig::dx);
|
||||
|
@ -36,7 +36,8 @@ int modediff(score *S) {
|
||||
if(S->box[238]) g = gSphere;
|
||||
if(S->box[239]) g = gElliptic;
|
||||
if(max(S->box[197], 1) != multi::players) diff += 8;
|
||||
if(S->box[186] != nonbitrunc) diff += 16;
|
||||
if(S->box[186] != nonbitrunc || S->box[341] != gp::on || S->box[342] != gp::param.first || S->box[343] != gp::param.second)
|
||||
diff += 16;
|
||||
if(S->box[196] != chaosmode) diff += 32;
|
||||
if(S->box[119] != shmup::on) diff += 64;
|
||||
if(pureHardcore() && !isHardcore(S)) diff += 128;
|
||||
@ -54,7 +55,8 @@ string modedesc(score *S) {
|
||||
if(S->box[239]) g = gElliptic;
|
||||
string s = ginf[g].shortname;
|
||||
if(g != gNormal) s += " " + csub(XLATT1((eLand) S->box[120]), 3);
|
||||
if(S->box[186]) s += "/7";
|
||||
if(S->box[341]) s += "/GP(" + its(S->box[342])+","+its(S->box[343])+")";
|
||||
else if(S->box[186]) s += "/7";
|
||||
if(S->box[196]) s += "/C";
|
||||
if(S->box[119]) s += "/s";
|
||||
if(S->box[197] > 1) s += "/P" + its(S->box[197]);
|
||||
|
10
system.cpp
10
system.cpp
@ -276,7 +276,7 @@ bool havesave = true;
|
||||
|
||||
#if CAP_SAVE
|
||||
#define MAXBOX 500
|
||||
#define POSSCORE 341 // update this when new boxes are added!
|
||||
#define POSSCORE 344 // update this when new boxes are added!
|
||||
|
||||
struct score {
|
||||
string ver;
|
||||
@ -665,6 +665,10 @@ void applyBoxes() {
|
||||
applyBoxM(moPair);
|
||||
applyBoxM(moCrusher);
|
||||
applyBoxM(moMonk);
|
||||
|
||||
applyBoxBool(gp::on);
|
||||
applyBox(gp::param.first);
|
||||
applyBox(gp::param.second);
|
||||
|
||||
if(POSSCORE != boxid) printf("ERROR: %d boxes\n", boxid);
|
||||
}
|
||||
@ -685,6 +689,10 @@ void loadBoxHigh() {
|
||||
dynamicval<bool> sp3(shmup::on, savebox[119]);
|
||||
dynamicval<bool> sp4(chaosmode, savebox[196]);
|
||||
dynamicval<bool> sp5(nonbitrunc, savebox[186]);
|
||||
dynamicval<bool> sp6(gp::on, savebox[341]);
|
||||
dynamicval<int> sp7(gp::param.first, savebox[342]);
|
||||
dynamicval<int> sp8(gp::param.second, savebox[343]);
|
||||
|
||||
if(savebox[238]) geometry = gSphere;
|
||||
if(savebox[239]) geometry = gElliptic;
|
||||
|
||||
|
@ -864,6 +864,12 @@ int modecode() {
|
||||
#endif
|
||||
if(numplayers() == 7) mct += 16384;
|
||||
|
||||
if(gp::on) {
|
||||
mct += 32768;
|
||||
mct += gp::param.first << 16;
|
||||
mct += gp::param.second << 21;
|
||||
}
|
||||
|
||||
mct += ginf[geometry].xcode;
|
||||
|
||||
return mct;
|
||||
|
Loading…
x
Reference in New Issue
Block a user