1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-11 12:47:39 +00:00

vernum uniformization

This commit is contained in:
Zeno Rogue
2019-05-22 00:19:03 +02:00
parent a6dd48cec0
commit 1b93ecd5a3
3 changed files with 33 additions and 34 deletions

View File

@@ -150,8 +150,8 @@ bool read_ghosts(string seed, int mcode) {
println(hlog, "trying to read ghosts from: ", fname);
fhstream f(fname, "rb");
if(!f.f) return false;
int vernum = f.get<int> ();
if(vernum <= 0xA600) return true; // scores removed due to the possibility of cheating
f.vernum = f.get<int> ();
if(f.vernum <= 0xA600) return true; // scores removed due to the possibility of cheating
hread(f, ghostset());
return true;
}
@@ -160,7 +160,7 @@ void write_ghosts(string seed, int mcode) {
fhstream f;
f.f = fopen(ghost_filename(seed, mcode).c_str(), "wb");
if(!f.f) throw hstream_exception(); // ("failed to write the ghost file");
hwrite(f, (const int&) VERNUM_HEX);
hwrite(f, f.vernum);
hwrite(f, ghostset());
}
#endif