From e66ca7c5805bf23a82b51649e7f5f75baabe4bc7 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Wed, 24 Aug 2022 17:50:52 +0200 Subject: [PATCH] Further fixes. --- Penumbra.GameData/Files/MdlFile.cs | 6 +++--- Penumbra/Interop/CharacterUtility.cs | 6 +++--- Penumbra/Interop/Resolver/PathResolver.AnimationState.cs | 4 ++-- Penumbra/Penumbra.json | 2 +- base_repo.json | 2 +- repo.json | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Penumbra.GameData/Files/MdlFile.cs b/Penumbra.GameData/Files/MdlFile.cs index 5073b80c..e39f612c 100644 --- a/Penumbra.GameData/Files/MdlFile.cs +++ b/Penumbra.GameData/Files/MdlFile.cs @@ -2,6 +2,7 @@ using System; using System.IO; using System.Reflection; using System.Text; +using Lumina.Data; using Lumina.Data.Parsing; using Lumina.Extensions; @@ -87,7 +88,7 @@ public partial class MdlFile : IWritable public MdlFile( byte[] data ) { using var stream = new MemoryStream( data ); - using var r = new BinaryReader( stream ); + using var r = new LuminaBinaryReader( stream ); var header = LoadModelFileHeader( r ); LodCount = header.LodCount; @@ -197,7 +198,7 @@ public partial class MdlFile : IWritable RemainingData = r.ReadBytes( ( int )( r.BaseStream.Length - r.BaseStream.Position ) ); } - private MdlStructs.ModelFileHeader LoadModelFileHeader( BinaryReader r ) + private MdlStructs.ModelFileHeader LoadModelFileHeader( LuminaBinaryReader r ) { var header = MdlStructs.ModelFileHeader.Read( r ); Version = header.Version; @@ -255,5 +256,4 @@ public partial class MdlFile : IWritable public unsafe uint StackSize => ( uint )( VertexDeclarations.Length * NumVertices * sizeof( MdlStructs.VertexElement ) ); - } \ No newline at end of file diff --git a/Penumbra/Interop/CharacterUtility.cs b/Penumbra/Interop/CharacterUtility.cs index fc1de17b..b4632ba6 100644 --- a/Penumbra/Interop/CharacterUtility.cs +++ b/Penumbra/Interop/CharacterUtility.cs @@ -14,11 +14,11 @@ public unsafe class CharacterUtility : IDisposable // Only required for migration anymore. public delegate void LoadResources( Structs.CharacterUtility* address ); - [Signature( "E8 ?? ?? ?? 00 48 8D 8E ?? ?? 00 00 E8 ?? ?? ?? 00 33 D2" )] - public readonly LoadResources? LoadCharacterResourcesFunc; + [Signature( "E8 ?? ?? ?? ?? 48 8D 8F ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 D2 45 33 C0" )] + public readonly LoadResources LoadCharacterResourcesFunc = null!; public void LoadCharacterResources() - => LoadCharacterResourcesFunc?.Invoke( Address ); + => LoadCharacterResourcesFunc.Invoke( Address ); public Structs.CharacterUtility* Address => *_characterUtilityAddress; diff --git a/Penumbra/Interop/Resolver/PathResolver.AnimationState.cs b/Penumbra/Interop/Resolver/PathResolver.AnimationState.cs index b24bb84c..ca282732 100644 --- a/Penumbra/Interop/Resolver/PathResolver.AnimationState.cs +++ b/Penumbra/Interop/Resolver/PathResolver.AnimationState.cs @@ -200,13 +200,13 @@ public unsafe partial class PathResolver _animationLoadCollection = last; } - [Signature( "E8 ?? ?? ?? ?? 44 84 BB", DetourName = nameof( SomeOtherAvfxDetour ) )] + [Signature( "E8 ?? ?? ?? ?? 44 84 A3", DetourName = nameof( SomeOtherAvfxDetour ) )] private readonly Hook< CharacterBaseNoArgumentDelegate > _someOtherAvfxHook = null!; private void SomeOtherAvfxDetour( IntPtr unk ) { var last = _animationLoadCollection; - var gameObject = ( GameObject* )( unk - 0x8B0 ); + var gameObject = ( GameObject* )( unk - 0x8D0 ); _animationLoadCollection = IdentifyCollection( gameObject ); _someOtherAvfxHook.Original( unk ); _animationLoadCollection = last; diff --git a/Penumbra/Penumbra.json b/Penumbra/Penumbra.json index d17fe004..38d0c056 100644 --- a/Penumbra/Penumbra.json +++ b/Penumbra/Penumbra.json @@ -7,7 +7,7 @@ "RepoUrl": "https://github.com/xivdev/Penumbra", "ApplicableVersion": "any", "Tags": [ "modding" ], - "DalamudApiLevel": 6, + "DalamudApiLevel": 7, "LoadPriority": 69420, "LoadRequiredState": 2, "LoadSync": true, diff --git a/base_repo.json b/base_repo.json index 514e4e35..5016b6e4 100644 --- a/base_repo.json +++ b/base_repo.json @@ -8,7 +8,7 @@ "TestingAssemblyVersion": "1.0.0.0", "RepoUrl": "https://github.com/xivdev/Penumbra", "ApplicableVersion": "any", - "DalamudApiLevel": 6, + "DalamudApiLevel": 7, "IsHide": "False", "IsTestingExclusive": "False", "DownloadCount": 0, diff --git a/repo.json b/repo.json index 7591dc2f..a4a8c36d 100644 --- a/repo.json +++ b/repo.json @@ -8,7 +8,7 @@ "TestingAssemblyVersion": "0.5.5.0", "RepoUrl": "https://github.com/xivdev/Penumbra", "ApplicableVersion": "any", - "DalamudApiLevel": 6, + "DalamudApiLevel": 7, "IsHide": "False", "IsTestingExclusive": "False", "DownloadCount": 0,