//
// RewardUnlockLayer::playLabelEffect from 0x10021f050 to 0x10021f683 (1587 bytes)
//
// 2 xrefs:
// > RewardUnlockLayer::playRewardEffect @ 0x10021dc69
// > RewardUnlockLayer::playRewardEffect @ 0x10021de16
//
// 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 RewardUnlockLayer::playLabelEffect(
RewardUnlockLayer *a1,
int a2,
int a3,
cocos2d::CCSprite *a4,
cocos2d::CCPoint a5,
float a6)
{
__int64 v6; // r8
const std::string::value_type *v9; // rsi
__int64 v10; // xmm0_8
char v11; // bl
cocos2d::CCNode *v12; // r13
cocos2d::CCSprite *v13; // r12
const char *v14; // rdi
const char *data; // rdi
cocos2d::CCLabelBMFont *v16; // r14
cocos2d::CCString *v17; // rax
const char *CString; // rax
__int64 v19; // rbx
__int64 v20; // rax
unsigned int v21; // ebx
cocos2d::CCScaleTo *v22; // rax
unsigned int v23; // r15d
unsigned int v24; // eax
int v25; // ecx
int v26; // r8d
int v27; // r9d
cocos2d::CCAction *v28; // rax
unsigned int v29; // eax
int v30; // ecx
int v31; // r8d
int v32; // r9d
cocos2d::CCAction *v33; // rax
unsigned int v34; // ebx
unsigned int v35; // eax
int v36; // ecx
int v37; // r8d
int v38; // r9d
cocos2d::CCAction *v39; // rbx
unsigned int v40; // r15d
unsigned int v41; // eax
int v42; // ecx
int v43; // r8d
int v44; // r9d
cocos2d::CCAction *v45; // r13
unsigned int v46; // ebx
unsigned int v47; // eax
int v48; // ecx
int v49; // r8d
int v50; // r9d
cocos2d::CCAction *v51; // rax
char v52; // [rsp+0h] [rbp-A0h]
__int64 v53; // [rsp+8h] [rbp-98h]
_BYTE v55[8]; // [rsp+1Ch] [rbp-84h] BYREF
_BYTE v56[8]; // [rsp+24h] [rbp-7Ch] BYREF
char v57; // [rsp+2Ch] [rbp-74h] BYREF
_BYTE v58[8]; // [rsp+34h] [rbp-6Ch] BYREF
int v59; // [rsp+3Ch] [rbp-64h]
std::string v60; // [rsp+40h] [rbp-60h] BYREF
cocos2d::CCSprite *v61; // [rsp+60h] [rbp-40h]
float x; // [rsp+68h] [rbp-38h]
float v63; // [rsp+6Ch] [rbp-34h]
_BYTE v64[48]; // [rsp+70h] [rbp-30h] BYREF
x = a5.x;
v53 = v6;
v59 = a2;
memset(&v60, 0, sizeof(v60));
sub_10028CC60(v55);
sub_10028CC60(v56);
switch ( a3 )
{
case 1:
std::string::assign(&v60, "currencyOrbIcon_001.png");
goto LABEL_19;
case 3:
std::string::assign(&v60, "GJ_bigDiamond_001.png");
v10 = 1059481190;
goto LABEL_20;
case 4:
v9 = "fireShardBig_001.png";
goto LABEL_17;
case 5:
v9 = "iceShardBig_001.png";
goto LABEL_17;
case 6:
v9 = "poisonShardBig_001.png";
goto LABEL_17;
case 7:
v9 = "shadowShardBig_001.png";
goto LABEL_17;
case 8:
v9 = "lavaShardBig_001.png";
goto LABEL_17;
case 9:
std::string::assign(&v60, "GJ_bigKey_001.png");
sub_10028CBE0(v64, -7.0, 0.0);
sub_10028CC90();
*(_QWORD *)&a6 = 3204448256LL;
sub_10028CBE0(v64, 0.0, -0.5);
sub_10028CC90();
goto LABEL_14;
case 10:
v9 = "shard0201ShardBig_001.png";
goto LABEL_17;
case 11:
v9 = "shard0202ShardBig_001.png";
goto LABEL_17;
case 12:
v9 = "shard0203ShardBig_001.png";
goto LABEL_17;
case 13:
v9 = "shard0204ShardBig_001.png";
goto LABEL_17;
case 14:
v9 = "shard0205ShardBig_001.png";
LABEL_17:
std::string::assign(&v60, v9);
v10 = 1060320051;
v63 = 0.69999999;
v11 = 1;
goto LABEL_21;
case 16:
std::string::assign(&v60, "GJ_bigGoldKey_001.png");
sub_10028CBE0(v64, -7.0, 0.0);
sub_10028CC90();
*(_QWORD *)&a6 = 3204448256LL;
sub_10028CBE0(v64, 0.0, -0.5);
sub_10028CC90();
LABEL_14:
v10 = 1063675494;
goto LABEL_20;
default:
if ( !a4 )
goto LABEL_40;
LABEL_19:
v10 = 1067030938;
LABEL_20:
v63 = *(float *)&v10;
v11 = 0;
LABEL_21:
v12 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCNode *, __int64, double, double))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v12,
10,
*(double *)&v10,
*(double *)&a6);
v13 = a4;
if ( !a4 )
{
if ( (*(_BYTE *)&v60.__r_.__value_.__s.0 & 1) != 0 )
data = v60.__r_.__value_.__l.__data_;
else
data = v60.__r_.__value_.__s.__data_;
v13 = cocos2d::CCSprite::createWithSpriteFrameName(data);
if ( v11 )
goto LABEL_23;
LABEL_30:
v61 = nullptr;
goto LABEL_31;
}
if ( !v11 )
goto LABEL_30;
LABEL_23:
v14 = "shard2Shadow_001.png";
if ( a3 < 9 )
v14 = "shardShadow_001.png";
v61 = cocos2d::CCSprite::createWithSpriteFrameName(v14);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v13->addChild_0)(v13, v61, 0xFFFFFFFFLL);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v57, (const cocos2d::CCPoint *)v13);
sub_10028CBE0(v58, 0.0, 1.0);
sub_10028CCE0(v64, &v57);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v61->setPosition)(v61, v64);
LABEL_31:
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *))v12->addChild)(v12, v13);
((void (__fastcall *)(cocos2d::CCSprite *, float))v13->setScale)(v13, v63);
if ( a4 )
{
v16 = nullptr;
}
else
{
sub_10028CBE0(v64, 15.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v13->setPosition)(v13, v64);
v17 = (cocos2d::CCString *)sub_1007AB580("+%i", v52);
CString = cocos2d::CCString::getCString(v17);
v16 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
sub_10028CBE0(v64, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v16->setAnchorPoint)(v16, v64);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *))v12->addChild)(v12, v16);
sub_10028CBE0(v64, -2.0, -16.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v16->setPosition)(v16, v64);
v19 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v13->getPosition)(v13);
sub_10028CBE0(v58, -15.0, 0.0);
sub_10028CCE0(&v57, v19);
sub_10028CCE0(v64, &v57);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v16->setPosition)(v16, v64);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v16->setScale)(v16, 0.69999999);
v16->m_eObjType = 4;
cocos2d::CCLabelBMFont::limitLabelWidth(v16, 40.0, 0.69999999, 0.0);
}
v20 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v13->getPosition)(v13);
sub_10028CCE0(v64, v20);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v13->setPosition)(v13, v64);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v12->setPosition)(v12, v53);
((void (__fastcall *)(cocos2d::CCNode *, float))v12->setScale)(v12, 3.0);
v21 = (unsigned int)cocos2d::CCCallFuncO::create(
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)RewardUnlockLayer::labelEnterFinishedO,
v12);
v22 = cocos2d::CCScaleTo::create_1(0.30000001, 1.0);
v23 = (unsigned int)cocos2d::CCEaseBounceOut::create(v22);
v24 = (unsigned int)cocos2d::CCDelayTime::create(x);
v28 = (cocos2d::CCAction *)sub_1003B5760(v24, v23, 0, v25, v26, v27);
cocos2d::CCNode::runAction(v12, v28);
v29 = (unsigned int)cocos2d::CCDelayTime::create(x + 0.2);
v33 = (cocos2d::CCAction *)sub_1003B5760(v29, v21, 0, v30, v31, v32);
cocos2d::CCNode::runAction(v12, v33);
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))v13->setOpacity)(v13, 0);
if ( v16 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))v16->setOpacity)(v16, 0);
v34 = (unsigned int)cocos2d::CCDelayTime::create(x);
v35 = (unsigned int)cocos2d::CCFadeIn::create(0.30000001);
v39 = (cocos2d::CCAction *)sub_1003B5760(v34, v35, 0, v36, v37, v38);
v40 = (unsigned int)cocos2d::CCDelayTime::create(x);
v41 = (unsigned int)cocos2d::CCFadeIn::create(0.30000001);
v45 = (cocos2d::CCAction *)sub_1003B5760(v40, v41, 0, v42, v43, v44);
cocos2d::CCNode::runAction(v13, v39);
if ( v16 )
cocos2d::CCNode::runAction(v16, v45);
if ( v61 )
{
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))v61->setOpacity)(v61, 0);
v46 = (unsigned int)cocos2d::CCDelayTime::create(x);
v47 = (unsigned int)cocos2d::CCFadeIn::create(0.30000001);
v51 = (cocos2d::CCAction *)sub_1003B5760(v46, v47, 0, v48, v49, v50);
cocos2d::CCNode::runAction(v61, v51);
}
LABEL_40:
if ( (*(_BYTE *)&v60.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v60.__r_.__value_.__l.__data_);
return;
}
}