//
// GJBaseGameLayer::triggerRotateCommand from 0x481e18 to 0x481f5e (326 bytes)
//
// 1 xrefs:
// > EffectGameObject::triggerObject @ 0x3edfce
//
// 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::triggerRotateCommand(GJBaseGameLayer *a1, EnhancedTriggerObject *a2)
{
float *p_m_duration; // r7
float RotateCommandAngleDelta; // s16
GameObject *v6; // r8
GameObject *v7; // r9
GameObject *v8; // r10
GameObject *v9; // r11
GameObject *v10; // r0
GameObject *v11; // [sp+20h] [bp-1Ch]
GameObject *Object; // [sp+24h] [bp-18h]
GameObject *v13; // [sp+28h] [bp-14h] BYREF
GameObject *v14; // [sp+2Ch] [bp-10h] BYREF
GameObject *v15; // [sp+30h] [bp-Ch] BYREF
p_m_duration = &a2->m_duration;
RotateCommandAngleDelta = a2->m_rotationDegrees + (float)((float)a2->m_times360 * 360.0);
if ( !a2->m_isDynamicMode || *p_m_duration == 0.0 )
{
if ( a2->m_useMoveTarget )
goto LABEL_8;
goto LABEL_5;
}
if ( !a2->m_useMoveTarget && !a2->m_isDirectionFollowSnap360 )
{
LABEL_5:
if ( !a2->m_isDirectionFollowSnap360 )
{
LABEL_10:
GJEffectManager::createRotateCommand(
a1->m_effectManager,
RotateCommandAngleDelta,
*p_m_duration,
a2->m_targetGroupID,
a2->m_centerGroupID,
a2->m_easingType,
a2->m_easingRate,
a2->m_lockObjectRotation,
0,
0,
a2->m_uniqueID,
a2->m_controlID);
return;
}
LABEL_8:
GJBaseGameLayer::getRotateCommandTargets(a1, a2, &v14, &v15, &v13);
v6 = v14;
if ( v14 )
{
v7 = v13;
if ( v13 )
{
v8 = v15;
if ( v15 )
{
Object = GJBaseGameLayer::tryGetObject(a1, a2->m_minXID);
v11 = GJBaseGameLayer::tryGetObject(a1, a2->m_minYID);
v9 = GJBaseGameLayer::tryGetObject(a1, a2->m_maxXID);
v10 = GJBaseGameLayer::tryGetObject(a1, a2->m_maxYID);
RotateCommandAngleDelta = getRotateCommandAngleDelta((int)a2, (int)v6, (int)v8, (int)v7, Object, v11, v9, v10);
}
}
}
goto LABEL_10;
}
GJBaseGameLayer::triggerDynamicRotateCommand(a1, a2);
}