diff options
author | tron <tron@openttd.org> | 2005-01-03 08:50:44 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-03 08:50:44 +0000 |
commit | 29e71638ce1dfa3d86a3b0ddf5b109e4fb0320a9 (patch) | |
tree | 5c567cb4d90a99802939c3df5715fe67cc68f45b /viewport.c | |
parent | 608cdbe3f67b9b05ace108cdf1ab4ffc808c792a (diff) | |
download | openttd-29e71638ce1dfa3d86a3b0ddf5b109e4fb0320a9.tar.xz |
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
Diffstat (limited to 'viewport.c')
-rw-r--r-- | viewport.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/viewport.c b/viewport.c index 3c8d72e92..b6bb6ba03 100644 --- a/viewport.c +++ b/viewport.c @@ -18,8 +18,8 @@ typedef struct StringSpriteToDraw { uint16 string; uint16 color; struct StringSpriteToDraw *next; - int16 x; - int16 y; + int32 x; + int32 y; uint32 params[3]; uint16 width; } StringSpriteToDraw; @@ -27,21 +27,28 @@ typedef struct StringSpriteToDraw { typedef struct TileSpriteToDraw { uint32 image; struct TileSpriteToDraw *next; - int16 x, y; + int32 x; + int32 y; byte z; } TileSpriteToDraw; typedef struct ChildScreenSpriteToDraw { uint32 image; - int16 x,y; + int32 x; + int32 y; struct ChildScreenSpriteToDraw *next; } ChildScreenSpriteToDraw; typedef struct ParentSpriteToDraw { uint32 image; - int16 left, top, right, bottom; - int16 tile_x, tile_y; - int16 tile_right, tile_bottom; + int32 left; + int32 top; + int32 right; + int32 bottom; + int32 tile_x; + int32 tile_y; + int32 tile_right; + int32 tile_bottom; ChildScreenSpriteToDraw *child; byte unk16; byte tile_z; @@ -333,7 +340,7 @@ Point GetTileZoomCenterWindow(bool in, Window * w) return GetTileFromScreenXY(x+vp->left, y+vp->top); } -void DrawGroundSpriteAt(uint32 image, int16 x, int16 y, byte z) +void DrawGroundSpriteAt(uint32 image, int32 x, int32 y, byte z) { ViewportDrawer *vd = _cur_vd; TileSpriteToDraw *ts; |