//
// GJItemIcon::darkenStoreItem from 0x10030802c to 0x100308168 (316 bytes)
//
// 6 xrefs:
// > GJGarageLayer::setupSpecialPage @ 0x100305628
// > GJItemIcon::darkenStoreItem_1 @ 0x100305de4
// > GJItemIcon::darkenStoreItem_1 @ 0x100305df0
// > GJItemIcon::changeToLockedState @ 0x100305e18
// > ShardsPage::init @ 0x1003a2964
// > GJPathPage::init @ 0x1003b96fc
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GJItemIcon::darkenStoreItem(GJItemIcon *a1, cocos2d::ccColor3B a2)
{
int v2; // w20
_BOOL4 m_isIcon; // w21
SimplePlayer *m_player; // x19
GJRobotSprite *m_robotSprite; // x0
GJRobotSprite *m_spiderSprite; // x0
__int64 v7; // x0
__int64 v8; // x19
unsigned int v9; // w20
__int64 v10; // x0
v2 = *(_DWORD *)&a2.r;
m_isIcon = a1->m_isIcon;
m_player = (SimplePlayer *)a1->m_player;
((void (__fastcall *)(SimplePlayer *, _BYTE *))m_player->setColor)(m_player, algn_100644D16);
((void (__fastcall *)(SimplePlayer *, __int64))m_player->setOpacity)(m_player, 120);
if ( m_isIcon )
{
m_player->m_hasGlowOutline = 0;
SimplePlayer::updateColors(m_player);
SimplePlayer::hideSecondary(m_player);
m_robotSprite = m_player->m_robotSprite;
if ( m_robotSprite )
{
GJRobotSprite::updateColor01(m_robotSprite, (cocos2d::ccColor3B)(v2 & 0xFFFFFF));
((void (__fastcall *)(GJRobotSprite *, __int64))m_player->m_robotSprite->setOpacity)(m_player->m_robotSprite, 190);
((void (__fastcall *)(GJRobotSprite *))m_player->m_robotSprite->hideSecondary)(m_player->m_robotSprite);
}
m_spiderSprite = m_player->m_spiderSprite;
if ( m_spiderSprite )
{
GJRobotSprite::updateColor01(m_spiderSprite, (cocos2d::ccColor3B)(v2 & 0xFFFFFF));
((void (__fastcall *)(GJSpiderSprite *, __int64))m_player->m_spiderSprite->setOpacity)(
m_player->m_spiderSprite,
190);
((void (__fastcall *)(GJSpiderSprite *))m_player->m_spiderSprite->hideSecondary)(m_player->m_spiderSprite);
}
}
else
{
v7 = ((__int64 (__fastcall *)(SimplePlayer *))m_player->getChildren)(m_player);
if ( v7 )
{
v8 = v7;
if ( (unsigned int)sub_10024A36C(v7) )
{
v9 = 0;
do
{
v10 = sub_10024A388(v8, v9);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 328LL))(v10, 0);
++v9;
}
while ( v9 < (unsigned int)sub_10024A36C(v8) );
}
}
}
}