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

Method SetupBattle

src/game_map.cpp:1649–1663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1647}
1648
1649void Game_Map::SetupBattle(BattleArgs& args) {
1650 int x = Main_Data::game_player->GetX();
1651 int y = Main_Data::game_player->GetY();
1652
1653 args.terrain_id = GetTerrainTag(x, y);
1654
1655 const auto* current_info = &GetMapInfo();
1656 while (current_info->background_type == 0 && GetParentMapInfo(*current_info).ID != current_info->ID) {
1657 current_info = &GetParentMapInfo(*current_info);
1658 }
1659
1660 if (current_info->background_type == 2) {
1661 args.background = ToString(current_info->background_name);
1662 }
1663}
1664
1665std::vector<short>& Game_Map::GetMapDataDown() {
1666 return map->lower_layer;

Callers

nothing calls this directly

Calls 2

GetXMethod · 0.45
GetYMethod · 0.45

Tested by

no test coverage detected