mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 07:30:26 +00:00
fix to geometry specifics saving
This commit is contained in:
parent
4b89d1dfd7
commit
b7dd69f99e
@ -120,7 +120,7 @@ namespace mapstream {
|
||||
if(geometry == gCrystal) {
|
||||
f.write(ginf[gCrystal].sides);
|
||||
if(ginf[gCrystal].sides == 8)
|
||||
f.write(ginf[gCrystal].vertices);
|
||||
f.write(ginf[gCrystal].vertex);
|
||||
}
|
||||
if(geometry == gArchimedean) f.write(arcm::current.symbol);
|
||||
addToQueue((bounded || euclid) ? currentmap->gamestart() : cwt.at->master->c7);
|
||||
@ -219,7 +219,7 @@ namespace mapstream {
|
||||
if(geometry == gCrystal && vernum >= 10504) {
|
||||
int sides;
|
||||
f.read(sides);
|
||||
set_crystal(sides);
|
||||
crystal::set_crystal(sides);
|
||||
if(sides == 8) {
|
||||
int vertices;
|
||||
eVariation v = variation;
|
||||
|
13
yendor.cpp
13
yendor.cpp
@ -960,10 +960,12 @@ int modecode() {
|
||||
mct += (1 << 20);
|
||||
}
|
||||
|
||||
typedef long long ll;
|
||||
|
||||
// 32 bits [29..61) for geometry specifics
|
||||
if(torus) {
|
||||
mct += ll(torusconfig::torusmode) << 29;
|
||||
auto& mode = torusconfig::tmodes[torusconfig::torusmode];
|
||||
if(euwrap) {
|
||||
mct += ll(torusconfig::torus_mode) << 29;
|
||||
auto& mode = torusconfig::tmodes[torusconfig::torus_mode];
|
||||
bool single = (mode.flags & torusconfig::TF_SINGLE);
|
||||
if(single) {
|
||||
mct += ll(torusconfig::qty) << 37;
|
||||
@ -975,14 +977,15 @@ int modecode() {
|
||||
}
|
||||
}
|
||||
|
||||
if(geometry == gQuotient) {
|
||||
if(geometry == gFieldQuotient) {
|
||||
using namespace fieldpattern;
|
||||
mct += ll(current_extra) << 29;
|
||||
mct += ll(fgeomextras[current_extra].current_prime_id) << 37;
|
||||
}
|
||||
|
||||
if(geometry == gCrystal) {
|
||||
mct += ll(ginf[geometry].sides) << 29;
|
||||
mct += ll(ginf[geometry].vertices) << 37;
|
||||
mct += ll(ginf[geometry].vertex) << 37;
|
||||
}
|
||||
|
||||
if(geometry == gArchimedean) {
|
||||
|
Loading…
Reference in New Issue
Block a user