//
// PlayerObject::lockPlayer from 0x10041a680 to 0x10041a7d2 (338 bytes)
//
// 6 xrefs:
// > PlayLayer::playEndAnimationToPos @ 0x1000b60c7
// > PlayLayer::playEndAnimationToPos @ 0x1000b6291
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1000b65dc
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1000b661a
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1000b68c9
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1000b691a
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall PlayerObject::lockPlayer(PlayerObject *a1)
{
__int64 v1; // rax
GameManager *v2; // rax
HardStreak *m_waveTrail; // r14
double *v4; // rax
cocos2d::CCPoint v5; // xmm0_8
cocos2d::CCFadeOut *v6; // r14
cocos2d::CCCallFunc *v7; // rax
cocos2d::CCSequence *v8; // r14
_QWORD v9[4]; // [rsp+0h] [rbp-20h] BYREF
v9[0] = v1;
if ( a1->m_isDart )
{
if ( !a1->m_maybeReducedEffects && !a1->m_isLocked && a1->m_fadeOutStreak )
{
if ( !a1->m_playEffects || (v2 = GameManager::sharedState(), !GJBaseGameLayer::isFlipping(v2->m_playLayer)) )
{
m_waveTrail = a1->m_waveTrail;
v4 = (double *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
*(double *)&v5 = sub_10028CC60(v9, v4);
HardStreak::addPoint(m_waveTrail, v5);
}
}
a1->m_justPlacedStreak = 0;
}
a1->m_isLocked = 1;
*(_WORD *)&a1->m_isRotating = 0;
a1->m_isBallRotating = 0;
a1->m_rotationSpeed = 0.0;
PlayerObject::releaseButton(a1, Jump);
if ( a1->m_hasGroundParticles )
cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles);
a1->m_hasGroundParticles = 0;
a1->m_isOnGround2 = 0;
if ( a1->m_isDart && !cocos2d::CCNode::getActionByTag(a1->m_waveTrail, 8) )
{
v6 = cocos2d::CCFadeOut::create(0.40000001);
v7 = cocos2d::CCCallFunc::create(a1->m_waveTrail, (cocos2d::SEL_CallFunc)(unsigned __int64)HardStreak::stopStroke);
v8 = sub_1003B5760(v6, v7, 0);
((void (__fastcall *)(cocos2d::CCSequence *, __int64))v8->setTag)(v8, 8);
cocos2d::CCNode::runAction(a1->m_waveTrail, v8);
}
}