mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Disable additional pap handling for now.
This commit is contained in:
parent
2d200bcabb
commit
afb758e61a
3 changed files with 42 additions and 41 deletions
|
|
@ -10,33 +10,33 @@ public unsafe partial class PathResolver
|
|||
{
|
||||
// Probably used when the base idle animation gets loaded.
|
||||
// Make it aware of the correct collection to load the correct pap files.
|
||||
[Signature( "E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 48 8B CF 44 8B C2 E8 ?? ?? ?? ?? 48 8B 05", DetourName = "CharacterBaseLoadAnimationDetour" )]
|
||||
public Hook< CharacterBaseDestructorDelegate >? CharacterBaseLoadAnimationHook;
|
||||
|
||||
private ModCollection? _animationLoadCollection;
|
||||
|
||||
private void CharacterBaseLoadAnimationDetour( IntPtr drawObject )
|
||||
{
|
||||
_animationLoadCollection = _lastCreatedCollection
|
||||
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||
CharacterBaseLoadAnimationHook!.Original( drawObject );
|
||||
_animationLoadCollection = null;
|
||||
}
|
||||
//[Signature( "E8 ?? ?? ?? ?? BA ?? ?? ?? ?? 48 8B CF 44 8B C2 E8 ?? ?? ?? ?? 48 8B 05", DetourName = "CharacterBaseLoadAnimationDetour" )]
|
||||
//public Hook< CharacterBaseDestructorDelegate >? CharacterBaseLoadAnimationHook;
|
||||
//
|
||||
//private ModCollection? _animationLoadCollection;
|
||||
//
|
||||
//private void CharacterBaseLoadAnimationDetour( IntPtr drawObject )
|
||||
//{
|
||||
// _animationLoadCollection = _lastCreatedCollection
|
||||
// ?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||
// CharacterBaseLoadAnimationHook!.Original( drawObject );
|
||||
// _animationLoadCollection = null;
|
||||
//}
|
||||
|
||||
// Probably used when action paps are loaded.
|
||||
// Make it aware of the correct collection to load the correct pap files.
|
||||
public delegate void PapLoadFunction( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 );
|
||||
//public delegate void PapLoadFunction( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 );
|
||||
|
||||
[Signature( "E8 ?? ?? ?? ?? 0F 10 00 0F 11 06", DetourName = "RandomPapDetour" )]
|
||||
public Hook< PapLoadFunction >? RandomPapHook;
|
||||
//[Signature( "E8 ?? ?? ?? ?? 0F 10 00 0F 11 06", DetourName = "RandomPapDetour" )]
|
||||
//public Hook< PapLoadFunction >? RandomPapHook;
|
||||
|
||||
private void RandomPapDetour( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 )
|
||||
{
|
||||
_animationLoadCollection = _lastCreatedCollection
|
||||
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||
RandomPapHook!.Original( drawObject, a2, a3, a4, a5, a6, a7 );
|
||||
_animationLoadCollection = null;
|
||||
}
|
||||
//private void RandomPapDetour( IntPtr drawObject, IntPtr a2, uint a3, IntPtr a4, uint a5, uint a6, uint a7 )
|
||||
//{
|
||||
// _animationLoadCollection = _lastCreatedCollection
|
||||
// ?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||
// RandomPapHook!.Original( drawObject, a2, a3, a4, a5, a6, a7 );
|
||||
// _animationLoadCollection = null;
|
||||
//}
|
||||
|
||||
//private void TestFunction()
|
||||
//{
|
||||
|
|
|
|||
|
|
@ -72,28 +72,29 @@ public unsafe partial class PathResolver
|
|||
CharacterBaseCreateHook?.Enable();
|
||||
EnableDrawHook?.Enable();
|
||||
CharacterBaseDestructorHook?.Enable();
|
||||
CharacterBaseLoadAnimationHook?.Enable();
|
||||
RandomPapHook?.Enable();
|
||||
Penumbra.CollectionManager.CollectionChanged += CheckCollections;
|
||||
//CharacterBaseLoadAnimationHook?.Enable();
|
||||
//RandomPapHook?.Enable();
|
||||
}
|
||||
|
||||
private void DisableDataHooks()
|
||||
{
|
||||
Penumbra.CollectionManager.CollectionChanged -= CheckCollections;
|
||||
RandomPapHook?.Disable();
|
||||
CharacterBaseLoadAnimationHook?.Disable();
|
||||
CharacterBaseCreateHook?.Disable();
|
||||
EnableDrawHook?.Disable();
|
||||
CharacterBaseDestructorHook?.Disable();
|
||||
//RandomPapHook?.Disable();
|
||||
//CharacterBaseLoadAnimationHook?.Disable();
|
||||
}
|
||||
|
||||
private void DisposeDataHooks()
|
||||
{
|
||||
CharacterBaseLoadAnimationHook?.Dispose();
|
||||
|
||||
CharacterBaseCreateHook?.Dispose();
|
||||
EnableDrawHook?.Dispose();
|
||||
CharacterBaseDestructorHook?.Dispose();
|
||||
RandomPapHook?.Dispose();
|
||||
//RandomPapHook?.Dispose();
|
||||
//CharacterBaseLoadAnimationHook?.Dispose();
|
||||
}
|
||||
|
||||
// This map links DrawObjects directly to Actors (by ObjectTable index) and their collections.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public partial class PathResolver : IDisposable
|
|||
// A potential next request will add the path anew.
|
||||
var nonDefault = HandleMaterialSubFiles( type, out var collection )
|
||||
|| PathCollections.TryRemove( gamePath.Path, out collection )
|
||||
|| HandlePapFile( type, gamePath, out collection )
|
||||
//|| HandlePapFile( type, gamePath, out collection )
|
||||
|| HandleDecalFile( type, gamePath, out collection );
|
||||
if( !nonDefault )
|
||||
{
|
||||
|
|
@ -72,18 +72,18 @@ public partial class PathResolver : IDisposable
|
|||
return false;
|
||||
}
|
||||
|
||||
private bool HandlePapFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
|
||||
{
|
||||
if( type is ResourceType.Pap or ResourceType.Tmb
|
||||
&& _animationLoadCollection != null )
|
||||
{
|
||||
collection = _animationLoadCollection;
|
||||
return true;
|
||||
}
|
||||
|
||||
collection = null;
|
||||
return false;
|
||||
}
|
||||
//private bool HandlePapFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
|
||||
//{
|
||||
// if( type is ResourceType.Pap or ResourceType.Tmb
|
||||
// && _animationLoadCollection != null )
|
||||
// {
|
||||
// collection = _animationLoadCollection;
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// collection = null;
|
||||
// return false;
|
||||
//}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue