Some small fixes.

This commit is contained in:
Ottermandias 2022-11-04 17:09:01 +01:00
parent 68a725d51d
commit cbdac759b3
4 changed files with 5 additions and 4 deletions

View file

@ -55,7 +55,7 @@ public class MetaFileInfo
public MetaFileInfo( string fileName ) public MetaFileInfo( string fileName )
{ {
// Set the primary type from the gamePath start. // Set the primary type from the gamePath start.
PrimaryType = GameData.GameData.GetGamePathParser().PathToObjectType( fileName ); PrimaryType = Penumbra.GamePathParser.PathToObjectType( fileName );
PrimaryId = 0; PrimaryId = 0;
SecondaryType = BodySlot.Unknown; SecondaryType = BodySlot.Unknown;
SecondaryId = 0; SecondaryId = 0;

View file

@ -1,6 +1,5 @@
using System; using System;
using Penumbra.Api.Enums; using Penumbra.Api.Enums;
using Penumbra.Mods;
namespace Penumbra.Import; namespace Penumbra.Import;

View file

@ -16,7 +16,7 @@ public partial class CombinedTexture : IDisposable
{ {
AsIs, AsIs,
Bitmap, Bitmap,
BC5, BC3,
BC7, 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.AsIs => _current.Type is Texture.FileType.Bitmap or Texture.FileType.Png ? CreateUncompressed( s, mipMaps ) : s,
TextureSaveType.Bitmap => CreateUncompressed( s, mipMaps ), TextureSaveType.Bitmap => CreateUncompressed( s, mipMaps ),
TextureSaveType.BC5 => CreateCompressed( s, mipMaps, false ), TextureSaveType.BC3 => CreateCompressed( s, mipMaps, false ),
TextureSaveType.BC7 => CreateCompressed( s, mipMaps, true ), TextureSaveType.BC7 => CreateCompressed( s, mipMaps, true ),
_ => throw new ArgumentOutOfRangeException( nameof( type ), type, null ), _ => throw new ArgumentOutOfRangeException( nameof( type ), type, null ),
}; };

View file

@ -60,6 +60,7 @@ public class Penumbra : IDalamudPlugin
public static FrameworkManager Framework { get; private set; } = null!; public static FrameworkManager Framework { get; private set; } = null!;
public static ActorManager Actors { get; private set; } = null!; public static ActorManager Actors { get; private set; } = null!;
public static IObjectIdentifier Identifier { 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(); public static readonly List< Exception > ImcExceptions = new();
@ -83,6 +84,7 @@ public class Penumbra : IDalamudPlugin
Dalamud.Initialize( pluginInterface ); Dalamud.Initialize( pluginInterface );
Log = new Logger(); Log = new Logger();
Identifier = GameData.GameData.GetIdentifier( Dalamud.PluginInterface, Dalamud.GameData ); Identifier = GameData.GameData.GetIdentifier( Dalamud.PluginInterface, Dalamud.GameData );
GamePathParser = GameData.GameData.GetGamePathParser();
DevPenumbraExists = CheckDevPluginPenumbra(); DevPenumbraExists = CheckDevPluginPenumbra();
IsNotInstalledPenumbra = CheckIsNotInstalled(); IsNotInstalledPenumbra = CheckIsNotInstalled();