1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

fixed legacy modecodes failing on load

This commit is contained in:
Zeno Rogue 2024-06-07 07:37:46 +02:00
parent 78585f7ec2
commit 1e6793fa0a

View File

@ -1355,9 +1355,10 @@ EX void load_last_save() {
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(meaning.count(sc.box[MODECODE_BOX])) { modecode_t mc = sc.box[MODECODE_BOX];
if(mc >= FIRST_MODECODE && meaning.count(mc)) {
shstream ss; shstream ss;
ss.s = meaning[sc.box[MODECODE_BOX]]; ss.s = meaning[mc];
ss.read(ss.vernum); ss.read(ss.vernum);
if(ss.vernum < 0xAA05) if(ss.vernum < 0xAA05)
mapstream::load_geometry(ss); mapstream::load_geometry(ss);