summaryrefslogtreecommitdiff
path: root/src/landscape.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 11:30:37 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 11:30:37 +0000
commit19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3 (patch)
treee0fd85356bbcae38f6b50b8e7bc9470156b81e2d /src/landscape.cpp
parent643c54d288e091adf386bacd3615991e24e8909f (diff)
downloadopenttd-19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3.tar.xz
(svn r23106) -Codechange: pass int* to GetTileSlope and friends
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r--src/landscape.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index 1c06bb7c7..deff47ba0 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -337,7 +337,7 @@ void GetSlopePixelZOnEdge(Slope tileh, DiagDirection edge, int *z1, int *z2)
* @param z returns the z of the foundation slope. (Can be NULL, if not needed)
* @return The slope on top of the foundation.
*/
-Slope GetFoundationSlope(TileIndex tile, uint *z)
+Slope GetFoundationSlope(TileIndex tile, int *z)
{
Slope tileh = GetTileSlope(tile, z);
Foundation f = _tile_type_procs[GetTileType(tile)]->get_foundation_proc(tile, tileh);
@@ -349,7 +349,7 @@ Slope GetFoundationSlope(TileIndex tile, uint *z)
bool HasFoundationNW(TileIndex tile, Slope slope_here, uint z_here)
{
- uint z;
+ int z;
int z_W_here = z_here;
int z_N_here = z_here;
@@ -366,7 +366,7 @@ bool HasFoundationNW(TileIndex tile, Slope slope_here, uint z_here)
bool HasFoundationNE(TileIndex tile, Slope slope_here, uint z_here)
{
- uint z;
+ int z;
int z_E_here = z_here;
int z_N_here = z_here;
@@ -393,7 +393,7 @@ void DrawFoundation(TileInfo *ti, Foundation f)
assert(f != FOUNDATION_STEEP_BOTH);
uint sprite_block = 0;
- uint z;
+ int z;
Slope slope = GetFoundationPixelSlope(ti->tile, &z);
/* Select the needed block of foundations sprites
@@ -926,7 +926,7 @@ static void CreateDesertOrRainForest()
*/
static bool FindSpring(TileIndex tile, void *user_data)
{
- uint referenceHeight;
+ int referenceHeight;
Slope s = GetTileSlope(tile, &referenceHeight);
if (s != SLOPE_FLAT || IsWaterTile(tile)) return false;
@@ -988,8 +988,8 @@ static bool FlowsDown(TileIndex begin, TileIndex end)
{
assert(DistanceManhattan(begin, end) == 1);
- uint heightBegin;
- uint heightEnd;
+ int heightBegin;
+ int heightEnd;
Slope slopeBegin = GetTileSlope(begin, &heightBegin);
Slope slopeEnd = GetTileSlope(end, &heightEnd);