mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 12:49:17 +00:00
locations:: null movei
This commit is contained in:
parent
7e46b4b5bb
commit
f8fb7d5950
@ -469,6 +469,7 @@ constexpr int NO_SPACE = 197;
|
||||
constexpr int TELEPORT = 196;
|
||||
constexpr int JUMP = 195;
|
||||
constexpr int STAY = 194;
|
||||
constexpr int NOMOVEI = 193;
|
||||
|
||||
namespace whirlwind { cell *jumpDestination(cell*); }
|
||||
|
||||
@ -491,6 +492,7 @@ struct movei {
|
||||
}
|
||||
movei(cell *_s, cell *_t, int _d) : s(_s), t(_t), d(_d) {}
|
||||
movei(cellwalker cw) : s(cw.at), t(cw.cpeek()), d(cw.spin) {}
|
||||
movei(nullptr_t) : s(nullptr), t(nullptr), d(NOMOVEI) {}
|
||||
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; }
|
||||
|
Loading…
Reference in New Issue
Block a user