//
// GJSmartBlockPreview::toggleSelectItem from 0x100009550 to 0x100009614 (196 bytes)
//
// 1 xrefs:
// > BrowseSmartKeyLayer::onPrefabObject @ 0x1000733ac
//
// 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 GJSmartBlockPreview::toggleSelectItem(GJSmartBlockPreview *a1, bool a2)
{
__int64 v2; // x29
__int64 v3; // x30
_BOOL8 v4; // x19
cocos2d::CCSprite *m_selectSprite; // x0
cocos2d::CCSprite *v7; // x0
__n128 v8; // q0
cocos2d::CCSprite *v9; // x21
__n128 v10; // q1
_BYTE v11[8]; // [xsp+8h] [xbp-38h] BYREF
__int64 v12; // [xsp+30h] [xbp-10h]
__int64 v13; // [xsp+38h] [xbp-8h]
cocos2d::CCPoint v14; // 0:kr00_8.8
if ( a1->m_selected != a2 )
{
v12 = v2;
v13 = v3;
v4 = a2;
a1->m_selected = a2;
m_selectSprite = a1->m_selectSprite;
if ( !m_selectSprite )
{
v7 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png");
a1->m_selectSprite = v7;
((void (__fastcall *)(GJSmartBlockPreview *, cocos2d::CCSprite *))a1->addChild)(a1, v7);
v8 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->m_selectSprite->setScale)(a1->m_selectSprite, 2.8);
v9 = a1->m_selectSprite;
v8.n128_u32[0] = 1110704128;
v10.n128_u32[0] = 1110704128;
v14 = sub_100022980(v8, v10);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *, float, float))v9->setPosition)(v9, v11, v14.x, v14.y);
m_selectSprite = a1->m_selectSprite;
}
((void (__fastcall *)(cocos2d::CCSprite *, _BOOL8))m_selectSprite->setVisible)(m_selectSprite, v4);
}
}