| 1647 | } |
| 1648 | |
| 1649 | void 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 | |
| 1665 | std::vector<short>& Game_Map::GetMapDataDown() { |
| 1666 | return map->lower_layer; |