@@ -5449,113 +5449,139 @@ void _declspec(naked) HOOK_CAnimBlendAssocGroup_CopyAnimation ()
5449
5449
}
5450
5450
}
5451
5451
5452
- CAnimBlendAssocGroupSAInterface * pAnimAssocGroupInterface = nullptr ;
5453
-
5454
- RpClump * animationClump = NULL ;
5455
- AssocGroupId animationGroup = 0 ;
5456
- AnimationId animationID = 0 ;
5457
- CAnimBlendAssociationSAInterface * pAnimAssociation = nullptr ;
5458
5452
void _declspec (naked) HOOK_CAnimManager_AddAnimation ()
5459
5453
{
5460
5454
_asm
5461
- {
5462
- mov eax, [esp+4 ]
5463
- mov animationClump, eax
5464
- mov eax, [esp+8 ]
5465
- mov animationGroup, eax
5466
- mov eax, [esp+12 ]
5467
- mov animationID, eax
5455
+ {
5468
5456
pushad
5469
5457
}
5470
-
5471
- animationID = OnCAnimBlendAssocGroupCopyAnimation ( animationGroup, animationID );
5472
5458
5473
- if ( m_pAddAnimationHandler )
5459
+ if ( m_pAddAnimationHandler )
5474
5460
{
5475
- pAnimAssociation = m_pAddAnimationHandler ( animationClump, animationGroup, animationID );
5461
+ _asm
5462
+ {
5463
+ popad
5464
+ mov ecx, [esp+4 ] // animationClump
5465
+ mov edx, [esp+8 ] // animationGroup
5466
+ mov eax, [esp+12 ] // animationID
5467
+ push eax
5468
+ push edx
5469
+ call OnCAnimBlendAssocGroupCopyAnimation
5470
+ add esp, 8
5471
+ mov [esp+12 ], eax // replace animationID
5472
+
5473
+ // call our handler function
5474
+ push eax
5475
+ push edx
5476
+ mov ecx, [esp+12 ] // animationClump
5477
+ push ecx
5478
+ call m_pAddAnimationHandler
5479
+ add esp, 0Ch
5480
+ pushad
5481
+ jmp NORMAL_FLOW_AddAnimation
5482
+ }
5476
5483
}
5477
5484
5478
5485
_asm
5479
5486
{
5487
+ NORMAL_FLOW_AddAnimation:
5480
5488
popad
5481
- mov eax,dword ptr [esp+0Ch]
5482
- mov edx,dword ptr ds:[0B4EA34h]
5489
+ mov eax, dword ptr [esp+0Ch]
5490
+ mov edx, dword ptr ds:[0B4EA34h]
5483
5491
push esi
5484
5492
push edi
5485
- mov eax, animationID
5486
5493
push eax
5487
- mov eax, [esp+14h]
5488
- mov edi, animationClump
5494
+ mov eax, dword ptr [esp+14h] // animationGroup
5495
+ mov edi, dword ptr [esp+10h] // animationClump
5489
5496
jmp RETURN_CAnimManager_AddAnimation
5490
- }
5497
+ }
5491
5498
}
5492
5499
5493
- CAnimBlendAssociationSAInterface * pAnimAssociationToSyncWith = nullptr ;
5494
5500
void _declspec (naked) HOOK_CAnimManager_AddAnimationAndSync ()
5495
5501
{
5496
5502
_asm
5497
- {
5498
- mov eax, [esp+4 ]
5499
- mov animationClump, eax
5500
- mov eax, [esp+8 ]
5501
- mov pAnimAssociationToSyncWith, eax
5502
- mov eax, [esp+12 ]
5503
- mov animationGroup, eax
5504
- mov eax, [esp+16 ]
5505
- mov animationID, eax
5503
+ {
5506
5504
pushad
5507
5505
}
5508
-
5509
- animationID = OnCAnimBlendAssocGroupCopyAnimation ( animationGroup, animationID );
5510
5506
5511
- if ( m_pAddAnimationAndSyncHandler )
5507
+ if ( m_pAddAnimationAndSyncHandler )
5512
5508
{
5513
- pAnimAssociation = m_pAddAnimationAndSyncHandler ( animationClump, pAnimAssociationToSyncWith, animationGroup, animationID );
5509
+ _asm
5510
+ {
5511
+ popad
5512
+ mov ecx, [esp+4 ] // animationClump
5513
+ mov ebx, [esp+8 ] // pAnimAssociationToSyncWith
5514
+ mov edx, [esp+12 ] // animationGroup
5515
+ mov eax, [esp+16 ] // animationID
5516
+ push eax
5517
+ push edx
5518
+ call OnCAnimBlendAssocGroupCopyAnimation
5519
+ add esp, 8
5520
+ mov [esp+16 ], eax // replace animationID
5521
+
5522
+ // call our handler function
5523
+ push eax
5524
+ push edx
5525
+ push ebx
5526
+ mov ecx, [esp+16 ] // animationClump
5527
+ push ecx
5528
+ call m_pAddAnimationAndSyncHandler
5529
+ add esp, 10h
5530
+ pushad
5531
+ jmp NORMAL_FLOW_AddAnimationAndSync
5532
+ }
5514
5533
}
5515
5534
5516
5535
_asm
5517
5536
{
5537
+ NORMAL_FLOW_AddAnimationAndSync:
5518
5538
popad
5519
- mov eax,dword ptr [esp+10h]
5520
- mov edx,dword ptr ds:[0B4EA34h]
5539
+ mov eax, dword ptr [esp+10h]
5540
+ mov edx, dword ptr ds:[0B4EA34h]
5521
5541
push esi
5522
5542
push edi
5523
- mov eax, animationID
5524
5543
push eax
5525
- mov eax, [esp+18h]
5526
- mov edi, animationClump
5544
+ mov eax, dword ptr [esp+18h] // animationGroup
5545
+ mov edi, dword ptr [esp+10h] // animationClump
5527
5546
jmp RETURN_CAnimManager_AddAnimationAndSync
5528
5547
}
5529
5548
}
5530
5549
5531
- CAnimBlendHierarchySAInterface * pAnimHierarchy = nullptr ;
5532
- int flags = 0 ;
5533
- float animationBlendDelta = 0 .0f ;
5534
5550
void _declspec (naked) HOOK_CAnimManager_BlendAnimation_Hierarchy ()
5535
5551
{
5536
5552
_asm
5537
- {
5538
- mov eax, [esp+4 ]
5539
- mov animationClump, eax
5540
- mov eax, [esp+8 ]
5541
- mov pAnimHierarchy, eax
5542
- mov eax, [esp+12 ]
5543
- mov flags, eax
5544
- mov eax, [esp+16 ]
5545
- mov animationBlendDelta, eax
5553
+ {
5546
5554
pushad
5547
5555
}
5548
5556
5549
5557
if ( m_pBlendAnimationHierarchyHandler )
5550
5558
{
5551
- pAnimHierarchy = m_pBlendAnimationHierarchyHandler ( animationClump, pAnimHierarchy, flags, animationBlendDelta );
5559
+ _asm
5560
+ {
5561
+ popad
5562
+ // mov edx, [esp+4] // animationClump
5563
+ mov eax, [esp+8 ] // pAnimHierarchy
5564
+ mov ecx, [esp+12 ] // flags
5565
+ mov edx, [esp+16 ] // animationBlendDelta
5566
+
5567
+ // call our handler function
5568
+ push edx
5569
+ mov edx, [esp+8 ] // animationClump
5570
+ push ecx
5571
+ push eax
5572
+ push edx
5573
+ call m_pBlendAnimationHierarchyHandler
5574
+ add esp, 10h
5575
+ mov [esp+8 ], eax // replace pAnimHierarchy
5576
+ pushad
5577
+ jmp NORMAL_FLOW_BlendAnimation_Hierarchy
5578
+ }
5552
5579
}
5553
5580
5554
5581
_asm
5555
5582
{
5583
+ NORMAL_FLOW_BlendAnimation_Hierarchy:
5556
5584
popad
5557
- mov eax, pAnimHierarchy
5558
- mov [esp+8 ], eax
5559
5585
push 0FFFFFFFFh
5560
5586
push 04D4410h
5561
5587
jmp RETURN_CAnimManager_BlendAnimation_Hierarchy
0 commit comments