mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
"Fix" for some Sparks of Hope textures (#548)
* i dont get it * fix textures that dont have the extra data
This commit is contained in:
parent
d55f738297
commit
6839d90a9b
3 changed files with 13 additions and 0 deletions
Binary file not shown.
Binary file not shown.
|
@ -581,6 +581,19 @@ namespace Toolbox.Library
|
|||
}
|
||||
|
||||
reader.TemporarySeek((int)(4 + header.size + DX10HeaderSize), SeekOrigin.Begin);
|
||||
var UbiExtraData = reader.ReadUInt16();
|
||||
reader.TemporarySeek(-2, SeekOrigin.Current);
|
||||
if (UbiExtraData == 12816 || UbiExtraData == 1331 && IsDX10) //me when ubisoft | for some reason theres some extra data on some mario rabbids textures god knows what it is
|
||||
{
|
||||
if (header.width == 1024 && header.height == 1024)
|
||||
{
|
||||
reader.TemporarySeek((int)(4 + 30 + header.size + DX10HeaderSize), SeekOrigin.Begin);
|
||||
}
|
||||
if (header.width == 512 && header.height == 512)
|
||||
{
|
||||
reader.TemporarySeek((int)(4 + 26 + header.size + DX10HeaderSize), SeekOrigin.Begin);
|
||||
}
|
||||
}
|
||||
bdata = reader.ReadBytes((int)(reader.BaseStream.Length - reader.BaseStream.Position));
|
||||
|
||||
Format = GetFormat();
|
||||
|
|
Loading…
Reference in a new issue