//
// CollisionBlockPopup::onItemIDArrow from 0x100286a90 to 0x100286bb3 (291 bytes)
//
// 2 xrefs:
// > CollisionBlockPopup::init @ 0x10028647c
// > CollisionBlockPopup::init @ 0x10028652a
//
// 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 CollisionBlockPopup::onItemIDArrow(CollisionBlockPopup *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_gameObjects; // rdi
int v4; // eax
int v5; // ecx
int v6; // eax
EffectGameObject *m_gameObject; // rcx
unsigned int v8; // r14d
__int64 v9; // r14
unsigned int v10; // r15d
GameObject *v11; // rax
m_gameObjects = (cocos2d::CCArray *)a2;
v4 = a1->m_blockID + 2 * (((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) != 1) - 1;
v5 = 0;
if ( v4 > 0 )
v5 = v4;
v6 = 9999;
if ( v5 < 9999 )
v6 = v5;
a1->m_blockID = v6;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_itemID = v6;
goto LABEL_12;
}
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )
{
v8 = 0;
do
{
a2 = (cocos2d::CCObject *)v8;
*(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v8++) + 1680) = a1->m_blockID;
m_gameObjects = a1->m_gameObjects;
}
while ( v8 < (unsigned int)sub_100720070(m_gameObjects) );
}
if ( a1->m_gameObject )
{
LABEL_12:
v9 = sub_10071F9E0(m_gameObjects, a2);
sub_10071FCD0(v9, a1->m_gameObject);
if ( !v9 )
goto LABEL_16;
goto LABEL_13;
}
v9 = (__int64)a1->m_gameObjects;
if ( !v9 )
goto LABEL_16;
LABEL_13:
if ( (unsigned int)sub_100720070(v9) )
{
v10 = 0;
do
{
v11 = (GameObject *)sub_1007200C0(v9, v10);
LevelEditorLayer::updateObjectLabel(v11);
++v10;
}
while ( v10 < (unsigned int)sub_100720070(v9) );
}
LABEL_16:
CollisionBlockPopup::updateTextInputLabel(a1);
}