Fix the sky in advanced stage in Dirt Devils. It uses a massive (for 1998 :p) 1024x256 texture.

This commit is contained in:
Ian Curtis 2016-10-06 20:10:45 +00:00
parent c3581c9fe8
commit c472d90fb9
2 changed files with 4 additions and 4 deletions

View file

@ -221,7 +221,7 @@ void CLegacy3D::DecodeTexture(int format, int x, int y, int width, int height)
if ((x+width)>2048 || (y+height)>2048) if ((x+width)>2048 || (y+height)>2048)
return; return;
if (width > 512 || height > 512) if (width > 1024 || height > 1024)
{ {
//ErrorLog("Encountered a texture that is too large (%d,%d,%d,%d)", x, y, width, height); //ErrorLog("Encountered a texture that is too large (%d,%d,%d,%d)", x, y, width, height);
return; return;

View file

@ -22,11 +22,11 @@ std::shared_ptr<Texture> TextureSheet::BindTexture(const UINT16* src, int format
y &= 2047; y &= 2047;
if ((x + width) > 2048 || (y + height) > 2048) { if ((x + width) > 2048 || (y + height) > 2048) {
return 0; return nullptr;
} }
if (width > 512 || height > 512) { if (width > 1024 || height > 1024) { // sanity checking
return 0; return nullptr;
} }
index = ToIndex(x, y); index = ToIndex(x, y);