1
0
mirror of synced 2024-11-30 18:24:39 +01: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:
August 2022-11-29 23:32:03 +00:00 committed by GitHub
parent d55f738297
commit 6839d90a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -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();