//
// CurrencySprite::initWithSprite from 0x10032254c to 0x1003226f8 (428 bytes)
//
// 1 xrefs:
// > CurrencySprite::createWithSprite @ 0x100320f58
//
// 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
//
bool __fastcall CurrencySprite::initWithSprite(CurrencySprite *a1, cocos2d::CCSprite *a2)
{
_BOOL4 v4; // w19
cocos2d::CCSprite *v5; // x0
float v6; // s8
cocos2d::CCRotateBy *v7; // x0
cocos2d::CCRepeatForever *v8; // x0
cocos2d::CCSprite *m_burstSprite; // x0
cocos2d::CCSprite *v10; // x22
cocos2d::CCRotateBy *v11; // x0
cocos2d::CCRepeatForever *v12; // x0
__int16 v14; // [xsp+0h] [xbp-50h] BYREF
char v15; // [xsp+2h] [xbp-4Eh]
_BYTE v16[8]; // [xsp+4h] [xbp-4Ch] BYREF
__int16 v17; // [xsp+Ch] [xbp-44h] BYREF
char v18; // [xsp+Eh] [xbp-42h]
cocos2d::CCPoint v19; // 0:kr00_8.8
v4 = cocos2d::CCSprite::init(a1);
if ( v4 )
{
((void (__fastcall *)(CurrencySprite *, cocos2d::CCSprite *))a1->addChild)(a1, a2);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))a2->setPosition)(a2, &stru_10086E040);
v5 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
a1->m_burstSprite = v5;
cocos2d::CCObject::retain(v5);
if ( vcvts_n_f32_s32(rand(), 0x1Fu) <= 0.5 )
v6 = -1.0;
else
v6 = 1.0;
v7 = cocos2d::CCRotateBy::create_1(1.0, v6 * 90.0);
v8 = cocos2d::CCRepeatForever::create(v7);
cocos2d::CCNode::runAction(a1->m_burstSprite, v8);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_burstSprite->setScale)(a1->m_burstSprite, 2.0);
m_burstSprite = a1->m_burstSprite;
v18 = -1;
v17 = -1;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))m_burstSprite->setColor)(m_burstSprite, &v17);
v10 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))a1->m_burstSprite->addChild)(a1->m_burstSprite, v10);
v19 = cocos2d::CCNode::convertToNodeSpace(a1->m_burstSprite, &stru_10086E040);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *, float, float))v10->setPosition)(v10, v16, v19.x, v19.y);
((void (__fastcall *)(cocos2d::CCSprite *, float))v10->setScale)(v10, 0.8);
v15 = -1;
v14 = -1;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v10->setColor)(v10, &v14);
v11 = cocos2d::CCRotateBy::create_1(1.0, v6 * -180.0);
v12 = cocos2d::CCRepeatForever::create(v11);
cocos2d::CCNode::runAction(v10, v12);
}
return v4;
}