//
// SetupCountTriggerPopup::determineStartValues from 0x952bf0 to 0x952d38 (328 bytes)
//
// 2 xrefs:
// > ??> @ 0x3d830
// > ??> @ 0x11b8200
//
// 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 SetupCountTriggerPopup::determineStartValues(SetupCountTriggerPopup *a1)
{
EffectGameObject *m_gameObject; // x0
cocos2d::CCArray *m_gameObjects; // x21
unsigned int v4; // w20
__int64 v5; // x0
int m_itemID; // w1
int m_targetID; // w1
int m_targetCount; // w2
int v9; // w0
SetupTriggerPopup::determineStartValues(a1);
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)m_gameObject);
cocos2d::CCArray::addObject(m_gameObjects, a1->m_gameObject);
}
else
{
m_gameObjects = a1->m_gameObjects;
}
if ( m_gameObjects )
{
if ( (unsigned int)cocos2d::CCArray::count(m_gameObjects) )
{
a1->m_activateGroup = 1;
v4 = 0;
a1->m_multiActivate = 1;
a1->m_itemID = -1;
a1->m_targetID = -1;
a1->m_targetCount = 99999;
while ( v4 < (unsigned int)cocos2d::CCArray::count(m_gameObjects) )
{
v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);
if ( !*(_BYTE *)(v5 + 1621) )
a1->m_activateGroup = 0;
if ( !*(_BYTE *)(v5 + 1828) )
a1->m_multiActivate = 0;
m_itemID = a1->m_itemID;
if ( m_itemID == -1 )
{
a1->m_itemID = *(_DWORD *)(v5 + 1664);
}
else if ( m_itemID != *(_DWORD *)(v5 + 1664) )
{
a1->m_itemID = 0;
}
m_targetID = a1->m_targetID;
if ( m_targetID == -1 )
{
a1->m_targetID = *(_DWORD *)(v5 + 1448);
}
else if ( m_targetID != *(_DWORD *)(v5 + 1448) )
{
a1->m_targetID = 0;
}
m_targetCount = a1->m_targetCount;
v9 = *(_DWORD *)(v5 + 1820);
if ( m_targetCount == 99999 )
{
a1->m_targetCount = v9;
++v4;
}
else
{
if ( m_targetCount != v9 )
a1->m_targetCount = 0;
++v4;
}
}
}
}
}