// // PlayLayer::showNewBest from 0x100143e54 to 0x100144840 (2540 bytes) // // 2 xrefs: // > PlayLayer::destroyPlayer @ 0x1001480d8 // > PlayLayer::destroyPlayer @ 0x100148178 // // This function is hookable on this platform (idp: arm, 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 10:59:33 +0000 // void __fastcall PlayLayer::showNewBest(__int64 a1, char a2, __int64 a3, __int64 a4, __int64 a5, char a6, char a7) { int v13; // w28 unsigned int v14; // w21 float v15; // s8 __int64 v16; // x0 float *v17; // x0 __int64 v18; // x20 __int64 v19; // x25 unsigned int v20; // w8 std::string *v21; // x0 __int64 v22; // x25 __int64 v23; // x25 __int64 v24; // x0 __int64 CString; // x0 __int64 v26; // x25 float v28; // s8 __int64 v29; // x0 __int64 v30; // x0 __int64 v31; // x26 __int64 v32; // x25 __int64 v33; // x0 __int64 v34; // x28 __int64 v35; // x27 float v36; // s0 float v37; // s9 float v38; // s9 float v39; // s10 float v40; // s10 float v41; // s11 float32x2_t *v42; // x27 float v43; // s9 float v44; // s0 double v45; // d0 __int64 v46; // x0 __int64 v47; // x0 __int64 v48; // x26 __int64 v49; // x25 __int64 v50; // x0 __int64 v51; // x27 float v52; // s0 float v53; // s9 float v54; // s9 float v55; // s10 float v56; // s10 float v57; // s11 float32x2_t *v58; // x27 float v59; // s8 float v60; // s0 double v61; // d0 __int64 v62; // x25 __int64 v63; // x23 __int64 v64; // x0 __int64 v65; // x22 float v66; // s9 __int64 v67; // x0 __int64 v68; // x21 __int64 v69; // x0 __int64 v70; // x0 __int64 v71; // x20 __int64 v72; // x19 __int64 v73; // x0 int v75; // [xsp+2Ch] [xbp-F4h] void *v76[2]; // [xsp+30h] [xbp-F0h] BYREF char v77; // [xsp+47h] [xbp-D9h] void *v78[2]; // [xsp+48h] [xbp-D8h] BYREF char v79; // [xsp+5Fh] [xbp-C1h] void *__p[2]; // [xsp+60h] [xbp-C0h] BYREF char v81; // [xsp+77h] [xbp-A9h] float32x2_t v82; // [xsp+78h] [xbp-A8h] BYREF std::string v83; // [xsp+80h] [xbp-A0h] BYREF float v84; // [xsp+98h] [xbp-88h] BYREF float v85[4]; // [xsp+A0h] [xbp-80h] BYREF v13 = a4 + a3; if ( ((int)a4 + (int)a3 < 0) ^ __OFADD__((_DWORD)a4, (_DWORD)a3) | ((_DWORD)a4 + (_DWORD)a3 == 0) ) v14 = 0; else v14 = 1; if ( ((int)a4 + (int)a3 < 0) ^ __OFADD__((_DWORD)a4, (_DWORD)a3) | ((_DWORD)a4 + (_DWORD)a3 == 0) ) v15 = 0.0; else v15 = 10.0; v16 = cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v85, v16); v17 = sub_1000262BC(&v84, v85[0] * 0.5, v15 + (float)((float)(v85[1] * 0.5) + 20.0)); v18 = cocos2d::CCNode::create(v17); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v18, 100); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v18 + 184LL))(v18, &v84); if ( (a7 & 1) != 0 ) goto LABEL_20; if ( (a2 & 1) != 0 ) { if ( (*(_BYTE *)(a1 + 14400) & 1) == 0 ) { v19 = cocos2d::CCLabelBMFont::create_1("New Reward!", "goldFont.fnt"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v19 + 160LL))(v19, 1.2); sub_1000262BC((float *)&v83, 0.0, 5.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v19 + 184LL))(v19, &v83); sub_1000262BC((float *)&v83, 0.5, 0.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v19 + 296LL))(v19, &v83); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v19); goto LABEL_20; } } else if ( (*(_BYTE *)(a1 + 14400) & 1) == 0 ) { v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBest_001.png"); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v23); sub_1000262BC((float *)&v83, 0.5, 0.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v23 + 296LL))(v23, &v83); goto LABEL_20; } sub_100009900(&v83, "RIP"); v20 = llroundf(vcvts_n_f32_s32(rand(), 0x1Fu) * 90.0) - 1; if ( v20 < 0x5A ) std::string::assign(&v83, off_1008E0280[v20]); if ( (v83.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v21 = &v83; else v21 = (std::string *)v83.__r_.__value_.__r.__words[0]; v22 = cocos2d::CCLabelBMFont::create_1(v21, "goldFont.fnt"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 160LL))(v22, 1.2); sub_1000262BC((float *)&v82, 0.0, 5.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v22 + 184LL))(v22, &v82); sub_1000262BC((float *)&v82, 0.5, 0.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v22 + 296LL))(v22, &v82); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v22); if ( SHIBYTE(v83.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v83.__r_.__value_.__l.__data_); LABEL_20: v75 = v13; v24 = sub_1003065B0("%i%%", *(_DWORD *)(a1 + 14640)); CString = cocos2d::CCString::getCString(v24); v26 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt"); sub_1000262BC((float *)&v83, 0.5, 1.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v26 + 296LL))(v26, &v83); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL))(v26, 1.1); sub_1000262BC((float *)&v83, 0.0, -4.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v26 + 184LL))(v26, &v83); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v26); if ( (int)a4 <= 0 || (int)a3 <= 0 ) v28 = -5.0; else v28 = -20.0; if ( (int)a4 < 1 ) { v34 = a5; if ( (int)a3 < 1 ) goto LABEL_50; } else { v29 = sub_1003065B0("+%i", a4); v30 = cocos2d::CCString::getCString(v29); v31 = cocos2d::CCLabelBMFont::create_1(v30, "bigFont.fnt"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v31 + 160LL))(v31, 0.6); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v31); v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png"); sub_1000262BC((float *)&v83, 0.0, 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v32 + 296LL))(v32, &v83); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 160LL))(v32, 0.55); v33 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v32); v34 = a5; if ( (a5 & 1) == 0 ) { v35 = FMODAudioEngine::sharedEngine(v33); sub_100009900(__p, "gold02.ogg"); FMODAudioEngine::playEffect_1(v35, __p); if ( v81 < 0 ) operator delete(__p[0]); } if ( (int)a3 <= 0 ) { v37 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v31 + 328LL))(v31); v38 = (float)(v37 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v31 + 168LL))(v31)) + 1.0; v39 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v32 + 328LL))(v32); v40 = (float)(v38 + (float)(v39 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v32 + 168LL))(v32))) * 0.5; v41 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v31 + 328LL))(v31); v36 = -(float)(v40 - (float)((float)(v41 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v31 + 168LL))(v31)) * 0.5)); } else { v36 = 40.0; } sub_1000262BC((float *)&v83, v28 + v36, -62.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v31 + 184LL))(v31, &v83); v42 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v31 + 192LL))(v31); v43 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v31 + 328LL))(v31) * 0.5; v44 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v31 + 168LL))(v31); sub_1000262BC((float *)&v82, (float)(v43 * v44) + 1.0, -1.0); *(float32x2_t *)&v45 = sub_100026318(v42, &v82, (float32x2_t *)&v83); (*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v32 + 184LL))(v32, &v83, v45); if ( (int)a3 <= 0 ) goto LABEL_42; } v46 = sub_1003065B0("+%i", a3); v47 = cocos2d::CCString::getCString(v46); v48 = cocos2d::CCLabelBMFont::create_1(v47, "bigFont.fnt"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 0.6); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v48); v49 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); sub_1000262BC((float *)&v83, 0.0, 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v49 + 296LL))(v49, &v83); v50 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 456LL))(v18, v49); v51 = FMODAudioEngine::sharedEngine(v50); sub_100009900(v78, "magicExplosion.ogg"); FMODAudioEngine::playEffect_1(v51, v78); if ( v79 < 0 ) operator delete(v78[0]); if ( (int)a4 <= 0 ) { v53 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48); v54 = (float)(v53 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v48 + 168LL))(v48)) + 5.0; v55 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v49 + 328LL))(v49); v56 = (float)(v54 + (float)(v55 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v49 + 168LL))(v49))) * 0.5; v57 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48); v52 = -(float)(v56 - (float)((float)(v57 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v48 + 168LL))(v48)) * 0.5)); } else { v52 = -40.0; } sub_1000262BC((float *)&v83, v28 + v52, -62.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v48 + 184LL))(v48, &v83); v58 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 192LL))(v48); v59 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48) * 0.5; v60 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v48 + 168LL))(v48); sub_1000262BC((float *)&v82, (float)(v59 * v60) + 5.0, -0.5); *(float32x2_t *)&v61 = sub_100026318(v58, &v82, (float32x2_t *)&v83); (*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v49 + 184LL))(v49, &v83, v61); LABEL_42: cocos2d::CCNode::convertToWorldSpace(&v83, *(_QWORD *)(a1 + 3256), &unk_1009F3DF0); if ( (_DWORD)v34 ) v62 = 9; else v62 = 0; sub_1000262F4(&v82, (double *)&v83); v63 = CurrencyRewardLayer::create(a3, 0, 0, a4, v62, v34, 0, 0, 0.0, 0.9, &v82, 0); v64 = (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v63, 101); if ( (_DWORD)v34 ) { v65 = FMODAudioEngine::sharedEngine(v64); sub_100009900(v76, "secretKey.ogg"); FMODAudioEngine::playEffect_1(v65, v76); if ( v77 < 0 ) operator delete(v76[0]); } if ( (a6 & 1) == 0 ) *(_QWORD *)(v63 + 408) = a1 + 14000; LABEL_50: v66 = flt_10075E300[v14]; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL))(v18, 0.01); v67 = cocos2d::CCScaleTo::create_1(0.4, 1.0); v68 = cocos2d::CCEaseElasticOut::create(v67, 0.6); cocos2d::CCDelayTime::create(v66); v69 = cocos2d::CCScaleTo::create(0.2, 0.01, 0.01); cocos2d::CCEaseIn::create(v69, 2.0); cocos2d::CCHide::create(); cocos2d::CCCallFunc::create(v18, 536, 1); v70 = sub_10021D420(v68); cocos2d::CCNode::runAction(v18, v70); if ( v75 >= 1 ) { LODWORD(v83.__r_.__value_.__l.__data_) = 0; v71 = cocos2d::CCLayerColor::create_1(&v83); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v71, 99); v72 = cocos2d::CCFadeTo::create(100, 0.3); cocos2d::CCDelayTime::create(1.6); cocos2d::CCFadeTo::create(0, 0.4); cocos2d::CCCallFunc::create(v71, 536, 1); v73 = sub_10021D420(v72); cocos2d::CCNode::runAction(v71, v73); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source