MCPcopy Create free account
hub / github.com/EasyRPG/Player / GetPassableMask

Function GetPassableMask

src/game_map.cpp:706–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706static int GetPassableMask(int old_x, int old_y, int new_x, int new_y) {
707 int bit = 0;
708 if (new_x > old_x) { bit |= Passable::Right; }
709 if (new_x < old_x) { bit |= Passable::Left; }
710 if (new_y > old_y) { bit |= Passable::Down; }
711 if (new_y < old_y) { bit |= Passable::Up; }
712 return bit;
713}
714
715static bool WouldCollide(const Game_Character& self, const Game_Character& other, bool self_conflict) {
716 if (self.GetThrough() || other.GetThrough()) {

Callers 3

CheckOrMakeWayExMethod · 0.85
CanEmbarkShipMethod · 0.85
CanDisembarkShipMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected