//
// SetupCollisionTriggerPopup::updateItemID2 from 0x951040 to 0x9510cc (140 bytes)
//
// 4 xrefs:
// > SetupCollisionTriggerPopup::onItemID2Arrow @ 0x951104
// > SetupCollisionTriggerPopup::onItemID2Arrow @ 0x951124
// > SetupCollisionTriggerPopup::textChanged @ 0x9512f4
// > ??> @ 0x38790
//
// 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 SetupCollisionTriggerPopup::updateItemID2(SetupCollisionTriggerPopup *a1)
{
int m_blockBID; // w1
EffectGameObject *m_gameObject; // x3
cocos2d::CCArray *m_gameObjects; // x1
unsigned int v5; // w20
__int64 v6; // x0
bool v7; // cf
unsigned int v8; // w1
m_blockBID = a1->m_blockBID;
m_gameObject = a1->m_gameObject;
if ( m_blockBID < 0 )
m_blockBID = 0;
if ( m_blockBID > 9999 )
m_blockBID = 9999;
a1->m_blockBID = m_blockBID;
if ( m_gameObject )
{
m_gameObject->m_itemID2 = m_blockBID;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
v5 = 0;
while ( 1 )
{
v7 = v5 >= (unsigned int)cocos2d::CCArray::count(m_gameObjects);
v8 = v5++;
if ( v7 )
break;
v6 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v8);
m_gameObjects = a1->m_gameObjects;
*(_DWORD *)(v6 + 1652) = a1->m_blockBID;
}
}
}
}