save/load arb geometry
This commit is contained in:
parent
f7adc64101
commit
a66136625d
|
@ -461,6 +461,7 @@ EX namespace mapstream {
|
||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
if(geometry == gArchimedean) f.write(arcm::current.symbol);
|
if(geometry == gArchimedean) f.write(arcm::current.symbol);
|
||||||
#endif
|
#endif
|
||||||
|
if(geometry == gArbitrary) f.write(arb::current.filename);
|
||||||
if(geometry == gNil) {
|
if(geometry == gNil) {
|
||||||
f.write(S7);
|
f.write(S7);
|
||||||
f.write(nilv::nilperiod);
|
f.write(nilv::nilperiod);
|
||||||
|
@ -543,6 +544,12 @@ EX namespace mapstream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if(geometry == gArbitrary) {
|
||||||
|
string s;
|
||||||
|
f.read(s);
|
||||||
|
arb::run(s);
|
||||||
|
stop_game();
|
||||||
|
}
|
||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
if(geometry == gArchimedean) {
|
if(geometry == gArchimedean) {
|
||||||
string& symbol = arcm::current.symbol;
|
string& symbol = arcm::current.symbol;
|
||||||
|
|
13
system.cpp
13
system.cpp
|
@ -1209,6 +1209,14 @@ EX void loadsave() {
|
||||||
for(int i=0; i<boxid; i++) save.box[i] = sc.box[i];
|
for(int i=0; i<boxid; i++) save.box[i] = sc.box[i];
|
||||||
for(int i=boxid; i<MAXBOX; i++) save.box[i] = 0;
|
for(int i=boxid; i<MAXBOX; i++) save.box[i] = 0;
|
||||||
// for(int i=160; i<200; i++) printf("%d: %d ", i, save.box[i]);
|
// for(int i=160; i<200; i++) printf("%d: %d ", i, save.box[i]);
|
||||||
|
|
||||||
|
if(1) {
|
||||||
|
shstream ss;
|
||||||
|
ss.s = meaning[sc.box[MODECODE_BOX]];
|
||||||
|
ss.read(ss.vernum);
|
||||||
|
mapstream::load_geometry(ss);
|
||||||
|
}
|
||||||
|
|
||||||
loadBox();
|
loadBox();
|
||||||
// printf("boxid = %d\n", boxid);
|
// printf("boxid = %d\n", boxid);
|
||||||
if(items[itHolyGrail]) {
|
if(items[itHolyGrail]) {
|
||||||
|
@ -1226,11 +1234,6 @@ EX void loadsave() {
|
||||||
randomPatternsMode = false;
|
randomPatternsMode = false;
|
||||||
yendor::on = false;
|
yendor::on = false;
|
||||||
tour::on = false;
|
tour::on = false;
|
||||||
|
|
||||||
shstream ss;
|
|
||||||
ss.s = meaning[sc.box[MODECODE_BOX]];
|
|
||||||
ss.read(ss.vernum);
|
|
||||||
mapstream::load_geometry(ss);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue