//
// SetupInstantCountPopup::determineStartValues from 0x955998 to 0x955af0 (344 bytes)
//
// 2 xrefs:
// > ??> @ 0xb9928
// > ??> @ 0x11b9200
//
// 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 SetupInstantCountPopup::determineStartValues(SetupInstantCountPopup *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_mode; // w1
int m_targetCount; // w2
int v10; // 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 )
{
a1->m_itemID = -1;
a1->m_targetID = -1;
v4 = 0;
a1->m_targetCount = 99999;
a1->m_mode = -1;
a1->m_activateGroup = 1;
while ( v4 < (unsigned int)cocos2d::CCArray::count(m_gameObjects) )
{
v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);
if ( !*(_BYTE *)(v5 + 1621) )
a1->m_activateGroup = 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_mode = a1->m_mode;
if ( m_mode == -1 )
{
a1->m_mode = *(_DWORD *)(v5 + 1824);
}
else if ( m_mode != *(_DWORD *)(v5 + 1824) )
{
a1->m_mode = 0;
}
m_targetCount = a1->m_targetCount;
v10 = *(_DWORD *)(v5 + 1820);
if ( m_targetCount == 99999 )
{
a1->m_targetCount = v10;
++v4;
}
else
{
if ( m_targetCount != v10 )
a1->m_targetCount = 0;
++v4;
}
}
}
}