mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 11:23:21 +00:00
(svn r8181) -Backport from trunk (r8133):
- (FS#535) "out of sprite memory" warning messages (smatz)
This commit is contained in:
parent
ac3b1883ed
commit
a74b15af79
@ -1294,7 +1294,7 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
|
|||||||
// If we do, the sprite memory will overflow.
|
// If we do, the sprite memory will overflow.
|
||||||
static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom)
|
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)) {
|
if ((bottom - top) > (right - left)) {
|
||||||
int t = (top + bottom) >> 1;
|
int t = (top + bottom) >> 1;
|
||||||
ViewportDrawChk(vp, left, top, right, t);
|
ViewportDrawChk(vp, left, top, right, t);
|
||||||
|
Loading…
Reference in New Issue
Block a user