//
// SetupGravityModPopup::determineStartValues from 0x1003d8ec0 to 0x1003d8fdd (285 bytes)
//
// 1 xrefs:
// > SetupGravityModPopup::init @ 0x1003d8347
//
// 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 SetupGravityModPopup::determineStartValues(SetupGravityModPopup *a1)
{
EffectGameObject *m_gameObject; // rax
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v4; // r14d
float v5; // xmm1_4
__int64 v6; // rax
int m_itemID; // ecx
int v8; // eax
bool v9; // zf
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
a1->m_gravityMod = m_gameObject->m_gravityMod;
a1->m_itemID = m_gameObject->m_itemID;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )
{
a1->m_gravityMod = 1.0;
a1->m_itemID = -1;
if ( (unsigned int)sub_100720070(a1->m_gameObjects) )
{
v4 = 0;
v5 = -999.0;
do
{
v6 = sub_1007200C0(a1->m_gameObjects, v4);
if ( v5 == -999.0 )
{
v5 = *(float *)(v6 + 1812);
}
else if ( v5 != *(float *)(v6 + 1812) )
{
break;
}
m_itemID = a1->m_itemID;
v8 = *(_DWORD *)(v6 + 1680);
if ( m_itemID == -1 || (v9 = m_itemID == v8, v8 = 0, !v9) )
a1->m_itemID = v8;
++v4;
}
while ( v4 < (unsigned int)sub_100720070(a1->m_gameObjects) );
}
else
{
v5 = -999.0;
}
a1->m_gravityMod = v5;
}
}
}