// // EditLevelLayer::setupLevelInfo from 0x1400d6c50 to 0x1400d7487 (2103 bytes) // // 2 xrefs: // > EditLevelLayer::init @ 0x1400d5fe3 // > @ 0x1406c87a8 // // 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 // // Hidden C++ exception states: #wind=3 void EditLevelLayer::setupLevelInfo(EditLevelLayer *a1) { cocos2d::CCDirector *v2; // rax __int64 v3; // rcx cocos2d::CCNode *v4; // r13 cocos2d::CCNode *v5; // r14 cocos2d::CCNode *v6; // rbx __int64 v7; // rax struct cocos2d::CCLabelBMFont *v8; // r12 __int64 SongName; // rax struct cocos2d::CCLabelBMFont *v10; // r15 unsigned __int64 v11; // rdi GJGameLevel *m_level; // rcx void **v13; // rcx char *v14; // rax char v15; // bl GJGameLevel *v16; // rcx GJGameLevel *v17; // rcx cocos2d::CCLabelBMFont *v18; // rdi __int64 v19; // rax struct cocos2d::CCObject *v20; // rbx struct cocos2d::CCObject *v21; // rdx cocos2d::CCArray *v22; // r12 cocos2d::CCPoint v23; // rax cocos2d::CCPoint v24; // rax cocos2d::CCPoint v25; // rax __int64 v26; // rcx cocos2d::CCDirector *v27; // rax float v28; // xmm0_4 cocos2d::CCPoint v29; // rax cocos2d::CCString *v30; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v32; // rbx const char *v33; // rax int v34; // edx cocos2d::CCString *v35; // rax int v36; // r8d cocos2d::CCString *v37; // rax struct cocos2d::CCLabelBMFont *v38; // rdi __int64 v39; // rcx cocos2d::CCDirector *v40; // rax float ScreenBottom; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v42; // rbx void *v43; // rcx cocos2d::CCPoint v44; // [rsp+28h] [rbp-99h] BYREF struct cocos2d::CCSprite *v45; // [rsp+30h] [rbp-91h] BYREF cocos2d::CCNode *v46; // [rsp+38h] [rbp-89h] BYREF cocos2d::CCArray *v47; // [rsp+40h] [rbp-81h] cocos2d::CCNode *v48; // [rsp+48h] [rbp-79h] struct cocos2d::CCSprite *v49; // [rsp+50h] [rbp-71h] float v50; // [rsp+58h] [rbp-69h] cocos2d::CCPoint v51; // [rsp+60h] [rbp-61h] BYREF struct cocos2d::CCSprite *v52; // [rsp+68h] [rbp-59h] void *Block[2]; // [rsp+70h] [rbp-51h] BYREF __int64 v54; // [rsp+80h] [rbp-41h] unsigned __int64 v55; // [rsp+88h] [rbp-39h] _BYTE v56[32]; // [rsp+90h] [rbp-31h] BYREF _BYTE v57[32]; // [rsp+B0h] [rbp-11h] BYREF v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2); v47 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3); v4 = (cocos2d::CCNode *)cocos2d::CCNode::create(); a1->addChild_1(a1, v4); v5 = (cocos2d::CCNode *)cocos2d::CCNode::create(); v46 = v5; a1->addChild_1(a1, v5); v6 = (cocos2d::CCNode *)cocos2d::CCNode::create(); v48 = v6; a1->addChild_1(a1, v6); v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); v4->addChild_1(v4, v52); v45 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_noteIcon_001.png"); v5->addChild_1(v5, v45); v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v6->addChild_1(v6, v49); v7 = GJGameLevel::lengthKeyToString(v56, (unsigned int)a1->m_level->m_levelLength); if ( *(_QWORD *)(v7 + 24) > 0xFu ) v7 = *(_QWORD *)v7; v8 = cocos2d::CCLabelBMFont::create((const char *)v7, (const char *)&qword_14052A4D8); sub_14003A830((__int64)v56); v4->addChild_1(v4, v8); fminf(100.0 / v8->getContentSize(v8)->width, 0.5); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v8->setScale_0)(v8); SongName = GJGameLevel::getSongName(a1->m_level, v57); if ( *(_QWORD *)(SongName + 24) > 0xFu ) SongName = *(_QWORD *)SongName; v10 = cocos2d::CCLabelBMFont::create((const char *)SongName, (const char *)&qword_14052A4D8); sub_14003A830((__int64)v57); v5->addChild_1(v5, v10); fminf(100.0 / v10->getContentSize(v10)->width, 0.5); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v10->setScale_0)(v10); *(_OWORD *)Block = 0; v54 = 0; v11 = 15; v55 = 15; LOBYTE(Block[0]) = 0; m_level = a1->m_level; if ( m_level->m_isUploaded ) { v54 = 8; strcpy((char *)Block, "Uploaded"); v13 = Block; } else if ( m_level->m_isVerified.random - m_level->m_isVerified.seed == 1 ) { v54 = 8; strcpy((char *)Block, "Verified"); v13 = Block; } else { v54 = 10; strcpy((char *)Block, "Unverified"); if ( m_level->m_coins > 0 ) { v14 = (char *)sub_14003AA10(0x20u); v54 = 23; v55 = 31; strcpy(v14, "Unverified\nReq. Coins: "); Block[0] = v14; v5 = v46; v15 = 1; if ( a1->m_level->m_firstCoinVerified.random - a1->m_level->m_firstCoinVerified.seed != 1 ) { v15 = 0; sub_140041270(Block, &word_140531EA4, 1u); } v16 = a1->m_level; if ( v16->m_coins >= 2 && v16->m_secondCoinVerified.random - v16->m_secondCoinVerified.seed != 1 ) { if ( !v15 ) sub_140041270(Block, ", ", 2u); v15 = 0; sub_140041270(Block, &word_140531EA0, 1u); } v17 = a1->m_level; if ( v17->m_coins >= 3 && v17->m_thirdCoinVerified.random - v17->m_thirdCoinVerified.seed != 1 ) { if ( !v15 ) sub_140041270(Block, ", ", 2u); sub_140041270(Block, &word_140531E9C, 1u); } v6 = v48; v11 = v55; } v13 = Block; if ( v11 > 0xF ) v13 = (void **)Block[0]; } v18 = cocos2d::CCLabelBMFont::create((const char *)v13, (const char *)&qword_14052A4D8); v6->addChild_1(v6, v18); cocos2d::CCLabelBMFont::limitLabelWidth(v18, 100.0, 0.5, 0.0); cocos2d::CCPoint::CCPoint(&v44, 0.0, 2.0); v19 = (__int64)v49->getPosition_0(v49); cocos2d::CCPoint::operator+(v19, &v46); v20 = v49; v49->setPosition_0(v49, (const cocos2d::CCPoint *)&v46); cocos2d::CCArray::removeAllObjects(v47); cocos2d::CCArray::addObject(v47, v52); v21 = v8; v22 = v47; cocos2d::CCArray::addObject(v47, v21); cocos2d::CCPoint::CCPoint(&v44, &stru_1406C1A68); GameToolbox::alignItemsHorisontally(v22, 4.0, v23, 0); cocos2d::CCArray::removeAllObjects(v22); cocos2d::CCArray::addObject(v22, v45); cocos2d::CCArray::addObject(v22, v10); cocos2d::CCPoint::CCPoint(&v44, &stru_1406C1A68); GameToolbox::alignItemsHorisontally(v22, 4.0, v24, 0); cocos2d::CCArray::removeAllObjects(v22); cocos2d::CCArray::addObject(v22, v20); cocos2d::CCArray::addObject(v22, v18); cocos2d::CCPoint::CCPoint(&v44, &stru_1406C1A68); GameToolbox::alignItemsHorisontally(v22, 4.0, v25, 0); cocos2d::CCArray::removeAllObjects(v22); cocos2d::CCArray::addObject(v22, v4); cocos2d::CCArray::addObject(v22, v5); cocos2d::CCArray::addObject(v22, v48); v27 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v26); v28 = cocos2d::CCDirector::getScreenBottom(v27) + 55.0; cocos2d::CCPoint::CCPoint(&v44, v50 * 0.5, v28); GameToolbox::alignItemsHorisontally(v22, 140.0, v29, 0); v30 = cocos2d::CCString::createWithFormat("Version: %i", a1->m_level->m_levelVersion); CString = cocos2d::CCString::getCString(v30); v32 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); a1->addChild_1(a1, v32); v33 = "ID: na"; v34 = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed; if ( v34 ) { v35 = cocos2d::CCString::createWithFormat("ID: %i", v34); v33 = cocos2d::CCString::getCString(v35); } v36 = a1->m_level->m_originalLevel.random - a1->m_level->m_originalLevel.seed; if ( v36 ) { v37 = cocos2d::CCString::createWithFormat("%s (%i)", v33, v36); v33 = cocos2d::CCString::getCString(v37); } v38 = cocos2d::CCLabelBMFont::create(v33, "goldFont.fnt"); a1->addChild_1(a1, v38); v40 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v39); ScreenBottom = cocos2d::CCDirector::getScreenBottom(v40); cocos2d::CCPoint::CCPoint(&v51, v50 * 0.5, ScreenBottom + 14.0); cocos2d::CCPoint::CCPoint(&v44, -75.0, 0.0); cocos2d::CCPoint::operator+(&v51, &v45); v32->setPosition_0(v32, (const cocos2d::CCPoint *)&v45); cocos2d::CCPoint::CCPoint(&v44, 75.0, 0.0); cocos2d::CCPoint::operator+(&v51, &v45); v38->setPosition_0(v38, (const cocos2d::CCPoint *)&v45); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v32->setScale_0)(v32); if ( v38->getContentSize(v38)->width > 150.0 ) { v42 = v38->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v38->getContentSize(v38); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v42->setScale_0)(v38); } fminf( 0.60000002, COERCE_FLOAT(COERCE_UNSIGNED_INT64(((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v38->getScale)(v38)))); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v38->setScale_0)(v38); if ( v55 > 0xF ) { v43 = Block[0]; if ( v55 + 1 >= 0x1000 ) { v43 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v43 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v43); } }