// // LevelEditorLayer::updateLevelFont from 0x1402df070 to 0x1402df5a5 (1333 bytes) // // 2 xrefs: // > SelectFontLayer::onChangeFont @ 0x14028edb0 // > @ 0x1406d3524 // // 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=2 void LevelEditorLayer::updateLevelFont(LevelEditorLayer *a1, int a2) { cocos2d::CCArray *v3; // rdi __int64 v4; // rcx cocos2d::CCArray *v5; // rsi cocos2d::CCArray *m_objects; // r14 unsigned int v7; // ebx struct cocos2d::CCObject *v8; // rax cocos2d::CCObjectType m_eObjType; // ecx cocos2d::CCArray *v10; // rcx cocos2d::CCTextureCache *v11; // rax const char *CString; // r15 struct cocos2d::CCTexture2D *v13; // r12 unsigned int i; // r14d struct cocos2d::CCObject *v15; // rbx __int64 v16; // rdx unsigned int j; // ebx LabelGameObject *v18; // rax GameManager *v19; // rcx int v20; // ebx cocos2d::CCString *v21; // rax size_t v22; // r8 const char *v23; // rbx cocos2d::CCTextureCache *v24; // rax struct cocos2d::CCTexture2D *v25; // r15 unsigned int k; // r14d struct cocos2d::CCObject *v27; // rbx unsigned int m; // r14d struct cocos2d::CCObject *v29; // rax __int64 v30; // rdx __int64 v31; // rcx __int64 v32; // r8 __int64 v33; // r9 struct cocos2d::CCObject *v34; // r13 unsigned int *p_m_uAutoReleaseCount; // r15 unsigned __int64 v36; // rdi unsigned __int64 v37; // rbx void *v39; // [rsp+28h] [rbp-58h] __int128 v40; // [rsp+30h] [rbp-50h] BYREF unsigned __int64 v41; // [rsp+40h] [rbp-40h] __int64 v42; // [rsp+48h] [rbp-38h] __int128 v43; // [rsp+50h] [rbp-30h] BYREF __int64 v44; // [rsp+60h] [rbp-20h] unsigned __int64 v45; // [rsp+68h] [rbp-18h] if ( a2 != a1->m_levelSettings->m_fontIndex ) { v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1); v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4); m_objects = a1->m_objects; v7 = 0; if ( cocos2d::CCArray::count(m_objects) ) { while ( 1 ) { v8 = cocos2d::CCArray::objectAtIndex(m_objects, v7); m_eObjType = v8[18].m_eObjType; if ( m_eObjType == 914 ) break; if ( m_eObjType == (MenuLayerObjectType|0x640) ) { v10 = v5; goto LABEL_7; } LABEL_8: if ( ++v7 >= cocos2d::CCArray::count(m_objects) ) goto LABEL_9; } v10 = v3; LABEL_7: cocos2d::CCArray::addObject(v10, v8); goto LABEL_8; } LABEL_9: v11 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); CString = "bigFont.png"; v13 = cocos2d::CCTextureCache::addImage(v11, "bigFont.png", 0); for ( i = 0; i < cocos2d::CCArray::count(v3); ++i ) { v15 = cocos2d::CCArray::objectAtIndex(v3, i); LOBYTE(v16) = 1; v15->__vftable[15].setTag(v15, v16); v15->__vftable[7].canEncode(v15); v15->__vftable[13].isEqual(v15, nullptr); (*(void (__fastcall **)(unsigned int *, struct cocos2d::CCTexture2D *))(*(_QWORD *)&v15[6].m_uID + 24LL))( &v15[6].m_uID, v13); } for ( j = 0; j < cocos2d::CCArray::count(v5); ++j ) { v18 = (LabelGameObject *)cocos2d::CCArray::objectAtIndex(v5, j); LabelGameObject::removeLabel(v18); } a1->m_textLayerT3->removeFromParent(a1->m_textLayerT3); a1->m_textLayerT3 = nullptr; a1->m_textBlendingLayerT3->removeFromParent(a1->m_textBlendingLayerT3); a1->m_textBlendingLayerT3 = nullptr; a1->m_textLayerT2->removeFromParent(a1->m_textLayerT2); a1->m_textLayerT2 = nullptr; a1->m_textBlendingLayerT2->removeFromParent(a1->m_textBlendingLayerT2); a1->m_textBlendingLayerT2 = nullptr; a1->m_textLayerT1->removeFromParent(a1->m_textLayerT1); a1->m_textLayerT1 = nullptr; a1->m_textBlendingLayerT1->removeFromParent(a1->m_textBlendingLayerT1); a1->m_textBlendingLayerT1 = nullptr; a1->m_textLayerB1->removeFromParent(a1->m_textLayerB1); a1->m_textLayerB1 = nullptr; a1->m_textBlendingLayerB1->removeFromParent(a1->m_textBlendingLayerB1); a1->m_textBlendingLayerB1 = nullptr; a1->m_textLayerB2->removeFromParent(a1->m_textLayerB2); a1->m_textLayerB2 = nullptr; a1->m_textBlendingLayerB2->removeFromParent(a1->m_textBlendingLayerB2); a1->m_textBlendingLayerB2 = nullptr; a1->m_textLayerB3->removeFromParent(a1->m_textLayerB3); a1->m_textLayerB3 = nullptr; a1->m_textBlendingLayerB3->removeFromParent(a1->m_textBlendingLayerB3); a1->m_textBlendingLayerB3 = nullptr; a1->m_textLayerB4->removeFromParent(a1->m_textLayerB4); a1->m_textLayerB4 = nullptr; a1->m_textBlendingLayerB4->removeFromParent(a1->m_textBlendingLayerB4); a1->m_textBlendingLayerB4 = nullptr; a1->m_levelSettings->m_fontIndex = a2; v19 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v39 = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v39); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v19 = (GameManager *)qword_1406C2ED8; } v20 = 59; if ( a2 < 59 ) v20 = a2; if ( v20 <= 0 ) { GameManager::loadFont(v19, 0); } else { GameManager::loadFont(v19, v20); v21 = cocos2d::CCString::createWithFormat("gjFont%02d.png", v20); CString = cocos2d::CCString::getCString(v21); } v43 = 0; v44 = 0; v45 = 0; v22 = -1; do ++v22; while ( CString[v22] ); sub_14003A930(&v43, CString, v22); v23 = (const char *)&v43; if ( v45 > 0xF ) v23 = (const char *)v43; v24 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); v25 = cocos2d::CCTextureCache::addImage(v24, v23, 0); GJBaseGameLayer::createTextLayers(a1); for ( k = 0; k < cocos2d::CCArray::count(v3); ++k ) { v27 = cocos2d::CCArray::objectAtIndex(v3, k); (*(void (__fastcall **)(unsigned int *, struct cocos2d::CCTexture2D *))(*(_QWORD *)&v27[6].m_uID + 24LL))( &v27[6].m_uID, v25); sub_14003BDB0((__int64)&v40, (__int64)&v27[24].m_nTag); TextGameObject::updateTextObject((__int64 *)v27, (struct cocos2d::CCPoint)&v40, 0); BYTE1(v27[20].m_uUnknown) = 1; ((void (__fastcall *)(struct cocos2d::CCObject *, __int16 *))v27->__vftable[18].update)(v27, &word_140529B28); } for ( m = 0; m < cocos2d::CCArray::count(v5); ++m ) { v29 = cocos2d::CCArray::objectAtIndex(v5, m); v34 = v29; v40 = 0; v41 = 0; v42 = 0; p_m_uAutoReleaseCount = &v29[33].m_uAutoReleaseCount; if ( *(_QWORD *)&v29[33].m_uOrderOfArrival > 0xFu ) p_m_uAutoReleaseCount = *(unsigned int **)&v29[33].m_uAutoReleaseCount; v36 = *(_QWORD *)&v29[33].m_unknown2; if ( v36 > 0x7FFFFFFFFFFFFFFFLL ) sub_140007B50(v31, v30, v32, v33); v42 = 15; if ( v36 > 0xF ) { v37 = v36 | 0xF; if ( (v36 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { if ( v37 < 0x16 ) v37 = 22; } else { v37 = 0x7FFFFFFFFFFFFFFFLL; } *(_QWORD *)&v40 = sub_14003AA10(v37 + 1); v41 = v36; v42 = v37; memcpy((void *)v40, p_m_uAutoReleaseCount, v36 + 1); } else { v41 = v36; v40 = *(_OWORD *)p_m_uAutoReleaseCount; } LabelGameObject::createLabel(v34, &v40); } sub_14003A830((__int64)&v43); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source