Formatting
This commit is contained in:
@@ -1257,8 +1257,7 @@ void erase_out_specials() {
|
||||
}
|
||||
}
|
||||
|
||||
void erase_hidden_towns(cOutdoors& sector, int quadrant_x, int quadrant_y)
|
||||
{
|
||||
void erase_hidden_towns(cOutdoors& sector, int quadrant_x, int quadrant_y) {
|
||||
for(short tile_index = 0; tile_index < sector.city_locs.size(); tile_index++) {
|
||||
auto city_loc = sector.city_locs[tile_index];
|
||||
if(!univ.scenario.is_town_entrance_valid(city_loc) ||
|
||||
@@ -1279,8 +1278,7 @@ void erase_hidden_towns(cOutdoors& sector, int quadrant_x, int quadrant_y)
|
||||
}
|
||||
}
|
||||
|
||||
void erase_completed_specials(cOutdoors& sector)
|
||||
{
|
||||
void erase_completed_specials(cOutdoors& sector) {
|
||||
for(auto tile_index = 0; tile_index < sector.special_locs.size(); tile_index++) {
|
||||
if(sector.special_locs[tile_index].spec < 0 ||
|
||||
sector.special_locs[tile_index].spec >= sector.specials.size())
|
||||
@@ -1300,8 +1298,7 @@ void erase_completed_specials(cOutdoors& sector)
|
||||
}
|
||||
}
|
||||
|
||||
bool does_location_have_special(cOutdoors& sector, location loc, eTerSpec special)
|
||||
{
|
||||
bool does_location_have_special(cOutdoors& sector, location loc, eTerSpec special) {
|
||||
auto terrain_index = sector.terrain[loc.x][loc.y];
|
||||
return univ.scenario.ter_types[terrain_index].special == special;
|
||||
}
|
||||
|
@@ -43,8 +43,7 @@ public:
|
||||
, maps(dim, boost::dynamic_bitset<>(dim))
|
||||
{}
|
||||
|
||||
bool is_on_map(location loc) const
|
||||
{
|
||||
bool is_on_map(location loc) const {
|
||||
return loc.x < max_dim && loc.y < max_dim && loc.x >= 0 && loc.y >= 0;
|
||||
}
|
||||
};
|
||||
|
@@ -529,13 +529,11 @@ cItem cScenario::return_treasure(int loot, bool allow_junk) {
|
||||
return treas;
|
||||
}
|
||||
|
||||
cOutdoors& cScenario::get_sector(int x, int y)
|
||||
{
|
||||
cOutdoors& cScenario::get_sector(int x, int y) {
|
||||
return *outdoors[x][y];
|
||||
}
|
||||
|
||||
bool cScenario::is_town_entrance_valid(spec_loc_t loc) const
|
||||
{
|
||||
bool cScenario::is_town_entrance_valid(spec_loc_t loc) const {
|
||||
auto towns_in_scenario = towns.size();
|
||||
return loc.spec >= 0 && loc.spec < towns_in_scenario;
|
||||
}
|
||||
|
Reference in New Issue
Block a user