mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
wrap invalid texture sizes, seems to fix bad textures in srally2 (skid marks)
This commit is contained in:
parent
7ec7906c0f
commit
c459772f8e
|
@ -168,11 +168,24 @@ bool PolyHeader::TexVMirror()
|
||||||
|
|
||||||
int PolyHeader::TexWidth()
|
int PolyHeader::TexWidth()
|
||||||
{
|
{
|
||||||
return 32 << ((header[3] >> 3) & 7);
|
UINT32 w = (header[3] >> 3) & 7;
|
||||||
|
|
||||||
|
if (w >= 6) {
|
||||||
|
w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 32 << w;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PolyHeader::TexHeight()
|
int PolyHeader::TexHeight()
|
||||||
{
|
{
|
||||||
return 32 << ((header[3] >> 0) & 7);
|
UINT32 h = (header[3] >> 0) & 7;
|
||||||
|
|
||||||
|
if (h >= 6) {
|
||||||
|
h = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 32 << h;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue