//
// EndLevelLayer::playDiamondEffect from 0x140207950 to 0x140207cd6 (902 bytes)
//
// 4 xrefs:
// > EndLevelLayer::showLayer @ 0x1402061a3
// > ??> @ 0x1408a45a0
// > ??> @ 0x1408a45b0
// > ??> @ 0x14091b29c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:28:15 +0000
//
struct cocos2d::CCAction *__fastcall EndLevelLayer::playDiamondEffect(__int64 a1, float a2)
{
struct cocos2d::CCAction *result; // rax
__int64 v4; // rax
cocos2d::CCNode *v5; // rsi
cocos2d::CCNode *v6; // r15
__int64 v7; // rbx
__int64 v8; // rax
cocos2d::CCString *v9; // rax
const char *CString; // rax
struct cocos2d::CCLabelBMFont *v11; // r14
__int64 v12; // rbx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rbx
__int64 v18; // rax
__int64 v19; // rdi
struct cocos2d::CCActionInterval *v20; // rax
struct cocos2d::CCEaseBounceOut *v21; // rbx
struct cocos2d::CCFiniteTimeAction *v22; // rax
struct cocos2d::CCAction *v23; // rax
struct cocos2d::CCFiniteTimeAction *v24; // rax
struct cocos2d::CCAction *v25; // rax
struct cocos2d::CCFiniteTimeAction *v26; // rbx
struct cocos2d::CCFadeIn *v27; // rax
struct cocos2d::CCAction *v28; // rsi
struct cocos2d::CCFiniteTimeAction *v29; // rbx
struct cocos2d::CCFadeIn *v30; // rax
struct cocos2d::CCAction *v31; // rdi
struct cocos2d::CCFiniteTimeAction *v32; // rbx
struct cocos2d::CCFadeIn *v33; // rax
char v34; // [rsp+70h] [rbp+8h] BYREF
char v35; // [rsp+80h] [rbp+18h] BYREF
char v36; // [rsp+88h] [rbp+20h] BYREF
result = *(struct cocos2d::CCAction **)(a1 + 608);
if ( result )
{
result = (struct cocos2d::CCAction *)*((unsigned int *)result + 3833);
*(_DWORD *)(a1 + 676) = (_DWORD)result;
if ( (int)result > 0 )
{
v4 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v4, &v35);
v5 = (cocos2d::CCNode *)cocos2d::CCNode::create();
(*(void (__fastcall **)(_QWORD, cocos2d::CCNode *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(
*(_QWORD *)(a1 + 576),
v5,
10);
v6 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png");
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCNode *))(*(_QWORD *)v5 + 464LL))(v5, v6);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v6 + 160LL))(v6);
v7 = *(_QWORD *)v6;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, 15.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(v7 + 184))(v6, v8);
v9 = cocos2d::CCString::createWithFormat("+%i", *(_DWORD *)(a1 + 676));
CString = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCLabelBMFont::create(CString, (const char *)&qword_140704F78);
v12 = *(_QWORD *)v11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v12 + 288))(v11, v13);
(*(void (__fastcall **)(cocos2d::CCNode *, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v5 + 464LL))(v5, v11);
v14 = *(_QWORD *)v11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, -2.0, -16.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v14 + 184))(v11, v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v36, -20.0, 0.0);
v17 = v16;
v18 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v6 + 200LL))(v6);
cocos2d::CCPoint::operator+(v18, &v34, v17);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v11 + 184LL))(v11, &v34);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v11 + 160LL))(v11);
*((_DWORD *)v11 + 7) = 4;
cocos2d::CCLabelBMFont::limitLabelWidth(v11, 40.0, 0.69999999, 0.0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v5 + 184LL))(v5, a1 + 656);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v5 + 160LL))(v5);
v19 = cocos2d::CCCallFunc::create(a1, EndLevelLayer::diamondEnterFinished);
v20 = cocos2d::CCScaleTo::create(0.30000001, 1.0);
v21 = cocos2d::CCEaseBounceOut::create(v20);
v22 = cocos2d::CCDelayTime::create(a2);
v23 = cocos2d::CCSequence::create(v22, v21, 0);
cocos2d::CCNode::runAction(v5, v23);
v24 = cocos2d::CCDelayTime::create(a2 + 0.2);
v25 = cocos2d::CCSequence::create(v24, v19, 0);
cocos2d::CCNode::runAction(v5, v25);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v6 + 40) + 40LL))((__int64)v6 + 320, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v11 + 46) + 40LL))((__int64)v11 + 368, 0);
v26 = cocos2d::CCDelayTime::create(a2);
v27 = cocos2d::CCFadeIn::create(0.30000001);
v28 = cocos2d::CCSequence::create(v26, v27, 0);
v29 = cocos2d::CCDelayTime::create(a2);
v30 = cocos2d::CCFadeIn::create(0.30000001);
v31 = cocos2d::CCSequence::create(v29, v30, 0);
v32 = cocos2d::CCDelayTime::create(a2);
v33 = cocos2d::CCFadeIn::create(0.30000001);
cocos2d::CCSequence::create(v32, v33, 0);
cocos2d::CCNode::runAction(v6, v28);
return cocos2d::CCNode::runAction(v11, v31);
}
}
return result;
}