//
// GJBaseGameLayer::activatePlayerControlTrigger from 0x85ae3c to 0x85afcc (400 bytes)
//
// 2 xrefs:
// > EffectGameObject::triggerObject @ 0x770068
// > ??> @ 0x699a8
//
// 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 GJBaseGameLayer::activatePlayerControlTrigger(GJBaseGameLayer *a1, PlayerControlGameObject *a2)
{
_BOOL4 m_targetPlayer2; // w21
_BOOL4 m_stopJump; // w23
_BOOL4 m_stopMove; // w24
_BOOL4 m_stopRotation; // w22
m_targetPlayer2 = a2->m_targetPlayer2;
m_stopJump = a2->m_stopJump;
m_stopMove = a2->m_stopMove;
m_stopRotation = a2->m_stopRotation;
if ( a2->m_targetPlayer1 < (unsigned int)!m_targetPlayer2 )
{
m_targetPlayer2 = 1;
}
else if ( !a2->m_targetPlayer1 )
{
goto LABEL_3;
}
if ( a2->m_stopJump )
{
PlayerObject::releaseButton(a1->m_player1, Jump);
if ( !a1->m_isPlatformer )
{
LABEL_14:
if ( !m_stopRotation )
goto LABEL_15;
goto LABEL_26;
}
}
else if ( !a1->m_isPlatformer )
{
goto LABEL_14;
}
if ( !m_stopMove )
goto LABEL_14;
PlayerObject::releaseButton(a1->m_player1, (PlayerButton)5);
PlayerObject::releaseButton(a1->m_player1, (PlayerButton)2);
PlayerObject::releaseButton(a1->m_player1, (PlayerButton)3);
if ( !m_stopRotation )
{
LABEL_15:
if ( !a2->m_stopSlide )
goto LABEL_3;
goto LABEL_16;
}
LABEL_26:
PlayerObject::stopRotation(a1->m_player1, 1, 0);
if ( a2->m_stopSlide )
LABEL_16:
PlayerObject::handlePlayerCommand(a1->m_player1, 543);
LABEL_3:
if ( !m_targetPlayer2 )
return;
if ( m_stopJump )
{
PlayerObject::releaseButton(a1->m_player2, Jump);
if ( !a1->m_isPlatformer )
{
LABEL_7:
if ( !m_stopRotation )
goto LABEL_8;
goto LABEL_18;
}
}
else if ( !a1->m_isPlatformer )
{
goto LABEL_7;
}
if ( !m_stopMove )
goto LABEL_7;
PlayerObject::releaseButton(a1->m_player2, (PlayerButton)5);
PlayerObject::releaseButton(a1->m_player2, (PlayerButton)2);
PlayerObject::releaseButton(a1->m_player2, (PlayerButton)3);
if ( !m_stopRotation )
{
LABEL_8:
if ( !a2->m_stopSlide )
return;
LABEL_17:
PlayerObject::handlePlayerCommand(a1->m_player2, 543);
return;
}
LABEL_18:
PlayerObject::stopRotation(a1->m_player2, 1, 0);
if ( a2->m_stopSlide )
goto LABEL_17;
}