diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 11:30:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 11:30:37 +0000 |
commit | 19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3 (patch) | |
tree | e0fd85356bbcae38f6b50b8e7bc9470156b81e2d /src/object_cmd.cpp | |
parent | 643c54d288e091adf386bacd3615991e24e8909f (diff) | |
download | openttd-19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3.tar.xz |
(svn r23106) -Codechange: pass int* to GetTileSlope and friends
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r-- | src/object_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index a023162d6..722cb6893 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -230,7 +230,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 /* So, now the surface is checked... check the slope of said surface. */ int allowed_z; - if (GetTileSlope(tile, (uint*)&allowed_z) != SLOPE_FLAT) allowed_z++; + if (GetTileSlope(tile, &allowed_z) != SLOPE_FLAT) allowed_z++; TILE_AREA_LOOP(t, ta) { uint16 callback = CALLBACK_FAILED; @@ -384,7 +384,7 @@ static void DrawTile_Object(TileInfo *ti) static uint GetSlopePixelZ_Object(TileIndex tile, uint x, uint y) { if (IsOwnedLand(tile)) { - uint z; + int z; Slope tileh = GetTilePixelSlope(tile, &z); return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh); @@ -642,7 +642,7 @@ void GenerateObjects() for (uint i = ScaleByMapSize(1000); i != 0 && Object::CanAllocateItem(); i--) { TileIndex tile = RandomTile(); - uint h; + int h; if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h >= 4 && !IsBridgeAbove(tile)) { TileIndex t = tile; if (CircularTileSearch(&t, 9, HasTransmitter, NULL)) continue; @@ -679,7 +679,7 @@ void GenerateObjects() if (!IsTileType(tile, MP_WATER)) continue; for (int j = 0; j < 19; j++) { - uint h; + int h; if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h <= 2 && !IsBridgeAbove(tile)) { BuildObject(OBJECT_LIGHTHOUSE, tile); IncreaseGeneratingWorldProgress(GWP_OBJECT); |