Codechange: migrate size related functions to Map structure

This commit is contained in:
Rubidium
2023-01-21 10:43:03 +01:00
committed by rubidium42
parent d481f78b24
commit fe2bcd2a58
56 changed files with 334 additions and 343 deletions

View File

@@ -621,8 +621,8 @@ EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type)
*/
EffectVehicle *CreateEffectVehicleAbove(int x, int y, int z, EffectVehicleType type)
{
int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE);
int safe_y = Clamp(y, 0, MapMaxY() * TILE_SIZE);
int safe_x = Clamp(x, 0, Map::MaxX() * TILE_SIZE);
int safe_y = Clamp(y, 0, Map::MaxY() * TILE_SIZE);
return CreateEffectVehicle(x, y, GetSlopePixelZ(safe_x, safe_y) + z, type);
}