mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-29 14:30:40 +00:00
fixed save_compressed and load_compressed: did not work because of internal format change
This commit is contained in:
parent
07abd6384a
commit
e2cbf80986
@ -1251,7 +1251,11 @@ void save_compressed(string name) {
|
|||||||
int id = p.second;
|
int id = p.second;
|
||||||
saved_id[id] = index++;
|
saved_id[id] = index++;
|
||||||
auto& vd = vdata[id];
|
auto& vd = vdata[id];
|
||||||
hwrite_raw(f, vd.cp);
|
struct colorpair_old { color_t color1, color2; char shade; } cpo;
|
||||||
|
cpo.color1 = vd.cp.color1;
|
||||||
|
cpo.color2 = vd.cp.color2;
|
||||||
|
cpo.shade = vd.cp.shade;
|
||||||
|
hwrite_raw(f, cpo);
|
||||||
}
|
}
|
||||||
// save edge types
|
// save edge types
|
||||||
f.write<int>(isize(edgetypes));
|
f.write<int>(isize(edgetypes));
|
||||||
@ -1308,7 +1312,11 @@ void load_compressed(string name) {
|
|||||||
vdata.emplace_back();
|
vdata.emplace_back();
|
||||||
auto& v = vdata.back();
|
auto& v = vdata.back();
|
||||||
v.name = data[i].name;
|
v.name = data[i].name;
|
||||||
hread_raw(f, v.cp);
|
struct colorpair_old { color_t color1, color2; char shade; } cpo;
|
||||||
|
hread_raw(f, cpo);
|
||||||
|
v.cp.color1 = cpo.color1;
|
||||||
|
v.cp.color2 = cpo.color2;
|
||||||
|
v.cp.shade = cpo.shade;
|
||||||
createViz(i, cwt.at, Id);
|
createViz(i, cwt.at, Id);
|
||||||
v.m->store();
|
v.m->store();
|
||||||
id++;
|
id++;
|
||||||
|
Loading…
Reference in New Issue
Block a user