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

Method CanDisembarkShip

src/game_map.cpp:988–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986}
987
988bool Game_Map::CanDisembarkShip(Game_Player& player, int x, int y) {
989 if (!Game_Map::IsValid(x, y)) {
990 return false;
991 }
992
993 for (auto& ev: GetEvents()) {
994 if (ev.IsInPosition(x, y)
995 && ev.GetLayer() == lcf::rpg::EventPage::Layers_same
996 && ev.IsActive()
997 && ev.GetActivePage() != nullptr) {
998 return false;
999 }
1000 }
1001
1002 int bit = GetPassableMask(x, y, player.GetX(), player.GetY());
1003
1004 return IsPassableTile(nullptr, bit, x, y);
1005}
1006
1007bool Game_Map::IsPassableLowerTile(int bit, int tile_index) {
1008 int tile_raw_id = map->lower_layer[tile_index];

Callers

nothing calls this directly

Calls 7

GetPassableMaskFunction · 0.85
GetLayerMethod · 0.80
GetActivePageMethod · 0.80
IsInPositionMethod · 0.45
IsActiveMethod · 0.45
GetXMethod · 0.45
GetYMethod · 0.45

Tested by

no test coverage detected