//
// PlayLayer::showNewBest from 0x30fca8 to 0x31097e (3286 bytes)
//
// 2 xrefs:
// > PlayLayer::destroyPlayer @ 0x314012
// > PlayLayer::destroyPlayer @ 0x314184
//
// 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 PlayLayer::showNewBest(PlayLayer *a1, bool a2, int a3, int a4, bool a5, bool a6, bool a7)
{
_BOOL4 v9; // r4
float v10; // s19
cocos2d::CCDirector *v11; // r0
float v12; // s15
cocos2d::CCNode *v13; // r5
cocos2d::CCSprite *v14; // r4
void (__fastcall *v15)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
char *v16; // r1
cocos2d::CCLabelBMFont *v17; // r9
void (__fastcall *v18)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
void (__fastcall *v19)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::CCLabelBMFont *v20; // r11
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCString *v23; // r0
cocos2d::CCLabelBMFont *v24; // r11
void (__fastcall *v25)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
float v27; // s18
cocos2d::CCString *v28; // r0
cocos2d::CCLabelBMFont *v29; // r4
cocos2d::CCSprite *v30; // r10
void (__fastcall *v31)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11
FMODAudioEngine *v32; // r11
int v33; // r2
int v34; // r3
float width; // s24
float v36; // s23
float v37; // s22
float v38; // s21
float v39; // s17
float v40; // s15
void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
int v42; // r11
float v43; // s17
float v44; // r0
cocos2d::CCString *v45; // r0
cocos2d::CCLabelBMFont *v46; // r4
cocos2d::CCSprite *v47; // r10
void (__fastcall *v48)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11
FMODAudioEngine *v49; // r11
int v50; // r2
int v51; // r3
float v52; // s24
float v53; // s23
float v54; // s22
float v55; // s21
float v56; // s17
float v57; // s15
void (__fastcall *v58)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11
int v59; // r11
float v60; // s16
float v61; // r0
CurrencySpriteType v62; // r11
CurrencyRewardLayer *v63; // r7
FMODAudioEngine *v64; // r8
int v65; // r2
int v66; // r3
float v67; // r2
cocos2d::CCEaseElasticOut *v68; // r0
float v69; // r2
cocos2d::CCSequence *v70; // r11
cocos2d::CCDelayTime *v71; // r10
cocos2d::CCScaleTo *v72; // r0
cocos2d::CCEaseIn *v73; // r9
cocos2d::CCHide *v74; // r8
int v75; // r0
cocos2d::CCAction *v76; // r0
cocos2d::CCLayerColor *v77; // r8
cocos2d::CCSequence *v78; // r10
cocos2d::CCDelayTime *v79; // r9
cocos2d::CCFadeTo *v80; // r6
int v81; // r0
cocos2d::CCAction *v82; // r0
int v84; // [sp+24h] [bp-38h]
void (__fastcall *v85)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-34h]
void (__fastcall *v86)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-34h]
cocos2d::CCSize v87; // [sp+34h] [bp-28h] BYREF
cocos2d::CCPoint v88; // [sp+3Ch] [bp-20h] BYREF
cocos2d::CCPoint v89; // [sp+44h] [bp-18h] BYREF
cocos2d::CCPoint v90; // [sp+4Ch] [bp-10h] BYREF
v9 = a2;
v10 = 0.7;
v84 = a3 + a4;
if ( a3 + a4 > 0 )
v10 = 1.3;
v11 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v87, v11);
v12 = 10.0;
if ( v84 <= 0 )
v12 = 0.0;
cocos2d::CCPoint::CCPoint(&v88, v87.width * 0.5, (float)((float)(v87.height * 0.5) + 20.0) + v12);
v13 = cocos2d::CCNode::create();
a1->addChild_0(a1, v13, 100);
v13->setPosition(v13, &v88);
if ( !a7 )
{
if ( v9 && !a1->m_doNot )
{
v20 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v20->setScale)(v20, 1067030938);
setPosition = v20->setPosition;
cocos2d::CCPoint::CCPoint(&v90, 0.0, 5.0);
setPosition(v20, &v90);
setAnchorPoint = v20->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.5, 0.0);
setAnchorPoint(v20, &v90);
v13->addChild(v13, v20);
}
else if ( a1->m_doNot )
{
sub_776584((int)&v89, "RIP");
rand();
switch ( lroundf() )
{
case 1:
v16 = "Y u die?";
goto LABEL_101;
case 2:
v16 = "Not 100%";
goto LABEL_101;
case 3:
v16 = "Try jump?";
goto LABEL_101;
case 4:
v16 = "Kappa";
goto LABEL_101;
case 5:
v16 = "Too slow";
goto LABEL_101;
case 6:
v16 = "Ples omg why no";
goto LABEL_101;
case 7:
v16 = "Maybe jump?";
goto LABEL_101;
case 8:
v16 = "Problem?";
goto LABEL_101;
case 9:
v16 = "Nice crash";
goto LABEL_101;
case 10:
v16 = "Try again?";
goto LABEL_101;
case 11:
v16 = "Almost...";
goto LABEL_101;
case 12:
v16 = "Hehe...";
goto LABEL_101;
case 13:
v16 = "U no like?";
goto LABEL_101;
case 14:
v16 = "RIP";
goto LABEL_101;
case 15:
v16 = "Rage time?";
goto LABEL_101;
case 16:
v16 = "One more?";
goto LABEL_101;
case 17:
v16 = "Noscope";
goto LABEL_101;
case 18:
v16 = "Feel the pain";
goto LABEL_101;
case 19:
v16 = "Over 1%!";
goto LABEL_101;
case 20:
v16 = "BOOM!";
goto LABEL_101;
case 21:
v16 = "Click faster";
goto LABEL_101;
case 22:
v16 = "Dont be sad";
goto LABEL_101;
case 23:
v16 = "Go again";
goto LABEL_101;
case 24:
v16 = "So close";
goto LABEL_101;
case 25:
v16 = "What!?";
goto LABEL_101;
case 26:
v16 = "You ok?";
goto LABEL_101;
case 27:
v16 = "Did he died?";
goto LABEL_101;
case 28:
v16 = "Go?";
goto LABEL_101;
case 29:
v16 = "Game Over";
goto LABEL_101;
case 30:
v16 = "LOL";
goto LABEL_101;
case 31:
v16 = "RubRub?";
goto LABEL_101;
case 32:
v16 = "You Died";
goto LABEL_101;
case 33:
v16 = "Continue?";
goto LABEL_101;
case 34:
v16 = "Fail";
goto LABEL_101;
case 35:
v16 = "Wrong button";
goto LABEL_101;
case 36:
v16 = "Too slow";
goto LABEL_101;
case 37:
v16 = "Insert coin";
goto LABEL_101;
case 38:
v16 = "You Lose";
goto LABEL_101;
case 39:
v16 = "Combo Breaker!";
goto LABEL_101;
case 40:
v16 = "Time's Up!";
goto LABEL_101;
case 41:
v16 = "GGWP";
goto LABEL_101;
case 42:
v16 = "VAMOS";
goto LABEL_101;
case 43:
v16 = "Not ok";
goto LABEL_101;
case 44:
v16 = "Dead, you are";
goto LABEL_101;
case 45:
v16 = "Slow down";
goto LABEL_101;
case 46:
v16 = "Nice try";
goto LABEL_101;
case 47:
v16 = "Take a break";
goto LABEL_101;
case 48:
v16 = "Explosion!";
goto LABEL_101;
case 49:
v16 = "So random";
goto LABEL_101;
case 50:
v16 = "...";
goto LABEL_101;
case 51:
v16 = "Is that it?";
goto LABEL_101;
case 52:
v16 = "Not even close";
goto LABEL_101;
case 53:
v16 = "Give up";
goto LABEL_101;
case 54:
v16 = "Hotel?";
goto LABEL_101;
case 55:
v16 = "liaf uoy";
goto LABEL_101;
case 56:
v16 = "Go home";
goto LABEL_101;
case 57:
v16 = "Spam?";
goto LABEL_101;
case 58:
v16 = "Try harder";
goto LABEL_101;
case 59:
v16 = "PogChamp";
goto LABEL_101;
case 60:
v16 = "Hang in there";
goto LABEL_101;
case 61:
v16 = "That's progress for ya";
goto LABEL_101;
case 62:
v16 = "Unlucky";
goto LABEL_101;
case 63:
v16 = "Why tho?";
goto LABEL_101;
case 64:
v16 = "Nope!";
goto LABEL_101;
case 65:
v16 = "Brutal";
goto LABEL_101;
case 66:
v16 = "Not like this";
goto LABEL_101;
case 67:
v16 = "Oopsie";
goto LABEL_101;
case 68:
v16 = "Crushed";
goto LABEL_101;
case 69:
v16 = "A for effort";
goto LABEL_101;
case 70:
v16 = "Denied";
goto LABEL_101;
case 71:
v16 = "So far, so bad";
goto LABEL_101;
case 72:
v16 = "Was that the plan?";
goto LABEL_101;
case 73:
v16 = "Spike loves you.";
goto LABEL_101;
case 74:
v16 = "Spike: 1, You: 0";
goto LABEL_101;
case 75:
v16 = "Need a Map?";
goto LABEL_101;
case 76:
v16 = "Who put that there?";
goto LABEL_101;
case 77:
v16 = "That looked painful";
goto LABEL_101;
case 78:
v16 = "Don't quit your day job";
goto LABEL_101;
case 79:
v16 = "Again? Really?";
goto LABEL_101;
case 80:
v16 = "Stop testing gravity";
goto LABEL_101;
case 81:
v16 = "I blame 240fps";
goto LABEL_101;
case 82:
v16 = "Wrong way!";
goto LABEL_101;
case 83:
v16 = "RobTop pls fix!";
goto LABEL_101;
case 84:
v16 = "Who buffed this?";
goto LABEL_101;
case 85:
v16 = "Geometry Dash'nt";
goto LABEL_101;
case 86:
v16 = "I like that part";
goto LABEL_101;
case 87:
v16 = "Checkpoints, pls";
goto LABEL_101;
case 88:
v16 = "Why jump there?";
goto LABEL_101;
case 89:
v16 = "Who said GO?!";
goto LABEL_101;
case 90:
v16 = "New Best'nt";
LABEL_101:
sub_7753D4((int)&v89, v16);
break;
default:
break;
}
v17 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v17->setScale)(v17, 1067030938);
v18 = v17->setPosition;
cocos2d::CCPoint::CCPoint(&v90, 0.0, 5.0);
v18(v17, &v90);
v19 = v17->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.5, 0.0);
v19(v17, &v90);
v13->addChild(v13, v17);
sub_774008(&v89);
}
else
{
v14 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBest_001.png");
v13->addChild(v13, v14);
v15 = v14->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.5, 0.0);
v15(v14, &v90);
}
}
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)a1->m_lastAttemptPercent);
cocos2d::CCString::getCString(v23);
v24 = cocos2d::CCLabelBMFont::create();
v25 = v24->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.5, 1.0);
v25(v24, &v90);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v24->setScale)(v24, 1066192077);
v26 = v24->setPosition;
cocos2d::CCPoint::CCPoint(&v90, 0.0, -4.0);
v26(v24, &v90);
v13->addChild(v13, v24);
if ( a4 <= 0 )
{
if ( a3 <= 0 )
goto LABEL_127;
v27 = -5.0;
}
else
{
v27 = -5.0;
if ( a3 > 0 )
v27 = -20.0;
v28 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"+%i", (const char *)a4);
cocos2d::CCString::getCString(v28);
v29 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v29->setScale)(v29, 1058642330);
v13->addChild(v13, v29);
v30 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png");
v31 = v30->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.0, 0.5);
v31(v30, &v90);
((void (__fastcall *)(cocos2d::CCSprite *, int))v30->setScale)(v30, 1057803469);
v13->addChild(v13, v30);
if ( !a5 )
{
v32 = FMODAudioEngine::sharedEngine();
sub_776584((int)&v90, "gold02.ogg");
FMODAudioEngine::playEffect(v32, (int)&v90, v33, v34);
sub_774008(&v90);
}
if ( a3 > 0 )
{
v40 = 40.0;
}
else
{
width = v29->getContentSize(v29)->width;
v36 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v29->getScale)(v29));
v37 = v30->getContentSize(v30)->width;
v38 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v30->getScale)(v30));
v39 = v29->getContentSize(v29)->width;
v40 = -(float)((float)((float)((float)((float)(width * v36) + 1.0) + (float)(v37 * v38)) * 0.5)
- (float)((float)(v39 * v29->getScale(v29)) * 0.5));
}
v41 = v29->setPosition;
cocos2d::CCPoint::CCPoint(&v90, v40 + v27, -62.0);
v41(v29, &v90);
v85 = v30->setPosition;
v42 = (int)v29->getPosition(v29);
v43 = v29->getContentSize(v29)->width;
v44 = v29->getScale(v29);
cocos2d::CCPoint::CCPoint(&v89, (float)((float)(v43 * 0.5) * v44) + 1.0, -1.0);
cocos2d::CCPoint::operator+(&v90, v42, &v89);
v85(v30, &v90);
if ( a3 <= 0 )
goto LABEL_120;
}
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"+%i", (const char *)a3);
cocos2d::CCString::getCString(v45);
v46 = cocos2d::CCLabelBMFont::create();
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v46->setScale)(v46, 1058642330);
v13->addChild(v13, v46);
v47 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
v48 = v47->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v90, 0.0, 0.5);
v48(v47, &v90);
v13->addChild(v13, v47);
v49 = FMODAudioEngine::sharedEngine();
sub_776584((int)&v90, "magicExplosion.ogg");
FMODAudioEngine::playEffect(v49, (int)&v90, v50, v51);
sub_774008(&v90);
if ( a4 > 0 )
{
v57 = -40.0;
}
else
{
v52 = v46->getContentSize(v46)->width;
v53 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v46->getScale)(v46));
v54 = v47->getContentSize(v47)->width;
v55 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v47->getScale)(v47));
v56 = v46->getContentSize(v46)->width;
v57 = -(float)((float)((float)((float)((float)(v52 * v53) + 5.0) + (float)(v54 * v55)) * 0.5)
- (float)((float)(v56 * v46->getScale(v46)) * 0.5));
}
v58 = v46->setPosition;
cocos2d::CCPoint::CCPoint(&v90, v57 + v27, -62.0);
v58(v46, &v90);
v86 = v47->setPosition;
v59 = (int)v46->getPosition(v46);
v60 = v46->getContentSize(v46)->width * 0.5;
v61 = v46->getScale(v46);
cocos2d::CCPoint::CCPoint(&v89, (float)(v60 * v61) + 5.0, -0.5);
cocos2d::CCPoint::operator+(&v90, v59, &v89);
v86(v47, &v90);
LABEL_120:
cocos2d::CCNode::convertToWorldSpace(&v89, a1->m_player1, &stru_AC5B14);
if ( a5 )
v62 = DemonKey;
else
v62 = Icon;
cocos2d::CCPoint::CCPoint(&v90, &v89);
v63 = CurrencyRewardLayer::create(
a3,
0,
0,
a4,
v62,
a5,
Icon,
0,
(cocos2d::CCPoint)(unsigned int)&v90,
(CurrencyRewardType)0,
0.9,
*(float *)&a4);
a1->addChild_0(a1, v63, 101);
if ( a5 )
{
v64 = FMODAudioEngine::sharedEngine();
sub_776584((int)&v90, "secretKey.ogg");
FMODAudioEngine::playEffect(v64, (int)&v90, v65, v66);
sub_774008(&v90);
}
if ( !a6 )
v63->m_delegate = &a1->CurrencyRewardDelegate;
LABEL_127:
((void (__fastcall *)(cocos2d::CCNode *, int))v13->setScale)(v13, 1008981770);
v68 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3ECCCCCD, 1.0, v67);
v70 = (cocos2d::CCSequence *)cocos2d::CCEaseElasticOut::create(v68, (cocos2d::CCActionInterval *)0x3F19999A, v69);
v71 = cocos2d::CCDelayTime::create(v10);
v72 = cocos2d::CCScaleTo::create(0.2, 0.01);
v73 = cocos2d::CCEaseIn::create(v72, 2.0);
v74 = cocos2d::CCHide::create();
LODWORD(v89.x) = 260;
LODWORD(v89.y) = 1;
v75 = cocos2d::CCCallFunc::create(v13, 260, 1);
v76 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v70, v71, v73, v74, v75, 0);
cocos2d::CCNode::runAction(v13, v76);
if ( v84 > 0 )
{
v90.x = 0.0;
v77 = cocos2d::CCLayerColor::create();
a1->addChild_0(a1, v77, 99);
v78 = (cocos2d::CCSequence *)cocos2d::CCFadeTo::create(0.3, 0x64u);
v79 = cocos2d::CCDelayTime::create(v10 + 0.3);
v80 = cocos2d::CCFadeTo::create(0.4, 0);
LODWORD(v90.x) = 260;
LODWORD(v90.y) = 1;
v81 = cocos2d::CCCallFunc::create(v77, 260, 1);
v82 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v78, v79, v80, v81, 0);
cocos2d::CCNode::runAction(v77, v82);
}
}