1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

manual-animation: save the route in Nil

This commit is contained in:
Zeno Rogue 2020-02-13 11:03:35 +01:00
parent 1e0f8f45b1
commit 541448ca38

View File

@ -161,10 +161,17 @@ void load_animation(string fname) {
hread_raw(f, a);
hread_raw(f, b);
int tmp = 0; hread_raw(f, tmp);
if(cryst) {
crystal::coord co;
hread_raw(f, co);
d = crystal::get_heptagon_at(co)->c7;
}
if(nil) {
nilv::mvec co;
hread_raw(f, co);
d = nilv::get_heptagon_at(co)->c7;
}
}
println(hlog, "loaded animation of ", isize(saved), " frames");
recall();
}
@ -347,9 +354,15 @@ bool trailer_handleKey(int sym, int uni) {
hwrite_raw(f, a);
hwrite_raw(f, b);
int tmp = 0; hwrite_raw(f, tmp);
if(cryst) {
auto at = crystal::get_coord(d->master);
hwrite_raw(f, at);
}
else if(nil) {
auto at = nilv::get_coord(d->master);
hwrite_raw(f, at);
}
}
println(hlog, "saved animation of ", isize(saved), " frames");
}