1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Clean up many other coordinates

This commit is contained in:
Gymnasiast
2020-03-13 12:03:43 +01:00
parent 3412c47a9e
commit bdf681f440
32 changed files with 132 additions and 172 deletions

View File

@@ -230,7 +230,7 @@ void mapgen_generate(mapgen_settings* settings)
map_reorganise_elements();
}
static void mapgen_place_tree(int32_t type, int32_t x, int32_t y)
static void mapgen_place_tree(int32_t type, const CoordsXY& loc)
{
rct_scenery_entry* sceneryEntry = get_small_scenery_entry(type);
if (sceneryEntry == nullptr)
@@ -238,8 +238,6 @@ static void mapgen_place_tree(int32_t type, int32_t x, int32_t y)
return;
}
auto loc = CoordsXY(x, y);
int32_t surfaceZ = tile_element_height(loc.ToTileCentre());
TileElement* tileElement = tile_element_insert({ loc, surfaceZ }, 0b1111);
assert(tileElement != nullptr);
@@ -382,7 +380,7 @@ static void mapgen_place_trees()
}
if (type != -1)
mapgen_place_tree(type, pos.x, pos.y);
mapgen_place_tree(type, pos.ToCoordsXY());
}
}