//
// SetupRandTriggerPopup::determineStartValues from 0x96c444 to 0x96c56c (296 bytes)
//
// 2 xrefs:
// > ??> @ 0x90780
// > ??> @ 0x11bff60
//
// 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 SetupRandTriggerPopup::determineStartValues(SetupRandTriggerPopup *a1)
{
EffectGameObject *m_gameObject; // x0
cocos2d::CCArray *m_gameObjects; // x21
unsigned int v4; // w20
__int64 v5; // x0
int m_groupID1; // w1
int m_groupID2; // w1
float m_chancePercent; // s0
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_groupID1 = -1;
a1->m_groupID2 = -1;
v4 = 0;
a1->m_chancePercent = -1.0;
while ( v4 < (unsigned int)cocos2d::CCArray::count(m_gameObjects) )
{
v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);
m_groupID1 = a1->m_groupID1;
if ( m_groupID1 == -1 )
{
a1->m_groupID1 = *(_DWORD *)(v5 + 1448);
}
else if ( m_groupID1 != *(_DWORD *)(v5 + 1448) )
{
a1->m_groupID1 = 0;
}
m_groupID2 = a1->m_groupID2;
if ( m_groupID2 == -1 )
{
a1->m_groupID2 = *(_DWORD *)(v5 + 1452);
}
else if ( m_groupID2 != *(_DWORD *)(v5 + 1452) )
{
a1->m_groupID2 = 0;
}
m_chancePercent = a1->m_chancePercent;
if ( m_chancePercent == -1.0 )
{
a1->m_chancePercent = *(float *)(v5 + 1436);
}
else if ( m_chancePercent != *(float *)(v5 + 1436) )
{
a1->m_chancePercent = 0.0;
++v4;
continue;
}
++v4;
}
}
}
}