//
// CollisionBlockPopup::updateItemID from 0x4cdf00 to 0x4cdf52 (82 bytes)
//
// 3 xrefs:
// > CollisionBlockPopup::textChanged @ 0x4cdf82
// > CollisionBlockPopup::onItemIDArrow @ 0x4cdfc8
// > CollisionBlockPopup::onNextItemID @ 0x4ce050
//
// 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 CollisionBlockPopup::updateItemID(CollisionBlockPopup *a1)
{
EffectGameObject *m_gameObject; // r4
int v3; // r3
int v4; // r0
m_gameObject = a1->m_gameObject;
v3 = a1->m_blockID & ~(a1->m_blockID >> 31);
if ( v3 >= 9999 )
v3 = 9999;
a1->m_blockID = v3;
if ( m_gameObject )
{
m_gameObject->m_itemID = v3;
}
else if ( a1->m_gameObjects )
{
while ( (unsigned int)m_gameObject < cocos2d::CCArray::count(a1->m_gameObjects) )
{
v4 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, (unsigned int)m_gameObject);
m_gameObject = (EffectGameObject *)((char *)m_gameObject + 1);
*(_DWORD *)(v4 + 1492) = a1->m_blockID;
}
}
}