mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Several small fixes.
This commit is contained in:
parent
6014d37bed
commit
097923f5ff
7 changed files with 314 additions and 93 deletions
|
|
@ -25,6 +25,10 @@ public static class TexFileParser
|
|||
}
|
||||
|
||||
meta.MipLevels = CountMipLevels( data, in meta, in header );
|
||||
if( meta.MipLevels == 0 )
|
||||
{
|
||||
throw new Exception( "Could not load file. Image is corrupted and does not contain enough data for its size." );
|
||||
}
|
||||
|
||||
var scratch = ScratchImage.Initialize( meta );
|
||||
|
||||
|
|
@ -142,7 +146,9 @@ public static class TexFileParser
|
|||
}
|
||||
|
||||
for( ; idx < 13; ++idx )
|
||||
{
|
||||
header.OffsetToSurface[ idx ] = 0;
|
||||
}
|
||||
|
||||
header.LodOffset[ 0 ] = 0;
|
||||
header.LodOffset[ 1 ] = 1;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public sealed class Texture : IDisposable
|
|||
|
||||
try
|
||||
{
|
||||
var _ = System.IO.Path.GetExtension( Path ) switch
|
||||
var _ = System.IO.Path.GetExtension( Path ).ToLowerInvariant() switch
|
||||
{
|
||||
".dds" => LoadDds(),
|
||||
".png" => LoadPng(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue