summaryrefslogtreecommitdiff
path: root/smallmap_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-03 12:56:22 +0000
committertron <tron@openttd.org>2005-01-03 12:56:22 +0000
commit32bfe0dddde81d016cb8de15e6a41bca3506d7be (patch)
tree04b3f2dd580a9cd8387358c91a0cfcf95a525153 /smallmap_gui.c
parent4c14afba4eae4bbfe3d448eeaa072e11b326c78a (diff)
downloadopenttd-32bfe0dddde81d016cb8de15e6a41bca3506d7be.tar.xz
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
While here replace one erroneous TILE_MAX_X with MapMaxY()
Diffstat (limited to 'smallmap_gui.c')
-rw-r--r--smallmap_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c
index 880ff40d4..3e0e8f44c 100644
--- a/smallmap_gui.c
+++ b/smallmap_gui.c
@@ -356,7 +356,7 @@ static inline uint32 GetSmallMapCountoursPixels(uint tile)
static void DrawSmallMapContours(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
if (dst > _screen.dst_ptr && dst < (_screen.dst_ptr + _screen.width * _screen.height - _screen.width) )
WRITE_PIXELS_OR( dst, GetSmallMapCountoursPixels(TILE_XY(xc,yc)) & mask );
} while (xc++,yc++,dst+=pitch,--reps != 0);
@@ -386,7 +386,7 @@ static inline uint32 GetSmallMapVehiclesPixels(uint tile)
static void DrawSmallMapVehicles(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
WRITE_PIXELS_OR( dst, GetSmallMapVehiclesPixels(TILE_XY(xc,yc)) & mask );
} while (xc++,yc++,dst+=pitch,--reps != 0);
}
@@ -443,7 +443,7 @@ static inline uint32 GetSmallMapIndustriesPixels(uint tile)
static void DrawSmallMapIndustries(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
WRITE_PIXELS_OR(dst, GetSmallMapIndustriesPixels(TILE_XY(xc,yc)) & mask);
} while (xc++,yc++,dst+=pitch,--reps != 0);
}
@@ -484,7 +484,7 @@ static inline uint32 GetSmallMapRoutesPixels(uint tile)
static void DrawSmallMapRoutes(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
WRITE_PIXELS_OR(dst, GetSmallMapRoutesPixels(TILE_XY(xc,yc)) & mask);
} while (xc++,yc++,dst+=pitch,--reps != 0);
}
@@ -542,7 +542,7 @@ static inline uint32 GetSmallMapVegetationPixels(uint tile)
static void DrawSmallMapVegetation(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
WRITE_PIXELS_OR(dst, GetSmallMapVegetationPixels(TILE_XY(xc,yc)) & mask);
} while (xc++,yc++,dst+=pitch,--reps != 0);
}
@@ -570,7 +570,7 @@ static inline uint32 GetSmallMapOwnerPixels(uint tile)
static void DrawSmallMapOwners(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask)
{
do {
- if (xc < TILE_X_MAX && yc < TILE_Y_MAX)
+ if (xc < MapMaxX() && yc < MapMaxY())
WRITE_PIXELS_OR(dst, GetSmallMapOwnerPixels(TILE_XY(xc,yc)) & mask);
} while (xc++,yc++,dst+=pitch,--reps != 0);
}