//
// GJBaseGameLayer::playerTouchedTrigger from 0x1001e92dc to 0x1001e9458 (380 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8300
//
// 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 GJBaseGameLayer::playerTouchedTrigger(GJBaseGameLayer *a1, PlayerObject *a2, EffectGameObject *a3)
{
int m_uniqueID; // w2
int v7; // w1
std::__tree_end_node *>::pointer left; // x8
int v9; // w9
int v10; // w9
unsigned int m_commandIndex; // w22
std::vector __p; // [xsp+8h] [xbp-48h] BYREF
int v13; // [xsp+24h] [xbp-2Ch] BYREF
int v14; // [xsp+28h] [xbp-28h]
if ( a3->m_objectID == 3640 )
((void (__fastcall *)(EffectGameObject *, _QWORD))a3->powerOnObject)(a3, a1->m_gameState.m_commandIndex);
if ( a3->m_isTouchTriggered )
{
if ( a3->m_isSinglePTouch )
m_uniqueID = 0;
else
m_uniqueID = a2->m_uniqueID;
v7 = a3->m_uniqueID;
v13 = v7;
v14 = m_uniqueID;
left = a1->m_gameState.m_activatedObjectIDs.__tree_.__pair1_.__value_.__left_;
if ( !left )
{
LABEL_14:
if ( !a3->m_isMultiTriggered )
goto LABEL_17;
GJEffectManager::removeTriggeredID(a1->m_effectManager, v7, m_uniqueID);
goto LABEL_16;
}
while ( 1 )
{
v9 = *((_DWORD *)left + 7);
if ( v7 >= v9 )
{
if ( v9 < v7 )
goto LABEL_12;
v10 = *((_DWORD *)left + 8);
if ( m_uniqueID >= v10 )
break;
}
LABEL_13:
left = *(std::__tree_end_node *>::pointer *)left;
if ( !left )
goto LABEL_14;
}
if ( v10 >= m_uniqueID )
{
if ( !a3->m_isMultiTriggered )
{
LABEL_17:
if ( !GJEffectManager::hasBeenTriggered(a1->m_effectManager, v7, m_uniqueID) )
{
GJEffectManager::storeTriggeredID(a1->m_effectManager, v13, v14);
if ( a3->m_objectID == 1268 )
{
memset(&__p, 0, sizeof(__p));
SpawnTriggerGameObject::updateRemapKeys((SpawnTriggerGameObject *)a3, &__p);
if ( __p.__begin_ )
{
__p.__end_ = __p.__begin_;
operator delete(__p.__begin_);
}
}
((void (__fastcall *)(EffectGameObject *, GJBaseGameLayer *, _QWORD, _QWORD))a3->triggerObject)(
a3,
a1,
(unsigned int)a2->m_uniqueID,
0);
}
((void (__fastcall *)(EffectGameObject *, float))a3->triggerActivated)(a3, 0.0);
return;
}
LABEL_16:
m_commandIndex = a1->m_gameState.m_commandIndex;
__p.__begin_ = &v13;
*((_DWORD *)sub_10006E558((__int64 **)&a1->m_gameState.m_activatedObjectIDs, &v13, (__int64)&unk_10063A31C, &__p)
+ 9) = m_commandIndex;
v7 = v13;
m_uniqueID = v14;
goto LABEL_17;
}
LABEL_12:
left = (std::__tree_end_node *>::pointer)((char *)left + 8);
goto LABEL_13;
}
}