Further fixes.

This commit is contained in:
Ottermandias 2022-08-24 17:50:52 +02:00
parent 674dc03f46
commit e66ca7c580
6 changed files with 11 additions and 11 deletions

View file

@ -2,6 +2,7 @@ using System;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using Lumina.Data;
using Lumina.Data.Parsing; using Lumina.Data.Parsing;
using Lumina.Extensions; using Lumina.Extensions;
@ -87,7 +88,7 @@ public partial class MdlFile : IWritable
public MdlFile( byte[] data ) public MdlFile( byte[] data )
{ {
using var stream = new MemoryStream( data ); using var stream = new MemoryStream( data );
using var r = new BinaryReader( stream ); using var r = new LuminaBinaryReader( stream );
var header = LoadModelFileHeader( r ); var header = LoadModelFileHeader( r );
LodCount = header.LodCount; LodCount = header.LodCount;
@ -197,7 +198,7 @@ public partial class MdlFile : IWritable
RemainingData = r.ReadBytes( ( int )( r.BaseStream.Length - r.BaseStream.Position ) ); 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 ); var header = MdlStructs.ModelFileHeader.Read( r );
Version = header.Version; Version = header.Version;
@ -255,5 +256,4 @@ public partial class MdlFile : IWritable
public unsafe uint StackSize public unsafe uint StackSize
=> ( uint )( VertexDeclarations.Length * NumVertices * sizeof( MdlStructs.VertexElement ) ); => ( uint )( VertexDeclarations.Length * NumVertices * sizeof( MdlStructs.VertexElement ) );
} }

View file

@ -14,11 +14,11 @@ public unsafe class CharacterUtility : IDisposable
// Only required for migration anymore. // Only required for migration anymore.
public delegate void LoadResources( Structs.CharacterUtility* address ); public delegate void LoadResources( Structs.CharacterUtility* address );
[Signature( "E8 ?? ?? ?? 00 48 8D 8E ?? ?? 00 00 E8 ?? ?? ?? 00 33 D2" )] [Signature( "E8 ?? ?? ?? ?? 48 8D 8F ?? ?? ?? ?? E8 ?? ?? ?? ?? 33 D2 45 33 C0" )]
public readonly LoadResources? LoadCharacterResourcesFunc; public readonly LoadResources LoadCharacterResourcesFunc = null!;
public void LoadCharacterResources() public void LoadCharacterResources()
=> LoadCharacterResourcesFunc?.Invoke( Address ); => LoadCharacterResourcesFunc.Invoke( Address );
public Structs.CharacterUtility* Address public Structs.CharacterUtility* Address
=> *_characterUtilityAddress; => *_characterUtilityAddress;

View file

@ -200,13 +200,13 @@ public unsafe partial class PathResolver
_animationLoadCollection = last; _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 readonly Hook< CharacterBaseNoArgumentDelegate > _someOtherAvfxHook = null!;
private void SomeOtherAvfxDetour( IntPtr unk ) private void SomeOtherAvfxDetour( IntPtr unk )
{ {
var last = _animationLoadCollection; var last = _animationLoadCollection;
var gameObject = ( GameObject* )( unk - 0x8B0 ); var gameObject = ( GameObject* )( unk - 0x8D0 );
_animationLoadCollection = IdentifyCollection( gameObject ); _animationLoadCollection = IdentifyCollection( gameObject );
_someOtherAvfxHook.Original( unk ); _someOtherAvfxHook.Original( unk );
_animationLoadCollection = last; _animationLoadCollection = last;

View file

@ -7,7 +7,7 @@
"RepoUrl": "https://github.com/xivdev/Penumbra", "RepoUrl": "https://github.com/xivdev/Penumbra",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"Tags": [ "modding" ], "Tags": [ "modding" ],
"DalamudApiLevel": 6, "DalamudApiLevel": 7,
"LoadPriority": 69420, "LoadPriority": 69420,
"LoadRequiredState": 2, "LoadRequiredState": 2,
"LoadSync": true, "LoadSync": true,

View file

@ -8,7 +8,7 @@
"TestingAssemblyVersion": "1.0.0.0", "TestingAssemblyVersion": "1.0.0.0",
"RepoUrl": "https://github.com/xivdev/Penumbra", "RepoUrl": "https://github.com/xivdev/Penumbra",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 6, "DalamudApiLevel": 7,
"IsHide": "False", "IsHide": "False",
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadCount": 0, "DownloadCount": 0,

View file

@ -8,7 +8,7 @@
"TestingAssemblyVersion": "0.5.5.0", "TestingAssemblyVersion": "0.5.5.0",
"RepoUrl": "https://github.com/xivdev/Penumbra", "RepoUrl": "https://github.com/xivdev/Penumbra",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 6, "DalamudApiLevel": 7,
"IsHide": "False", "IsHide": "False",
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadCount": 0, "DownloadCount": 0,