|
OpenTTD Source 20260311-master-g511d3794ce
|
Commands related to clear tiles. More...
#include "stdafx.h"#include "clear_map.h"#include "command_func.h"#include "landscape.h"#include "genworld.h"#include "viewport_func.h"#include "core/random_func.hpp"#include "newgrf_generic.h"#include "landscape_cmd.h"#include "table/strings.h"#include "table/sprites.h"#include "table/clear_land.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| static CommandCost | ClearTile_Clear (TileIndex tile, DoCommandFlags flags) |
| Tile callback function signature for clearing a tile. | |
| void | DrawClearLandTile (const TileInfo *ti, uint8_t set) |
| void | DrawHillyLandTile (const TileInfo *ti) |
| static void | DrawClearLandFence (const TileInfo *ti) |
| static void | DrawTile_Clear (TileInfo *ti) |
| Tile callback function signature for drawing a tile and its contents to the screen. | |
| static int | GetSlopePixelZ_Clear (TileIndex tile, uint x, uint y, bool ground_vehicle) |
Tile callback function signature for obtaining the world Z coordinate of a given point of a tile. | |
| static void | UpdateFences (TileIndex tile) |
| static void | TileLoopClearAlps (TileIndex tile) |
| Convert to or from snowy tiles. | |
| static bool | NeighbourIsNormal (TileIndex tile) |
| Tests if at least one surrounding tile is non-desert. | |
| static void | TileLoopClearDesert (TileIndex tile) |
| static void | TileLoop_Clear (TileIndex tile) |
| Tile callback function signature for running periodic tile updates. | |
| void | GenerateClearTile () |
| static void | GetTileDesc_Clear (TileIndex tile, TileDesc &td) |
| Tile callback function signature for obtaining a tile description. | |
Variables | |
| const TileTypeProcs | _tile_type_clear_procs |
| TileTypeProcs definitions for TileType::Clear tiles. | |
Commands related to clear tiles.
Definition in file clear_cmd.cpp.
|
static |
Tile callback function signature for clearing a tile.
| tile | The tile to clear. |
| flags | The command flags. |
Definition at line 27 of file clear_cmd.cpp.
References _price, CommandCost::AddCost(), ClearFields, ClearGrass, ClearRocks, ClearRough, Execute, EXPENSES_CONSTRUCTION, GetClearDensity(), GetClearGround(), Grass, IsSnowTile(), MaxSize, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and to_underlying().
|
static |
Definition at line 70 of file clear_cmd.cpp.
| void DrawClearLandTile | ( | const TileInfo * | ti, |
| uint8_t | set ) |
Definition at line 56 of file clear_cmd.cpp.
| void DrawHillyLandTile | ( | const TileInfo * | ti | ) |
Definition at line 61 of file clear_cmd.cpp.
|
static |
Tile callback function signature for drawing a tile and its contents to the screen.
| ti | Information about the tile to draw |
Definition at line 120 of file clear_cmd.cpp.
References Desert, DrawBridgeMiddle(), DrawGroundSprite(), Fields, GetClearDensity(), GetClearGround(), GetFieldType(), GetTropicZone(), Grass, HasGrfMiscBit(), IsSnowTile(), Rocks, Rough, SecondRockyTileSet, SlopeToSpriteOffset(), SPR_OVERLAY_ROCKS_BASE, TileInfo::tile, TileInfo::tileh, TileHash(), TROPICZONE_DESERT, Coord3D< T >::x, and Coord3D< T >::y.
| void GenerateClearTile | ( | ) |
Definition at line 331 of file clear_cmd.cpp.
|
static |
Tile callback function signature for obtaining the world Z coordinate of a given point of a tile.
| tile | The queries tile for the Z coordinate. |
| x | World X coordinate in tile "units". |
| y | World Y coordinate in tile "units". |
| ground_vehicle | Whether to get the Z coordinate of the ground vehicle, or the ground. |
Definition at line 170 of file clear_cmd.cpp.
References GetPartialPixelZ(), and GetTilePixelSlope().
Tile callback function signature for obtaining a tile description.
| tile | Tile being queried |
| td | Storage pointer for returned tile description |
Definition at line 373 of file clear_cmd.cpp.
References GetClearDensity(), GetClearGround(), GetTileOwner(), Grass, IsClearGround(), IsSnowTile(), MaxSize, TileDesc::owner, TileDesc::str, and to_underlying().
|
inlinestatic |
Tests if at least one surrounding tile is non-desert.
| tile | tile to check |
Definition at line 233 of file clear_cmd.cpp.
References DIAGDIR_BEGIN, DIAGDIR_END, GetTropicZone(), GetWaterClass(), HasTileWaterClass(), IsValidTile(), Sea, TileOffsByDiagDir(), and TROPICZONE_DESERT.
|
static |
Tile callback function signature for running periodic tile updates.
| tile | The tile to update. |
Definition at line 273 of file clear_cmd.cpp.
References _settings_game, AddClearCounter(), AddClearDensity(), AmbientSoundEffect(), Arctic, Fields, GB(), GetClearCounter(), GetClearDensity(), GetClearGround(), GetFieldType(), GetIndustryIndexOfField(), Grass, IsSnowTile(), MakeClear(), MarkTileDirtyByTile(), Rough, SetClearCounter(), SetClearGroundDensity(), SetFieldType(), TileLoopClearAlps(), and Tropic.
|
static |
Convert to or from snowy tiles.
| tile | The tile to consider. |
Definition at line 198 of file clear_cmd.cpp.
References AddClearDensity(), ClearSnow(), GetClearDensity(), GetSnowLine(), GetTileZ(), IsSnowTile(), MakeSnow(), and MarkTileDirtyByTile().
Referenced by TileLoop_Clear().
|
static |
Definition at line 244 of file clear_cmd.cpp.
|
static |
Definition at line 177 of file clear_cmd.cpp.
|
extern |
TileTypeProcs definitions for TileType::Clear tiles.