From cbdac759b3bf1fae7a9cb5b120576f56b4e634ac Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Fri, 4 Nov 2022 17:09:01 +0100 Subject: [PATCH] Some small fixes. --- Penumbra/Import/MetaFileInfo.cs | 2 +- Penumbra/Import/TexToolsStructs.cs | 1 - Penumbra/Import/Textures/CombinedTexture.cs | 4 ++-- Penumbra/Penumbra.cs | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Penumbra/Import/MetaFileInfo.cs b/Penumbra/Import/MetaFileInfo.cs index 3fe881bc..11a6664b 100644 --- a/Penumbra/Import/MetaFileInfo.cs +++ b/Penumbra/Import/MetaFileInfo.cs @@ -55,7 +55,7 @@ public class MetaFileInfo public MetaFileInfo( string fileName ) { // Set the primary type from the gamePath start. - PrimaryType = GameData.GameData.GetGamePathParser().PathToObjectType( fileName ); + PrimaryType = Penumbra.GamePathParser.PathToObjectType( fileName ); PrimaryId = 0; SecondaryType = BodySlot.Unknown; SecondaryId = 0; diff --git a/Penumbra/Import/TexToolsStructs.cs b/Penumbra/Import/TexToolsStructs.cs index bc85893c..1e92d1a4 100644 --- a/Penumbra/Import/TexToolsStructs.cs +++ b/Penumbra/Import/TexToolsStructs.cs @@ -1,6 +1,5 @@ using System; using Penumbra.Api.Enums; -using Penumbra.Mods; namespace Penumbra.Import; diff --git a/Penumbra/Import/Textures/CombinedTexture.cs b/Penumbra/Import/Textures/CombinedTexture.cs index ecbf9caa..c3065186 100644 --- a/Penumbra/Import/Textures/CombinedTexture.cs +++ b/Penumbra/Import/Textures/CombinedTexture.cs @@ -16,7 +16,7 @@ public partial class CombinedTexture : IDisposable { AsIs, Bitmap, - BC5, + BC3, BC7, } @@ -93,7 +93,7 @@ public partial class CombinedTexture : IDisposable { TextureSaveType.AsIs => _current.Type is Texture.FileType.Bitmap or Texture.FileType.Png ? CreateUncompressed( s, mipMaps ) : s, TextureSaveType.Bitmap => CreateUncompressed( s, mipMaps ), - TextureSaveType.BC5 => CreateCompressed( s, mipMaps, false ), + TextureSaveType.BC3 => CreateCompressed( s, mipMaps, false ), TextureSaveType.BC7 => CreateCompressed( s, mipMaps, true ), _ => throw new ArgumentOutOfRangeException( nameof( type ), type, null ), }; diff --git a/Penumbra/Penumbra.cs b/Penumbra/Penumbra.cs index 3633adbd..f54b189f 100644 --- a/Penumbra/Penumbra.cs +++ b/Penumbra/Penumbra.cs @@ -60,6 +60,7 @@ public class Penumbra : IDalamudPlugin public static FrameworkManager Framework { get; private set; } = null!; public static ActorManager Actors { get; private set; } = null!; public static IObjectIdentifier Identifier { get; private set; } = null!; + public static IGamePathParser GamePathParser { get; private set; } = null!; public static readonly List< Exception > ImcExceptions = new(); @@ -83,6 +84,7 @@ public class Penumbra : IDalamudPlugin Dalamud.Initialize( pluginInterface ); Log = new Logger(); Identifier = GameData.GameData.GetIdentifier( Dalamud.PluginInterface, Dalamud.GameData ); + GamePathParser = GameData.GameData.GetGamePathParser(); DevPenumbraExists = CheckDevPluginPenumbra(); IsNotInstalledPenumbra = CheckIsNotInstalled();