MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MakeClear

Function MakeClear

src/clear_map.h:247–259  ·  view source on GitHub ↗

* Make a clear tile. * @param t the tile to make a clear tile * @param g the type of ground * @param density the density of the grass/snow/desert etc */

Source from the content-addressed store, hash-verified

245 * @param density the density of the grass/snow/desert etc
246 */
247inline void MakeClear(Tile t, ClearGround g, uint density)
248{
249 SetTileType(t, MP_CLEAR);
250 t.m1() = 0;
251 SetTileOwner(t, OWNER_NONE);
252 t.m2() = 0;
253 t.m3() = 0;
254 t.m4() = 0 << 5 | 0 << 2;
255 SetClearGroundDensity(t, g, density); // Sets m5
256 t.m6() = 0;
257 t.m7() = 0;
258 t.m8() = 0;
259}
260
261
262/**

Callers 12

GenerateRockyAreaFunction · 0.85
DoDryUpFunction · 0.85
DoClearSquareFunction · 0.85
InitializeLandscapeFunction · 0.85
GreyscaleToMapHeightsFunction · 0.85
FixSlopesFunction · 0.85
TileLoop_ClearFunction · 0.85
TileLoop_TreesFunction · 0.85
TgenSetTileHeightFunction · 0.85
FixOwnerOfRailTrackFunction · 0.85
AfterLoadGameFunction · 0.85

Calls 3

SetTileTypeFunction · 0.85
SetTileOwnerFunction · 0.85
SetClearGroundDensityFunction · 0.85

Tested by

no test coverage detected