//
// SetupTouchTogglePopup::determineStartValues from 0x140464960 to 0x140464abc (348 bytes)
//
// 4 xrefs:
// > ??> @ 0x1405faae8
// > ??> @ 0x1406a47a0
// > ??> @ 0x1406a47b0
// > ??> @ 0x1406dafa0
//
// 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 SetupTouchTogglePopup::determineStartValues(SetupTouchTogglePopup *a1)
{
__int64 v2; // rcx
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v4; // esi
struct cocos2d::CCObject *v5; // rax
int m_groupID; // edx
int m_uAutoReleaseCount; // ecx
int m_toggleMode; // edx
int m_uIndexInArray; // ecx
int m_playerMode; // edx
int m_uUnknown; // ecx
SetupTriggerPopup::determineStartValues(a1);
if ( a1->m_gameObject )
{
m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
cocos2d::CCArray::addObject(m_gameObjects, a1->m_gameObject);
}
else
{
m_gameObjects = a1->m_gameObjects;
}
if ( m_gameObjects )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
v4 = 0;
a1->m_holdMode = 1;
a1->m_groupID = -1;
a1->m_dualMode = 1;
for ( *(_QWORD *)&a1->m_toggleMode = -1; v4 < cocos2d::CCArray::count(m_gameObjects); ++v4 )
{
v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);
if ( !BYTE2(v5[29].m_eObjType) )
a1->m_holdMode = 0;
if ( !LOBYTE(v5[29].m_unknown2) )
a1->m_dualMode = 0;
m_groupID = a1->m_groupID;
m_uAutoReleaseCount = v5[26].m_uAutoReleaseCount;
if ( m_groupID == -1 )
{
a1->m_groupID = m_uAutoReleaseCount;
}
else if ( m_groupID != m_uAutoReleaseCount )
{
a1->m_groupID = 0;
}
m_toggleMode = a1->m_toggleMode;
m_uIndexInArray = v5[29].m_uIndexInArray;
if ( m_toggleMode == -1 )
{
a1->m_toggleMode = m_uIndexInArray;
}
else if ( m_toggleMode != m_uIndexInArray )
{
a1->m_toggleMode = 0;
}
m_playerMode = a1->m_playerMode;
m_uUnknown = v5[29].m_uUnknown;
if ( m_playerMode == -1 )
{
a1->m_playerMode = m_uUnknown;
}
else if ( m_playerMode != m_uUnknown )
{
a1->m_playerMode = 0;
}
}
}
}
}