1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

fixed CLI -picload

This commit is contained in:
Zeno Rogue 2024-05-07 22:19:09 +02:00
parent ba972ea8d8
commit 9ba9797068

View File

@ -2602,16 +2602,16 @@ EX namespace mapeditor {
bool onelayeronly; bool onelayeronly;
bool loadPicFile(const string& s) { bool loadPicFile(const string& s) {
fhstream f(picfile, "rt"); fhstream f(s, "rt");
if(!f.f) { if(!f.f) {
addMessage(XLAT("Failed to load pictures from %1", picfile)); addMessage(XLAT("Failed to load pictures from %1", s));
return false; return false;
} }
scanline(f); scanline(f);
scan(f, f.vernum); scan(f, f.vernum);
printf("vernum = %x\n", f.vernum); printf("vernum = %x\n", f.vernum);
if(f.vernum == 0) { if(f.vernum == 0) {
addMessage(XLAT("Failed to load pictures from %1", picfile)); addMessage(XLAT("Failed to load pictures from %1", s));
return false; return false;
} }
@ -2639,6 +2639,7 @@ EX namespace mapeditor {
} }
initShape(i, j); initShape(i, j);
println(hlog, "shape ", tie(i, j), " layer ", l);
usershapelayer& ds(usershapes[i][j]->d[l]); usershapelayer& ds(usershapes[i][j]->d[l]);
if(f.vernum >= 0xA608) scan(f, ds.zlevel); if(f.vernum >= 0xA608) scan(f, ds.zlevel);
ds.shift = readHyperpoint(f); ds.shift = readHyperpoint(f);