//
// GJItemIcon::toggleEnabledState from 0x100305ed0 to 0x100305f84 (180 bytes)
//
// 2 xrefs:
// > GJGarageLayer::setupSpecialPage @ 0x1003054e8
// > GJGarageLayer::onToggleItem @ 0x100306028
//
// 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 GJItemIcon::toggleEnabledState(GJItemIcon *a1, bool a2)
{
cocos2d::CCSprite *m_player; // x19
__int16 v3; // w8
__int64 v4; // x0
__int64 v5; // x19
unsigned int v6; // w20
__int64 v7; // x0
__int16 v8; // [xsp+Ch] [xbp-14h] BYREF
char v9; // [xsp+Eh] [xbp-12h]
if ( !a1->m_isIcon )
{
m_player = a1->m_player;
if ( a2 )
{
v3 = -1;
v9 = -1;
}
else
{
v9 = 100;
v3 = 25700;
}
v8 = v3;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))m_player->setColor)(m_player, &v8);
v4 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))m_player->getChildren)(m_player);
if ( v4 )
{
v5 = v4;
if ( (unsigned int)sub_10024A36C(v4) )
{
v6 = 0;
do
{
v7 = sub_10024A388(v5, v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 328LL))(v7, 1);
++v6;
}
while ( v6 < (unsigned int)sub_10024A36C(v5) );
}
}
}
}