mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
Fix the sky in advanced stage in Dirt Devils. It uses a massive (for 1998 :p) 1024x256 texture.
This commit is contained in:
parent
c3581c9fe8
commit
c472d90fb9
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue