//
// EffectGameObject::triggerObject from 0x3ed9e8 to 0x3ee5a0 (3000 bytes)
//
// 6 xrefs:
// > TransformTriggerGameObject::triggerObject @ 0x3ee5dc
// > CameraTriggerGameObject::triggerObject @ 0x3ee780
// > RandTriggerGameObject::triggerObject @ 0x3ee7e6
// > CountTriggerGameObject::triggerObject @ 0x3ee946
// > TimerTriggerGameObject::triggerObject @ 0x3eea20
// > ItemTriggerGameObject::triggerObject @ 0x3eeaac
//
// 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 EffectGameObject::triggerObject(EffectGameObject *a1, GJBaseGameLayer *a2, int a3, std::vector *const a4)
{
int m_targetGroupID; // r10
_BOOL4 m_activateGroup; // r9
void (__fastcall *toggleGroupTriggered)(GJBaseGameLayer *__hidden, int, bool, const std::vector *, int, int); // r8
int m_collectiblePoints; // r1
int m_objectID; // r3
GJBaseGameLayer *v12; // r0
bool v13; // r1
int m_centerGroupID; // r8
void (__fastcall *v15)(GJBaseGameLayer *__hidden, int, bool, double, const std::vector *, int, int); // r9
float *p_m_duration; // r6
GameManager *v17; // r0
int v18; // r1
PlayLayer *v19; // r0
GameManager *v20; // r0
GameManager *v21; // r0
bool v22; // r1
PlayLayer *m_playLayer; // r0
GameManager *v24; // r0
PulseEffectType v25; // r3
GameManager *v26; // r0
int v27; // r8
bool v28; // r7
GJEffectManager *v29; // r9
float m_shakeStrength; // s15
GJEffectManager *m_effectManager; // r10
int v32; // r9
bool m_touchHoldMode; // r8
TouchTriggerType m_touchToggleMode; // r7
TouchTriggerControl m_touchPlayerMode; // r3
bool m_isDualMode; // r11
GJBaseGameLayer *v37; // r0
int v38; // r1
int m_itemID2; // r2
int m_itemID; // r1
_BOOL4 v41; // r0
int v42; // r9
void (__fastcall *spawnGroup)(GJBaseGameLayer *__hidden, int, bool, double, const std::vector *, int, int); // r8
int v44; // r8
bool v45; // r10
GJEffectManager *v46; // r9
bool m_triggerOnExit; // r11
int v48; // r2
int v49; // r3
GJEffectManager *v50; // r9
int v51; // r8
int v52; // r5
bool v53; // r11
bool v54; // r10
int v55; // r8
float v56; // r1
int v57; // r2
cocos2d::ccColor3B v58; // [sp+Ch] [bp-58h]
TouchTriggerControl v59; // [sp+48h] [bp-1Ch]
int v60; // [sp+48h] [bp-1Ch]
int v61; // [sp+4Ch] [bp-18h]
std::vector v62; // [sp+50h] [bp-14h] BYREF
if ( a1->m_objectType == Collectible )
{
if ( a1->m_collectibleIsPickupItem )
GJBaseGameLayer::collectedObject(a2, a1);
if ( a1->m_collectibleIsToggleTrigger )
{
m_targetGroupID = a1->m_targetGroupID;
m_activateGroup = a1->m_activateGroup;
toggleGroupTriggered = a2->toggleGroupTriggered;
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
toggleGroupTriggered(a2, m_targetGroupID, m_activateGroup, &v62, a1->m_uniqueID, a1->m_controlID);
std::_Vector_base::~_Vector_base((void **)&v62.m_start);
}
m_collectiblePoints = a1->m_collectiblePoints;
if ( m_collectiblePoints )
GJBaseGameLayer::addPoints(a2, m_collectiblePoints);
return;
}
m_objectID = a1->m_objectID;
if ( m_objectID == 1917 )
{
((void (__fastcall *)(GJBaseGameLayer *, EffectGameObject *, int))a2->reverseDirection)(a2, a1, a3);
return;
}
if ( m_objectID > 1917 )
{
if ( m_objectID <= 3015 )
{
if ( m_objectID >= 3006 )
{
GJBaseGameLayer::triggerAreaEffect(a2, (EnterEffectObject *)a1);
return;
}
if ( m_objectID == 2903 )
{
GJBaseGameLayer::triggerGradientCommand(a2, (GradientTriggerObject *)a1);
return;
}
if ( m_objectID <= 2903 )
{
if ( m_objectID == 1935 )
{
GJBaseGameLayer::queueTimeWarp(a2, a1->m_timeWarpTimeMod);
}
else if ( m_objectID >= 1936 )
{
if ( m_objectID == 2899 )
{
GJBaseGameLayer::processOptionsTrigger(a2, (GameOptionsTrigger *)a1);
}
else if ( m_objectID > 2899 )
{
if ( m_objectID == 2900 )
{
((void (__fastcall *)(GJBaseGameLayer *, EffectGameObject *, int))a2->rotateGameplay)(a2, a1, 2900);
}
else if ( m_objectID == 2901 )
{
if ( a1->m_moveTargetMode != YOnly )
GJBaseGameLayer::updateGameplayOffsetX(a2, (int)a1->m_moveOffset.x, a1->m_lockToPlayerX);
if ( a1->m_moveTargetMode != XOnly )
GJBaseGameLayer::updateGameplayOffsetY(a2, (int)a1->m_moveOffset.y, a1->m_lockToPlayerY);
}
}
else if ( m_objectID == 2066 )
{
GJBaseGameLayer::triggerGravityChange(a2, a1, a3);
}
}
else
{
switch ( m_objectID )
{
case 1932:
GJBaseGameLayer::activatePlayerControlTrigger(a2, (PlayerControlGameObject *)a1);
break;
case 1934:
GJBaseGameLayer::activateSongTrigger(a2, (SongTriggerGameObject *)a1);
break;
case 1931:
a2->activateEndTrigger(a2, a1->m_targetGroupID, a1->m_endReversed, a1->m_lockToPlayerY);
break;
}
}
return;
}
if ( m_objectID > 2917 )
{
if ( m_objectID < 2919 )
return;
if ( m_objectID > 2924 )
{
if ( m_objectID == 2999 )
GJBaseGameLayer::updateMGOffsetY(
a2,
a1->m_moveOffset.y,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_uniqueID,
a1->m_controlID);
return;
}
}
else if ( m_objectID < 2909 && m_objectID > 2905 && m_objectID != 2907 )
{
return;
}
GJBaseGameLayer::triggerShaderCommand(a2, (ShaderGameObject *)a1);
return;
}
if ( m_objectID == 3605 )
{
GJBaseGameLayer::activateSongEditTrigger(a2, (SongTriggerGameObject *)a1);
return;
}
if ( m_objectID <= 3605 )
{
if ( m_objectID == 3023 )
{
GJBaseGameLayer::stopCustomEnterEffect(a2, (EnterEffectObject *)a1);
return;
}
if ( m_objectID < 3024 )
{
if ( m_objectID > 3021 )
{
GJBaseGameLayer::teleportPlayer(a2, (TeleportPortalObject *)a1, nullptr);
return;
}
if ( m_objectID < 3017 )
{
GJBaseGameLayer::triggerAdvancedFollowCommand(a2, (AdvancedFollowTriggerObject *)a1);
return;
}
goto LABEL_236;
}
if ( m_objectID == 3033 )
{
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
GJBaseGameLayer::playKeyframeAnimation(a2, (KeyframeAnimTriggerObject *)a1, &v62);
goto LABEL_162;
}
if ( m_objectID > 3033 )
{
if ( m_objectID == 3602 )
{
GJBaseGameLayer::activateSFXTrigger(a2, (SFXTriggerGameObject *)a1);
}
else if ( m_objectID == 3603 )
{
GJBaseGameLayer::activateSFXEditTrigger(a2, (SFXTriggerGameObject *)a1);
}
}
else if ( m_objectID == 3024 )
{
GJBaseGameLayer::controlAreaEffectWithID(a2, a1->m_targetGroupID, -1, Stop);
}
return;
}
if ( m_objectID == 3618 )
{
GJBaseGameLayer::activateResetTrigger(a2, a1);
return;
}
if ( m_objectID > 3618 )
{
if ( m_objectID == 3655 )
{
GJBaseGameLayer::activateObjectControlTrigger(a2, (ObjectControlGameObject *)a1);
}
else if ( m_objectID > 3655 )
{
if ( (unsigned int)(m_objectID - 3660) <= 1 )
GJBaseGameLayer::triggerAdvancedFollowEditCommand(a2, (AdvancedFollowEditObject *)a1);
}
else if ( m_objectID == 3640 )
{
v42 = a1->m_targetGroupID;
spawnGroup = a2->spawnGroup;
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
((void (__fastcall *)(GJBaseGameLayer *, int, _DWORD, int, _DWORD, _DWORD, std::vector *, int, int))spawnGroup)(
a2,
v42,
0,
a1->m_controlID,
0,
0,
&v62,
a1->m_uniqueID,
a1->m_controlID);
std::_Vector_base::~_Vector_base((void **)&v62.m_start);
GJBaseGameLayer::registerStateObject(a2, a1);
}
return;
}
if ( m_objectID == 3608 )
{
GJBaseGameLayer::spawnParticleTrigger(a2, (SpawnParticleGameObject *)a1);
return;
}
if ( m_objectID <= 3608 )
{
if ( m_objectID == 3606 )
GJBaseGameLayer::updateBGArtSpeed(a2, a1->m_moveModX, a1->m_moveModY);
return;
}
if ( m_objectID != 3609 )
{
if ( m_objectID == 3612 )
GJBaseGameLayer::updateMGArtSpeed(a2, a1->m_moveModX, a1->m_moveModY);
return;
}
if ( a1->m_followCPP )
{
v37 = a2;
v38 = 10000;
m_itemID2 = 10001;
}
else
{
if ( a1->m_targetPlayer1 )
{
m_itemID = 10000;
}
else if ( a1->m_targetPlayer2 )
{
m_itemID = 10001;
}
else
{
m_itemID = a1->m_itemID;
}
v41 = GJBaseGameLayer::checkCollision(a2, m_itemID, a1->m_itemID2);
if ( v41 || !a1->m_targetPlayer1 || !a1->m_targetPlayer2 )
{
LABEL_187:
m_centerGroupID = a1->m_targetGroupID;
v15 = a2->spawnGroup;
if ( !v41 )
m_centerGroupID = a1->m_centerGroupID;
if ( *(&a1->m_unk6f5 + 1) && a4 )
{
LABEL_127:
std::vector::vector((unsigned int *)&v62, (int)a4);
LABEL_129:
((void (__fastcall *)(GJBaseGameLayer *, int, _DWORD, int, _DWORD, _DWORD, std::vector *, int, int))v15)(
a2,
m_centerGroupID,
0,
a1->m_controlID,
0,
0,
&v62,
a1->m_uniqueID,
a1->m_controlID);
goto LABEL_162;
}
LABEL_128:
memset(&v62, 0, sizeof(v62));
goto LABEL_129;
}
m_itemID2 = a1->m_itemID2;
v37 = a2;
v38 = 10001;
}
v41 = GJBaseGameLayer::checkCollision(v37, v38, m_itemID2);
goto LABEL_187;
}
if ( m_objectID == 1007 )
{
GJEffectManager::runOpacityActionOnGroup(
a2->m_effectManager,
a1->m_targetGroupID,
a1->m_duration,
a1->m_opacity,
a1->m_uniqueID,
a1->m_controlID);
return;
}
if ( m_objectID >= 1008 )
{
if ( m_objectID != 1612 )
{
if ( m_objectID <= 1612 )
{
if ( m_objectID == 1346 )
{
GJBaseGameLayer::triggerRotateCommand(a2, (EnhancedTriggerObject *)a1);
return;
}
if ( m_objectID > 1346 )
{
if ( m_objectID == 1520 )
{
if ( a1->m_duration > 0.0 )
{
m_shakeStrength = a1->m_shakeStrength;
if ( m_shakeStrength > 0.0 )
GJBaseGameLayer::shakeCamera(a2, a1->m_duration, m_shakeStrength, a1->m_shakeInterval);
}
}
else if ( m_objectID > 1520 )
{
if ( m_objectID == 1585 )
{
GJBaseGameLayer::playAnimationCommand(a2, a1->m_animationID, a1->m_targetGroupID);
return;
}
if ( m_objectID == 1595 )
{
m_effectManager = a2->m_effectManager;
v32 = a1->m_targetGroupID;
m_touchHoldMode = a1->m_touchHoldMode;
m_touchToggleMode = a1->m_touchToggleMode;
m_touchPlayerMode = a1->m_touchPlayerMode;
m_isDualMode = a1->m_isDualMode;
if ( a4 )
{
v59 = a1->m_touchPlayerMode;
std::vector::vector((unsigned int *)&v62, (int)a4);
m_touchPlayerMode = v59;
}
else
{
memset(&v62, 0, sizeof(v62));
}
GJEffectManager::runTouchTriggerCommand(
m_effectManager,
v32,
m_touchHoldMode,
m_touchToggleMode,
m_touchPlayerMode,
m_isDualMode,
&v62,
a1->m_uniqueID,
a1->m_controlID);
goto LABEL_162;
}
}
else if ( m_objectID == 1347 )
{
GJEffectManager::createFollowCommand(
a2->m_effectManager,
a1->m_followXMod,
a1->m_followYMod,
a1->m_duration,
a1->m_targetGroupID,
a1->m_centerGroupID,
a1->m_uniqueID,
a1->m_controlID);
}
}
else
{
switch ( m_objectID )
{
case 1329:
goto LABEL_125;
case 1334:
LABEL_239:
if ( m_objectID == 202 )
{
v56 = 1.1;
}
else if ( m_objectID > 202 )
{
if ( m_objectID == 203 )
v56 = 1.3;
else
v56 = 1.6;
}
else if ( m_objectID == 200 )
{
v56 = 0.7;
}
else
{
v56 = 0.9;
}
GJBaseGameLayer::updateTimeMod(a2, v56, 0, a1->m_hasNoEffects);
GameObject::playShineEffect(a1);
((void (__fastcall *)(GJBaseGameLayer *, EffectGameObject *, int))a2->addToSpeedObjects)(a2, a1, v57);
return;
case 1049:
GJBaseGameLayer::toggleGroup(a2, a1->m_targetGroupID, a1->m_activateGroup);
break;
}
}
return;
}
if ( m_objectID == 1818 )
{
if ( a1->m_editorEnabled )
return;
v21 = GameManager::sharedState();
v22 = 1;
m_playLayer = v21->m_playLayer;
}
else
{
if ( m_objectID <= 1818 )
{
if ( m_objectID == 1812 )
{
if ( a1->m_editorEnabled )
return;
v26 = GameManager::sharedState();
v27 = a1->m_targetGroupID;
v28 = a1->m_activateGroup;
v29 = v26->m_playLayer->m_effectManager;
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
GJEffectManager::runDeathTrigger(v29, v27, v28, &v62, a1->m_uniqueID, a1->m_controlID);
goto LABEL_162;
}
if ( m_objectID > 1812 )
{
if ( m_objectID == 1814 )
{
GJEffectManager::createPlayerFollowCommand(
a2->m_effectManager,
a1->m_followYSpeed,
a1->m_followYDelay,
a1->m_followYOffset,
a1->m_followYMaxSpeed,
a1->m_duration,
a1->m_targetGroupID,
a1->m_uniqueID,
a1->m_controlID);
return;
}
if ( m_objectID == 1815 )
{
v44 = a1->m_targetGroupID;
v45 = a1->m_activateGroup;
v46 = a2->m_effectManager;
m_triggerOnExit = a1->m_triggerOnExit;
if ( a1->m_followCPP )
{
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
GJEffectManager::registerCollisionTrigger(
v46,
v44,
10000,
10001,
m_triggerOnExit,
v45,
&v62,
a1->m_uniqueID,
a1->m_controlID);
}
else
{
if ( a1->m_targetPlayer1 )
{
v48 = 10000;
}
else if ( a1->m_targetPlayer2 )
{
v48 = 10001;
}
else
{
v48 = a1->m_itemID;
}
v49 = a1->m_itemID2;
if ( a4 )
{
v61 = a1->m_itemID2;
v60 = v48;
std::vector::vector((unsigned int *)&v62, (int)a4);
v48 = v60;
v49 = v61;
}
else
{
memset(&v62, 0, sizeof(v62));
}
GJEffectManager::registerCollisionTrigger(
v46,
v44,
v48,
v49,
m_triggerOnExit,
v45,
&v62,
a1->m_uniqueID,
a1->m_controlID);
std::_Vector_base::~_Vector_base((void **)&v62.m_start);
if ( !a1->m_targetPlayer1 || !a1->m_targetPlayer2 )
return;
v50 = a2->m_effectManager;
v51 = a1->m_targetGroupID;
v52 = a1->m_itemID2;
v53 = a1->m_triggerOnExit;
v54 = a1->m_activateGroup;
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
GJEffectManager::registerCollisionTrigger(
v50,
v51,
10001,
v52,
v53,
v54,
&v62,
a1->m_uniqueID,
a1->m_controlID);
}
LABEL_162:
std::_Vector_base::~_Vector_base((void **)&v62.m_start);
return;
}
return;
}
if ( m_objectID != 1613 )
return;
v12 = a2;
v13 = 1;
LABEL_139:
GJBaseGameLayer::togglePlayerVisibility(v12, v13);
return;
}
if ( m_objectID == 1912 )
{
if ( (float)(GameToolbox::fast_rand_0_1() * 100.0) > a1->m_duration )
v55 = a1->m_centerGroupID;
else
v55 = a1->m_targetGroupID;
if ( a4 )
std::vector::vector((unsigned int *)&v62, (int)a4);
else
memset(&v62, 0, sizeof(v62));
GJBaseGameLayer::spawnGroupTriggered(a2, v55, 0.0, 0, &v62, a1->m_uniqueID, a1->m_controlID);
goto LABEL_162;
}
if ( m_objectID > 1912 )
{
if ( m_objectID == 1913 )
{
GJBaseGameLayer::updateZoom(
a2,
a1->m_zoomValue,
a1->m_duration,
a1->m_easingType,
a1->m_easingRate,
a1->m_uniqueID,
a1->m_controlID);
return;
}
if ( m_objectID == 1915 )
goto LABEL_236;
return;
}
if ( m_objectID != 1819 || a1->m_editorEnabled )
return;
v24 = GameManager::sharedState();
v22 = 0;
m_playLayer = v24->m_playLayer;
}
PlayLayer::toggleBGEffectVisibility(m_playLayer, v22);
return;
}
v12 = a2;
v13 = 0;
goto LABEL_139;
}
if ( m_objectID == 105 )
goto LABEL_130;
if ( m_objectID <= 105 )
{
if ( m_objectID > 30 )
{
if ( m_objectID == 33 )
{
if ( a1->m_editorEnabled )
return;
v20 = GameManager::sharedState();
v18 = 0;
v19 = v20->m_playLayer;
}
else
{
if ( m_objectID > 33 )
{
if ( (unsigned int)(m_objectID - 55) > 4 )
return;
LABEL_236:
GJBaseGameLayer::updateActiveEnterEffect(a2, (EnterEffectObject *)a1);
return;
}
if ( m_objectID != 32 || a1->m_editorEnabled )
return;
v17 = GameManager::sharedState();
v18 = 1;
v19 = v17->m_playLayer;
}
PlayLayer::toggleGhostEffect(v19, v18);
return;
}
if ( m_objectID < 29 )
{
if ( m_objectID < 22 )
return;
goto LABEL_236;
}
goto LABEL_130;
}
if ( m_objectID <= 900 )
{
if ( m_objectID < 899 )
{
if ( m_objectID <= 203 )
{
if ( m_objectID < 200 )
{
if ( m_objectID != 142 )
return;
LABEL_125:
m_centerGroupID = a1->m_targetGroupID;
if ( m_centerGroupID <= 0 )
return;
v15 = a2->spawnGroup;
if ( a4 )
goto LABEL_127;
goto LABEL_128;
}
goto LABEL_239;
}
if ( m_objectID != 744 )
return;
}
LABEL_130:
p_m_duration = &a1->m_duration;
((void (__fastcall *)(GJBaseGameLayer *, cocos2d::ccColor3B *, _DWORD, int, bool, _DWORD, cocos2d::ccHSVValue *, int, bool, EffectGameObject *, int, int))a2->updateColor)(
a2,
&a1->m_triggerTargetColor,
LODWORD(a1->m_duration),
a1->m_targetColor,
a1->m_usesBlending,
LODWORD(a1->m_opacity),
&a1->m_hsvValue,
a1->m_copyColorID,
a1->m_copyOpacity,
a1,
a1->m_uniqueID,
a1->m_controlID);
if ( a1->m_objectID == 29 && a1->m_tintGround )
((void (__fastcall *)(GJBaseGameLayer *, cocos2d::ccColor3B *, _DWORD, int, _DWORD, int, cocos2d::ccHSVValue *, int, bool, EffectGameObject *, int, int))a2->updateColor)(
a2,
&a1->m_triggerTargetColor,
*(_DWORD *)p_m_duration,
1001,
0,
1065353216,
&a1->m_hsvValue,
a1->m_copyColorID,
a1->m_copyOpacity,
a1,
a1->m_uniqueID,
a1->m_controlID);
return;
}
switch ( m_objectID )
{
case 915:
goto LABEL_130;
case 1006:
if ( a1->m_pulseMode )
v25 = Hsv;
else
v25 = 2;
*(_WORD *)&v58.r = *(_DWORD *)&a1->m_triggerTargetColor.r;
v58.b = BYTE2(*(_DWORD *)&a1->m_triggerTargetColor.r);
GJEffectManager::runPulseEffect(
a2->m_effectManager,
a1->m_targetGroupID,
a1->m_pulseTargetType == 1,
a1->m_fadeInDuration,
a1->m_holdDuration,
a1->m_fadeOutDuration,
v25,
v58,
a1->m_hsvValue,
a1->m_copyColorID,
a1->m_pulseMainOnly,
a1->m_pulseDetailOnly,
a1->m_pulseExclusive,
a1->m_legacyHSV,
a1->m_uniqueID,
a1->m_controlID);
break;
case 901:
GJBaseGameLayer::triggerMoveCommand(a2, a1);
break;
}
}