//
// EndLevelLayer::playCurrencyEffect from 0x140136190 to 0x140136507 (887 bytes)
//
// 4 xrefs:
// > EndLevelLayer::showLayer @ 0x140134e4c
// > ??> @ 0x140671314
// > ??> @ 0x140671324
// > ??> @ 0x1406c9fb4
//
// 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 EndLevelLayer::playCurrencyEffect(EndLevelLayer *a1, float a2)
{
PlayLayer *m_playLayer; // rax
int m_orbs; // eax
cocos2d::CCDirector *v5; // rax
CCLightFlash *v6; // rsi
CCLightFlash *v7; // r15
CCLightFlash_vtbl *v8; // rbx
const cocos2d::CCPoint *v9; // rax
cocos2d::CCString *v10; // rax
const char *CString; // rax
struct cocos2d::CCLabelBMFont *v12; // r14
cocos2d::CCLabelBMFont_vtbl *v13; // rbx
const cocos2d::CCPoint *v14; // rax
cocos2d::CCLabelBMFont_vtbl *v15; // rbx
const cocos2d::CCPoint *v16; // rax
__int64 v17; // rax
__int64 v18; // rdi
struct cocos2d::CCScaleTo *v19; // rax
struct cocos2d::CCEaseBounceOut *v20; // rbx
struct cocos2d::CCDelayTime *v21; // rax
struct cocos2d::CCSequence *v22; // rax
cocos2d::ccColor3B *v23; // r8
struct cocos2d::CCDelayTime *v24; // rax
struct cocos2d::CCSequence *v25; // rax
cocos2d::ccColor3B *v26; // r8
struct cocos2d::CCDelayTime *v27; // rbx
struct cocos2d::CCFadeIn *v28; // rax
struct cocos2d::CCSequence *v29; // rsi
struct cocos2d::CCDelayTime *v30; // rbx
struct cocos2d::CCFadeIn *v31; // rax
struct cocos2d::CCSequence *v32; // rdi
struct cocos2d::CCDelayTime *v33; // rbx
struct cocos2d::CCFadeIn *v34; // rax
cocos2d::ccColor3B *v35; // r8
cocos2d::ccColor3B *v36; // r8
float v37; // [rsp+20h] [rbp-48h]
float v38; // [rsp+20h] [rbp-48h]
float v39; // [rsp+20h] [rbp-48h]
float v40; // [rsp+20h] [rbp-48h]
cocos2d::CCPoint v41; // [rsp+70h] [rbp+8h] BYREF
cocos2d::CCPoint v42; // [rsp+88h] [rbp+20h] BYREF
m_playLayer = a1->m_playLayer;
if ( m_playLayer )
{
m_orbs = m_playLayer->m_orbs;
a1->m_orbs = m_orbs;
if ( m_orbs > 0 )
{
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v5);
v6 = (CCLightFlash *)cocos2d::CCNode::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, 10);
v7 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_14053DCE8);
v6->addChild_1(v6, v7);
((void (__fastcall *)(CCLightFlash *))v7->setScale_0)(v7);
v8 = v7->__vftable;
cocos2d::CCPoint::CCPoint(&v41, 15.0, 0.0);
v8->setPosition_0(v7, v9);
v10 = cocos2d::CCString::createWithFormat("+%i", a1->m_orbs);
CString = cocos2d::CCString::getCString(v10);
v12 = cocos2d::CCLabelBMFont::create(CString, (const char *)&qword_14052A4D8);
v13 = v12->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v41, 1.0, 0.5);
v13->setAnchorPoint(v12, v14);
v6->addChild_1(v6, v12);
v15 = v12->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v41, -2.0, -16.0);
v15->setPosition_0(v12, v16);
cocos2d::CCPoint::CCPoint(&v42, -20.0, 0.0);
v17 = (__int64)v7->getPosition_0(v7);
cocos2d::CCPoint::operator+(v17, &v41);
v12->setPosition_0(v12, &v41);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v12->setScale_0)(v12);
v12->m_eObjType = 4;
cocos2d::CCLabelBMFont::limitLabelWidth(v12, 40.0, 0.69999999, 0.0);
v6->setPosition_0(v6, &a1->m_orbsPosition);
((void (__fastcall *)(CCLightFlash *))v6->setScale_0)(v6);
v18 = cocos2d::CCCallFunc::create(a1, EndLevelLayer::currencyEnterFinished);
v19 = cocos2d::CCScaleTo::create(0.30000001, 1.0);
v20 = cocos2d::CCEaseBounceOut::create(v19);
v21 = cocos2d::CCDelayTime::create(a2);
v22 = cocos2d::CCSequence::create(v21, v20, 0);
cocos2d::CCNode::runAction(v6, (cocos2d::CCPoint)v22, v23, 0.0, v37);
v24 = cocos2d::CCDelayTime::create(a2 + 0.2);
v25 = cocos2d::CCSequence::create(v24, v18, 0);
cocos2d::CCNode::runAction(v6, (cocos2d::CCPoint)v25, v26, 0.0, v38);
(*(void (__fastcall **)(cocos2d::CCArray **, _QWORD))&v7->m_lightStripArray->m_unknown2)(
&v7->m_lightStripArray,
0);
v12->setOpacity(&v12->cocos2d::CCRGBAProtocol, 0);
v27 = cocos2d::CCDelayTime::create(a2);
v28 = cocos2d::CCFadeIn::create(0.30000001);
v29 = cocos2d::CCSequence::create(v27, v28, 0);
v30 = cocos2d::CCDelayTime::create(a2);
v31 = cocos2d::CCFadeIn::create(0.30000001);
v32 = cocos2d::CCSequence::create(v30, v31, 0);
v33 = cocos2d::CCDelayTime::create(a2);
v34 = cocos2d::CCFadeIn::create(0.30000001);
cocos2d::CCSequence::create(v33, v34, 0);
cocos2d::CCNode::runAction(v7, (cocos2d::CCPoint)v29, v35, 0.0, v39);
cocos2d::CCNode::runAction((CCLightFlash *)v12, (cocos2d::CCPoint)v32, v36, 0.0, v40);
}
}
}