//
// CameraTriggerGameObject::triggerObject from 0x1404bd820 to 0x1404bdb72 (850 bytes)
//
// 3 xrefs:
// > ??> @ 0x1406164c8
// > ??> @ 0x1406dce3c
// > ??> @ 0x1406dce48
//
// 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 CameraTriggerGameObject::triggerObject(
CameraTriggerGameObject *a1,
GJBaseGameLayer *a2,
int a3,
std::vector *const a4)
{
int m_objectID; // ecx
int v7; // ecx
int v8; // ecx
MoveTargetType m_moveTargetMode; // eax
float m_velocityModifier; // xmm0_4
bool v12; // dl
bool v13; // r8
char m_cameraIsFreeMode; // cl
char m_isFreeMode; // dl
float m_cameraEasingValue; // xmm0_4
float m_cameraPaddingValue; // xmm2_4
int m_targetGroupID; // edx
float v19; // [rsp+20h] [rbp-48h]
m_objectID = a1->m_objectID;
if ( m_objectID > 2016 )
{
if ( m_objectID == 2062 )
{
m_targetGroupID = a1->m_targetGroupID;
switch ( a1->m_edgeDirection )
{
case 1:
a2->m_gameState.m_cameraEdgeValue0 = m_targetGroupID;
break;
case 2:
a2->m_gameState.m_cameraEdgeValue1 = m_targetGroupID;
break;
case 3:
a2->m_gameState.m_cameraEdgeValue2 = m_targetGroupID;
break;
case 4:
a2->m_gameState.m_cameraEdgeValue3 = m_targetGroupID;
break;
}
}
else
{
if ( m_objectID != 2925 )
{
LABEL_16:
EffectGameObject::triggerObject(a1, a2, a3, a4);
return;
}
m_cameraIsFreeMode = a1->m_cameraIsFreeMode;
m_isFreeMode = a2->m_gameState.m_isFreeMode;
a2->m_gameState.m_isFreeMode = m_cameraIsFreeMode;
a2->m_gameState.m_unkBool9 = a1->m_cameraDisableGridSnap;
if ( a1->m_cameraEditCameraSettings )
{
m_cameraEasingValue = a1->m_cameraEasingValue;
a2->m_gameState.m_unkFloat3 = m_cameraEasingValue;
m_cameraPaddingValue = a1->m_cameraPaddingValue;
a2->m_gameState.m_unkFloat3 = fminf(fmaxf(m_cameraEasingValue, 1.0), 40.0);
a2->m_gameState.m_unkFloat2 = fminf(fmaxf(m_cameraPaddingValue, 0.0), 1.0);
}
if ( m_isFreeMode != m_cameraIsFreeMode )
GJBaseGameLayer::updateDualGround(a2, a2->m_player1, a2->m_gameState.m_dualRelated, 0, v19);
}
}
else
{
if ( m_objectID == 2016 )
return;
v7 = m_objectID - 1914;
if ( v7 )
{
v8 = v7 - 2;
if ( v8 )
{
if ( v8 == 99 )
{
((void (__fastcall *)(GJBaseGameLayer *, GJBaseGameLayer_vtbl *, bool, bool, _DWORD, EasingType, _DWORD, int, int))a2->updateScreenRotation)(
a2,
a2->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable,
a1->m_lockObjectRotation,
a1->m_isDirectionFollowSnap360,
LODWORD(a1->m_duration),
a1->m_easingType,
LODWORD(a1->m_easingRate),
a1->m_uniqueID,
a1->m_controlID);
return;
}
goto LABEL_16;
}
if ( a1->m_moveTargetMode != YOnly )
GJBaseGameLayer::updateCameraOffsetX(
a2,
a1->m_moveOffset.x,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_uniqueID,
a1->m_controlID);
if ( a1->m_moveTargetMode != XOnly )
GJBaseGameLayer::updateCameraOffsetY(
a2,
a1->m_moveOffset.y,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_uniqueID,
a1->m_controlID);
}
else
{
m_moveTargetMode = a1->m_moveTargetMode;
m_velocityModifier = a1->m_velocityModifier;
v12 = m_moveTargetMode != YOnly;
v13 = m_moveTargetMode != XOnly;
if ( a1->m_exitStatic )
GJBaseGameLayer::exitStaticCamera(
a2,
v12,
v13,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_smoothVelocity,
m_velocityModifier,
a1->m_exitInstant);
else
GJBaseGameLayer::updateStaticCameraPosToGroup(
a2,
a1->m_centerGroupID,
v12,
v13,
a1->m_followObject,
a1->m_followEasing,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_smoothVelocity,
m_velocityModifier);
}
}
}