summaryrefslogtreecommitdiff
path: root/smallmap_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-15 14:16:14 +0000
committertron <tron@openttd.org>2005-07-15 14:16:14 +0000
commit8f71864bef912a9cd8b8f649c5acbe638d48fc24 (patch)
tree37a7c3272357635a96d29652c78fbc738b0c782d /smallmap_gui.c
parentb21ee889fec9b8d197692969855cb54675edfa6d (diff)
downloadopenttd-8f71864bef912a9cd8b8f649c5acbe638d48fc24.tar.xz
(svn r2571) Add explicit type Pixel for ... Pixels
Diffstat (limited to 'smallmap_gui.c')
-rw-r--r--smallmap_gui.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c
index 540917179..2a69cfc96 100644
--- a/smallmap_gui.c
+++ b/smallmap_gui.c
@@ -190,9 +190,8 @@ static const uint16 * const _legend_table[] = {
};
#if defined(TTD_ALIGNMENT_4)
- static inline void WRITE_PIXELS(void *dst, uint32 val)
+ static inline void WRITE_PIXELS(Pixel* d, uint32 val)
{
- byte *d = (byte*)dst;
# if defined(TTD_BIG_ENDIAN)
d[0] = (byte)(val >> 24);
d[1] = (byte)(val >> 16);
@@ -207,9 +206,8 @@ static const uint16 * const _legend_table[] = {
}
/* need to use OR, otherwise we will overwrite the wrong pixels at the edges :( */
- static inline void WRITE_PIXELS_OR(void *dst, uint32 val)
+ static inline void WRITE_PIXELS_OR(Pixel* d, uint32 val)
{
- byte *d = (byte*)dst;
# if defined(TTD_BIG_ENDIAN)
d[0] |= (byte)(val >> 24);
d[1] |= (byte)(val >> 16);
@@ -324,9 +322,9 @@ typedef uint32 GetSmallMapPixels(TileIndex tile); // typedef callthrough functio
* @param proc Pointer to the colour function
* @see GetSmallMapPixels(TileIndex)
*/
-static void DrawSmallMapStuff(byte *dst, uint xc, uint yc, int pitch, int reps, uint32 mask, GetSmallMapPixels *proc)
+static void DrawSmallMapStuff(Pixel *dst, uint xc, uint yc, int pitch, int reps, uint32 mask, GetSmallMapPixels *proc)
{
- byte *dst_ptr_end = _screen.dst_ptr + _screen.width * _screen.height - _screen.width;
+ Pixel *dst_ptr_end = _screen.dst_ptr + _screen.width * _screen.height - _screen.width;
do {
// check if the tile (xc,yc) is within the map range
@@ -589,7 +587,7 @@ static void DrawSmallMap(DrawPixelInfo *dpi, Window *w, int type, bool show_town
{
DrawPixelInfo *old_dpi;
int dx,dy, x, y, x2, y2;
- byte *ptr;
+ Pixel *ptr;
int tile_x;
int tile_y;
ViewPort *vp;