//
// CurrencySprite::initWithSprite from 0x90dba0 to 0x90dd88 (488 bytes)
//
// 2 xrefs:
// > CurrencySprite::createWithSprite @ 0x90de28
// > ??> @ 0x50f28
//
// 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 CurrencySprite::initWithSprite(CurrencySprite *a1, cocos2d::CCSprite *a2)
{
bool v4; // w22
cocos2d::CCSprite *v6; // x0
cocos2d::CCRotateBy *v7; // x0
float v8; // s1
float v9; // s8
cocos2d::CCActionInterval *v10; // x0
cocos2d::CCRepeatForever *v11; // x0
cocos2d::CCSprite *m_burstSprite; // x0
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2
cocos2d::CCSprite *v14; // x21
cocos2d::CCSprite *v15; // x0
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20
void (__fastcall *v17)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2
cocos2d::CCRotateBy *v18; // x0
cocos2d::CCActionInterval *v19; // x0
cocos2d::CCRepeatForever *v20; // x0
char v21; // [xsp+60h] [xbp+60h] BYREF
char v22; // [xsp+61h] [xbp+61h]
char v23; // [xsp+62h] [xbp+62h]
cocos2d::CCPoint v24; // 0:kr00_8.8
v4 = cocos2d::CCSprite::init(a1);
if ( v4 )
{
a1->addChild(a1, a2);
a2->setPosition(a2, &stru_1243290);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
a1->m_burstSprite = v6;
cocos2d::CCObject::retain(v6);
v7 = (cocos2d::CCRotateBy *)rand();
if ( (float)((float)(int)v7 * 4.6566e-10) > 0.5 )
{
v8 = 90.0;
v9 = -1.0;
}
else
{
v8 = -90.0;
v9 = 1.0;
}
v10 = (cocos2d::CCActionInterval *)cocos2d::CCRotateBy::create(v7, 1.0, v8);
v11 = cocos2d::CCRepeatForever::create(v10);
cocos2d::CCNode::runAction(a1->m_burstSprite, v11);
a1->m_burstSprite->setScale(a1->m_burstSprite, 2.0);
m_burstSprite = a1->m_burstSprite;
setColor = m_burstSprite->setColor;
v21 = -1;
v22 = -1;
v23 = -1;
setColor(m_burstSprite, (const cocos2d::ccColor3B *)&v21);
v14 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
a1->m_burstSprite->addChild(a1->m_burstSprite, v14);
v15 = a1->m_burstSprite;
setPosition = v14->setPosition;
v24 = cocos2d::CCNode::convertToNodeSpace(v15, &stru_1243290);
((void (__fastcall *)(cocos2d::CCSprite *, char *, float, float))setPosition)(v14, &v21, v24.x, v24.y);
v14->setScale(v14, 0.8);
v17 = v14->setColor;
v21 = -1;
v22 = -1;
v23 = -1;
v18 = (cocos2d::CCRotateBy *)((__int64 (__fastcall *)(cocos2d::CCSprite *, char *))v17)(v14, &v21);
v19 = (cocos2d::CCActionInterval *)cocos2d::CCRotateBy::create(v18, 1.0, v9 * 180.0);
v20 = cocos2d::CCRepeatForever::create(v19);
cocos2d::CCNode::runAction(v14, v20);
}
return v4;
}