diff options
author | Darkvater <darkvater@openttd.org> | 2007-01-14 21:50:56 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2007-01-14 21:50:56 +0000 |
commit | aee29710bd7d156373dc02356e3f5a16acb694e3 (patch) | |
tree | 015369d6bd4abcf6fabfb678d2159566673eb114 | |
parent | e4d4e13e15385ea6628c8d6ae54a697ad69f8dc9 (diff) | |
download | openttd-aee29710bd7d156373dc02356e3f5a16acb694e3.tar.xz |
(svn r8133) -Fix [FS#535]: "out of sprite memory" warning messages due to incorrect assumption of requested memory for sprites (smatz)
-rw-r--r-- | src/viewport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 46d9d77c9..5d9b395e9 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1293,7 +1293,7 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom // If we do, the sprite memory will overflow. static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom) { - if (((bottom - top) * (right - left) << vp->zoom) > 180000) { + if (((bottom - top) * (right - left) << (2 * vp->zoom)) > 180000) { if ((bottom - top) > (right - left)) { int t = (top + bottom) >> 1; ViewportDrawChk(vp, left, top, right, t); |