Add a minimum visible height and no ground tile parameter to DrawTileProc.

Filter out tile parts which are entirely outside the drawing area.
This commit is contained in:
Jonathan G Rennison
2020-02-26 21:15:42 +00:00
parent 8ef367b126
commit 7949de2c05
13 changed files with 41 additions and 27 deletions

View File

@@ -70,11 +70,16 @@ struct TileDesc {
uint16 tram_speed; ///< Speed limit of tram (bridges and track)
};
struct DrawTileProcParams {
int min_visible_height;
bool no_ground_tiles;
};
/**
* Tile callback function signature for drawing a tile and its contents to the screen
* @param ti Information about the tile to draw
*/
typedef void DrawTileProc(TileInfo *ti);
typedef void DrawTileProc(TileInfo *ti, DrawTileProcParams params);
typedef int GetSlopeZProc(TileIndex tile, uint x, uint y);
typedef CommandCost ClearTileProc(TileIndex tile, DoCommandFlag flags);