changeset 5673:397c30519888 draft

(svn r8133) -Fix [FS#535]: "out of sprite memory" warning messages due to incorrect assumption of requested memory for sprites (smatz)
author Darkvater <Darkvater@openttd.org>
date Sun, 14 Jan 2007 21:50:56 +0000
parents e6ba5c304b87
children a9b2df5251d6
files src/viewport.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1293,7 +1293,7 @@
 // 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);