From 7a51cb2aef3275f85bf0ca919fdd9cc32b335713 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 3 Jan 2005 08:50:44 +0000 Subject: (svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows --- viewport.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'viewport.c') 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; -- cgit v1.2.3-54-g00ecf