Codechange: Simplify marking tiles dirty when terraforming (Patch by adf88, #6583)
This commit is contained in:
committed by
Niels Martin Hansen
parent
f744dea0ff
commit
05da5a177c
@@ -15,7 +15,7 @@
|
||||
#include "gfx_type.h"
|
||||
#include "viewport_type.h"
|
||||
#include "window_type.h"
|
||||
#include "tile_type.h"
|
||||
#include "tile_map.h"
|
||||
#include "station_type.h"
|
||||
|
||||
static const int TILE_HEIGHT_STEP = 50; ///< One Z unit tile height difference is displayed as 50m.
|
||||
@@ -78,9 +78,18 @@ void UpdateAllVirtCoords();
|
||||
|
||||
extern Point _tile_fract_coords;
|
||||
|
||||
void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset = 0);
|
||||
void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset, int tile_height_override);
|
||||
|
||||
void MarkTileDirtyByTileOutsideMap(int x, int y);
|
||||
/**
|
||||
* Mark a tile given by its index dirty for repaint.
|
||||
* @param tile The tile to mark dirty.
|
||||
* @param bridge_level_offset Height of bridge on tile to also mark dirty. (Height level relative to north corner.)
|
||||
* @ingroup dirty
|
||||
*/
|
||||
static inline void MarkTileDirtyByTile(TileIndex tile, int bridge_level_offset = 0)
|
||||
{
|
||||
MarkTileDirtyByTile(tile, bridge_level_offset, TileHeight(tile));
|
||||
}
|
||||
|
||||
Point GetViewportStationMiddle(const ViewPort *vp, const Station *st);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user