1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-24 02:17:40 +00:00

fixed crashes caused by missing rev_dir

This commit is contained in:
Zeno Rogue
2020-12-25 06:07:30 +01:00
parent f2e9b371ff
commit e13172f9ab
4 changed files with 9 additions and 6 deletions

View File

@@ -452,6 +452,8 @@ inline cellwalker operator+ (heptspin hs, cth_t) { return cellwalker(hs.at->c7,
#endif
EX bool proper(cell *c, int d) { return d >= 0 && d < c->type; }
#if HDR
constexpr int STRONGWIND = 99;
@@ -485,7 +487,8 @@ struct movei {
movei rev() const { return movei(t, s, rev_dir_or(d)); }
int dir_or(int x) const { return proper() ? d : x; }
int rev_dir_or(int x) const { return proper() ? s->c.spin(d) : x; }
int rev_dir() const { return s->c.spin(d); }
int rev_dir_mirror() const { return proper() ? s->c.spin(d) : d; }
int rev_dir_force() const { hassert(proper()); return s->c.spin(d); }
bool mirror() { return s->c.mirror(d); }
};
#endif