diff options
author | rubidium <rubidium@openttd.org> | 2007-06-21 19:08:47 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-21 19:08:47 +0000 |
commit | 0b34c9aefe342c6ffe11d2d4720d7c06c157e04d (patch) | |
tree | d3371ccdafc2ee276ac7c5cecc77a905283e656d /src/viewport.cpp | |
parent | fb7964e90270d4471774a4625e5ef03dd7a6eae2 (diff) | |
download | openttd-0b34c9aefe342c6ffe11d2d4720d7c06c157e04d.tar.xz |
(svn r10262) -Fix (r10258): some places that needed to be changed to uint64 were hidden/forgotten, which caused memory corruptions and that in caused all kinds of assertions to trigger.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 11f97db7d..14dc7a37d 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -58,7 +58,7 @@ struct StringSpriteToDraw { StringSpriteToDraw *next; int32 x; int32 y; - uint32 params[2]; + uint64 params[2]; uint16 width; }; @@ -580,7 +580,7 @@ void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y) } /* Returns a StringSpriteToDraw */ -void *AddStringToDraw(int x, int y, StringID string, uint32 params_1, uint32 params_2) +void *AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2) { ViewportDrawer *vd = _cur_vd; StringSpriteToDraw *ss; @@ -2028,7 +2028,7 @@ void VpSetPlaceSizingLimit(int limit) * @param to TileIndex of the last tile to highlight */ void VpSetPresizeRange(TileIndex from, TileIndex to) { - uint distance = DistanceManhattan(from, to) + 1; + uint64 distance = DistanceManhattan(from, to) + 1; _thd.selend.x = TileX(to) * TILE_SIZE; _thd.selend.y = TileY(to) * TILE_SIZE; @@ -2304,7 +2304,7 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth TileIndex t1 = TileVirtXY(x, y); uint distance = DistanceManhattan(t0, t1) + 1; byte index = 0; - uint params[2]; + uint64 params[2]; if (distance != 1) { int heightdiff = CalcHeightdiff(b, distance, t0, t1); @@ -2383,7 +2383,7 @@ calc_heightdiff_single_direction:; TileIndex t1 = TileVirtXY(x, y); uint distance = DistanceManhattan(t0, t1) + 1; byte index = 0; - uint params[2]; + uint64 params[2]; if (distance != 1) { /* With current code passing a HT_LINE style to calculate the height @@ -2416,7 +2416,7 @@ calc_heightdiff_single_direction:; uint dx = delta(TileX(t0), TileX(t1)) + 1; uint dy = delta(TileY(t0), TileY(t1)) + 1; byte index = 0; - uint params[3]; + uint64 params[3]; /* If dragging an area (eg dynamite tool) and it is actually a single * row/column, change the type to 'line' to get proper calculation for height */ |