//
// RewardUnlockLayer::playLabelEffect from 0x9364ec to 0x936c28 (1852 bytes)
//
// 5 xrefs:
// > RewardUnlockLayer::playRewardEffect @ 0x939564
// > RewardUnlockLayer::playRewardEffect @ 0x939700
// > RewardUnlockLayer::playRewardEffect @ 0x939744
// > RewardUnlockLayer::playRewardEffect @ 0x939770
// > ??> @ 0x43530
//
// 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 RewardUnlockLayer::playLabelEffect(
RewardUnlockLayer *a1,
int a2,
int a3,
cocos2d::CCSprite *a4,
cocos2d::CCPoint a5,
float a6)
{
const cocos2d::CCPoint *v6; // x4
float x; // s8
float v11; // s9
int v12; // w21
cocos2d::CCNode *v13; // x20
cocos2d::CCSprite *v14; // x19
const char *v15; // x0
cocos2d::CCSprite *v16; // x22
cocos2d::CCLabelBMFont *v17; // x23
void (__fastcall *v18)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26
__int64 v19; // x0
cocos2d::CCCallFuncO *v20; // x24
cocos2d::CCActionInterval *v21; // x0
cocos2d::CCEaseBounceOut *v22; // x25
cocos2d::CCSequence *v23; // x0
cocos2d::CCAction *v24; // x0
cocos2d::CCSequence *v25; // x0
cocos2d::CCAction *v26; // x0
cocos2d::CCSequence *v27; // x20
cocos2d::CCFadeIn *v28; // x0
cocos2d::CCAction *v29; // x20
cocos2d::CCSequence *v30; // x24
cocos2d::CCFadeIn *v31; // x0
cocos2d::CCAction *v32; // x24
cocos2d::CCSequence *v33; // x19
cocos2d::CCFadeIn *v34; // x0
cocos2d::CCAction *v35; // x0
char *p_m_fBrVertexMod; // x23
float v37; // s0
float v38; // s1
float v39; // s0
float v40; // s1
unsigned int *p_m_fTextureTop; // x22
int m_fTextureTop_low; // w0
void (__fastcall *v43)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCString *v44; // x0
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26
void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
char *v48; // [xsp+78h] [xbp+78h]
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [xsp+88h] [xbp+88h]
void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+88h] [xbp+88h]
const cocos2d::CCPoint *v51; // [xsp+98h] [xbp+98h]
cocos2d::CCSprite *v52; // [xsp+A8h] [xbp+A8h] BYREF
cocos2d::CCPoint v53; // [xsp+B0h] [xbp+B0h] BYREF
cocos2d::CCPoint v54; // [xsp+B8h] [xbp+B8h] BYREF
cocos2d::CCPoint v55; // [xsp+C0h] [xbp+C0h] BYREF
cocos2d::CCPoint v56; // [xsp+C8h] [xbp+C8h] BYREF
cocos2d::CCPoint v57; // [xsp+D0h] [xbp+D0h] BYREF
cocos2d::SEL_MenuHandler v58; // 0:x1.16
x = a5.x;
v51 = v6;
v52 = (cocos2d::CCSprite *)&byte_124B6C8;
cocos2d::CCPoint::CCPoint(&v53, &stru_12434F8);
cocos2d::CCPoint::CCPoint(&v54, &stru_12434F8);
switch ( a3 )
{
case 1:
sub_D1798C(&v52, "currencyOrbIcon_001.png", 23);
goto LABEL_3;
case 3:
sub_D1798C(&v52, "GJ_bigDiamond_001.png", 21);
v11 = 0.65;
v12 = 0;
goto LABEL_4;
case 4:
sub_D1798C(&v52, "fireShardBig_001.png", 20);
goto LABEL_23;
case 5:
sub_D1798C(&v52, "iceShardBig_001.png", 19);
goto LABEL_23;
case 6:
sub_D1798C(&v52, "poisonShardBig_001.png", 22);
goto LABEL_23;
case 7:
sub_D1798C(&v52, "shadowShardBig_001.png", 22);
goto LABEL_23;
case 8:
sub_D1798C(&v52, "lavaShardBig_001.png", 20);
goto LABEL_23;
case 9:
sub_D1798C(&v52, "GJ_bigKey_001.png", 17);
goto LABEL_25;
case 10:
sub_D1798C(&v52, "shard0201ShardBig_001.png", 25);
goto LABEL_23;
case 11:
sub_D1798C(&v52, "shard0202ShardBig_001.png", 25);
goto LABEL_23;
case 12:
sub_D1798C(&v52, "shard0203ShardBig_001.png", 25);
goto LABEL_23;
case 13:
sub_D1798C(&v52, "shard0204ShardBig_001.png", 25);
goto LABEL_23;
case 14:
sub_D1798C(&v52, "shard0205ShardBig_001.png", 25);
LABEL_23:
v12 = 1;
v11 = 0.7;
goto LABEL_4;
case 16:
sub_D1798C(&v52, "GJ_bigGoldKey_001.png", 21);
LABEL_25:
cocos2d::CCPoint::CCPoint(&v57, -7.0, 0.0);
cocos2d::CCPoint::operator=(&v53, v37, v38);
cocos2d::CCPoint::CCPoint(&v57, 0.0, -0.5);
cocos2d::CCPoint::operator=(&v54, v39, v40);
v12 = 0;
v11 = 0.9;
goto LABEL_4;
default:
if ( a4 )
{
LABEL_3:
v11 = 1.2;
v12 = 0;
LABEL_4:
v13 = cocos2d::CCNode::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v13, 10);
v14 = a4;
if ( a4 )
{
if ( v12 )
{
LABEL_6:
if ( a3 <= 8 )
v15 = "shardShadow_001.png";
else
v15 = "shard2Shadow_001.png";
v16 = cocos2d::CCSprite::createWithSpriteFrameName(v15);
v14->addChild_0(v14, v16, -1);
setPosition = v16->setPosition;
cocos2d::CCNode::convertToNodeSpace(v14, &stru_12434F8);
cocos2d::CCPoint::CCPoint(&v56, 0.0, 1.0);
cocos2d::CCPoint::operator+(&v57, &v55, &v56);
setPosition(v16, &v57);
goto LABEL_9;
}
}
else
{
v14 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v52);
if ( v12 )
goto LABEL_6;
}
v16 = nullptr;
LABEL_9:
v13->addChild(v13, v14);
v14->setScale(v14, v11);
if ( a4 )
{
v17 = nullptr;
}
else
{
v43 = v14->setPosition;
cocos2d::CCPoint::CCPoint(&v57, 15.0, 0.0);
v43(v14, &v57);
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"+%i",
(const char *)(unsigned int)a2);
cocos2d::CCString::getCString(v44);
v17 = cocos2d::CCLabelBMFont::create();
setAnchorPoint = v17->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v57, 1.0, 0.5);
setAnchorPoint(v17, &v57);
v13->addChild(v13, v17);
v46 = v17->setPosition;
cocos2d::CCPoint::CCPoint(&v57, -2.0, -16.0);
v46(v17, &v57);
v50 = v17->setPosition;
v48 = (char *)v14->getPosition(v14);
cocos2d::CCPoint::CCPoint(&v55, -15.0, 0.0);
cocos2d::CCPoint::operator+(&v56, v48, &v55);
cocos2d::CCPoint::operator+(&v57, &v56, &v53);
v50(v17, &v57);
v17->setScale(v17, 0.7);
v17->m_eObjType = 4;
cocos2d::CCLabelBMFont::limitLabelWidth(v17, 40.0, 0.7, 0.0);
}
v18 = v14->setPosition;
v19 = (__int64)v14->getPosition(v14);
cocos2d::CCPoint::operator+(&v57, v19, &v54);
v18(v14, &v57);
v13->setPosition(v13, v51);
v13->setScale(v13, 3.0);
v58.adj = 0;
v58.ptr = (void (__cdecl *)(cocos2d::CCObject *))RewardUnlockLayer::labelEnterFinishedO;
v20 = cocos2d::CCCallFuncO::create(a1, v58, v13);
v21 = (cocos2d::CCActionInterval *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)v20, 0.3, 1.0);
v22 = cocos2d::CCEaseBounceOut::create(v21);
v23 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(x);
v24 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v23, v22, 0);
cocos2d::CCNode::runAction(v13, v24);
v25 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(x + 0.2);
v26 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v25, v20, 0);
cocos2d::CCNode::runAction(v13, v26);
v14->setOpacity(v14, 0);
if ( v17 )
v17->setOpacity(v17, 0);
v27 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(x);
v28 = cocos2d::CCFadeIn::create(0.3);
v29 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v27, v28, 0);
v30 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(x);
v31 = cocos2d::CCFadeIn::create(0.3);
v32 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v30, v31, 0);
cocos2d::CCNode::runAction(v14, v29);
if ( v17 )
cocos2d::CCNode::runAction(v17, v32);
if ( v16 )
{
v16->setOpacity(v16, 0);
v33 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(x);
v34 = cocos2d::CCFadeIn::create(0.3);
v35 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v33, v34, 0);
cocos2d::CCNode::runAction(v16, v35);
}
p_m_fBrVertexMod = (char *)&v52[-1].m_fBrVertexMod;
if ( (__int64 *)&v52[-1].m_fBrVertexMod != &qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_fTextureTop = (unsigned int *)&v52[-1].m_fTextureTop;
do
m_fTextureTop_low = __ldaxr(p_m_fTextureTop);
while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) );
}
else
{
m_fTextureTop_low = LODWORD(v52[-1].m_fTextureTop);
LODWORD(v52[-1].m_fTextureTop) = m_fTextureTop_low - 1;
}
if ( m_fTextureTop_low <= 0 )
operator delete(p_m_fBrVertexMod);
}
return;
}
if ( (__int64 *)&v52[-1].m_fBrVertexMod != &qword_124B6B0 )
sub_9349C0(&v52[-1].m_fBrVertexMod);
return;
}
}