// // PlatformerControlsPopup::init from 0x79d110 to 0x79d96c (2140 bytes) // // 1 xrefs: // > PlatformerControlsPopup::create @ 0x79dc1a // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:59:51 +0000 // GameManager *__fastcall PlatformerControlsPopup::init(PlatformerControlsPopup *this, GJGameLevel *a2, int a3) { char v5; // r7 int v6; // r3 float v7; // s15 cocos2d::CCDirector *v8; // r0 char v9; // r3 int v10; // r3 float v12; // s15 float v13; // s21 float v14; // s16 float v15; // s18 float v16; // s16 int v17; // r5 const char *v18; // r1 int v19; // r7 const char *v20; // r1 int v21; // r0 cocos2d::CCNodeRGBA *v22; // r7 int IsCustom; // r0 int v24; // r11 const cocos2d::CCPoint *v25; // r10 void (__fastcall *v26)(int, _DWORD *); // r8 const char *v27; // r2 int v28; // r10 void (__fastcall *v29)(int, _DWORD *); // r11 void (__fastcall *v30)(int, _DWORD *); // r11 const char *v31; // r2 int v32; // r0 int v33; // r11 void (__fastcall *v34)(int, _DWORD *); // r10 ButtonSprite *v35; // r0 int v36; // r0 ButtonSprite *v37; // r0 int v38; // r0 ButtonSprite *v39; // r0 int v40; // r0 const char *v41; // r1 int v42; // r3 float v43; // s18 ButtonSprite *v44; // r0 int v45; // r0 int v46; // r11 const cocos2d::CCPoint *v47; // r10 void (__fastcall *v48)(int, _DWORD *); // r8 cocos2d::CCNodeRGBA **v49; // r9 PlatformerControlsPopup *v50; // r7 const char *v51; // r1 int v52; // r1 int v53; // r0 cocos2d::CCNodeRGBA *v54; // r0 int v55; // r1 int v56; // t1 float *v57; // r2 int v58; // r8 int v59; // r7 ButtonSprite *v60; // r0 int v61; // r0 int v62; // r8 const cocos2d::CCPoint *v63; // r10 float v64; // s14 void (__fastcall *v65)(int, _DWORD *); // r9 float *v66; // r0 int v67; // r1 int v68; // r2 int v69; // r8 int v70; // r8 const cocos2d::CCPoint *v71; // r10 void (__fastcall *v72)(int, _DWORD *); // r9 const char *v73; // r1 int v74; // r8 int v75; // r7 const cocos2d::CCPoint *v76; // r9 void (__fastcall *v77)(int, _BYTE *); // r8 int *v79; // r0 int v80; // r7 int v81; // r0 int v82; // r11 const cocos2d::CCPoint *v83; // r10 void (__fastcall *v84)(int, _DWORD *); // r9 float v85; // r1 cocos2d::CCSprite *v86; // r0 int v87; // r7 void (__fastcall *v88)(int, _DWORD *); // r9 GameManager *v89; // [sp+10h] [bp-9Ch] float v90; // [sp+10h] [bp-9Ch] float v91; // [sp+10h] [bp-9Ch] void (__fastcall *v92)(int, _DWORD *); // [sp+14h] [bp-98h] cocos2d::CCPoint *v93; // [sp+18h] [bp-94h] float v94; // [sp+30h] [bp-7Ch] BYREF float v95; // [sp+34h] [bp-78h] char v96[8]; // [sp+38h] [bp-74h] BYREF _BYTE v97[8]; // [sp+40h] [bp-6Ch] BYREF GJUINode *(__fastcall *v98)(GJUINode *, cocos2d::CCObject *); // [sp+48h] [bp-64h] int v99; // [sp+4Ch] [bp-60h] int (__fastcall *v100)(PlatformerControlsPopup *, cocos2d::CCObject *); // [sp+50h] [bp-5Ch] int v101; // [sp+54h] [bp-58h] int (__fastcall *v102)(PlatformerControlsPopup *, cocos2d::CCObject *); // [sp+58h] [bp-54h] int v103; // [sp+5Ch] [bp-50h] int (__fastcall *v104)(PlatformerControlsPopup *, cocos2d::CCObject *); // [sp+60h] [bp-4Ch] int v105; // [sp+64h] [bp-48h] _DWORD (*v106)(PlatformerControlsPopup *__hidden, cocos2d::CCObject *); // [sp+68h] [bp-44h] int v107; // [sp+6Ch] [bp-40h] int (__fastcall *v108)(int, cocos2d::CCObject *); // [sp+70h] [bp-3Ch] int v109; // [sp+74h] [bp-38h] _DWORD *(__fastcall *v110)(_DWORD *, cocos2d::CCObject *); // [sp+78h] [bp-34h] int v111; // [sp+7Ch] [bp-30h] _DWORD (*v112)(PlatformerControlsPopup *__hidden, cocos2d::CCObject *); // [sp+80h] [bp-2Ch] int v113; // [sp+84h] [bp-28h] _DWORD v114[2]; // [sp+88h] [bp-24h] BYREF _DWORD v115[2]; // [sp+90h] [bp-1Ch] BYREF int v116[3]; // [sp+98h] [bp-14h] BYREF v5 = a3; if ( a3 && a2 && GJGameLevel::isPlatformer(a2) ) v6 = *((unsigned __int8 *)a2 + 824); else v6 = 0; *((_BYTE *)this + 804) = v6; v7 = 228.0; if ( !v6 ) v7 = 226.0; v89 = SetupTriggerPopup::init(this, nullptr, nullptr, 320.0, v7, &byte_7, 0.0); if ( v89 ) { SetupTriggerPopup::preSetup(this); qmemcpy(v115, "PWi", 3); v8 = (cocos2d::CCDirector *)SetupTriggerPopup::setCustomBGColor((int)this, (int)v115); *((_DWORD *)this + 182) = a2; *((_BYTE *)this + 732) = v5; if ( a2 ) v9 = *((_BYTE *)a2 + 824); else v9 = 0; *((_BYTE *)this + 733) = v9; if ( a2 ) { v10 = *((unsigned __int8 *)a2 + 1344); if ( (v10 & 1) != 0 ? *((_DWORD *)a2 + 337) : v10 >> 1 ) { v79 = LevelControlConfig::createFromB64((GJGameLevel *)((char *)a2 + 1344)); v8 = (cocos2d::CCDirector *)LevelControlConfig::presentClasses((LevelControlConfig *)v79); *((_DWORD *)this + 213) = v8; } } cocos2d::CCDirector::sharedDirector(v8); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v94); v12 = *((float *)this + 140); memset(v116, 0, sizeof(v116)); v13 = v95 * 0.5; v14 = v94; v15 = (float)(v95 * 0.5) + (float)(v12 * 0.5); std::string::__init(v116, "Controls", 8u); v16 = v14 * 0.5; SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)v116); v17 = 0; std::string::~string((int)v116); v19 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v18); v21 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v20); v99 = 0; v98 = PlatformerControlsPopup::onToggleSource; v22 = CCMenuItemToggler::create(v21, v19, (int)this, (int)PlatformerControlsPopup::onToggleSource, 0); *((_DWORD *)this + 189) = v22; IsCustom = PlatformerControlsPopup::sourceIsCustom(this); CCMenuItemToggler::toggle(v22, IsCustom); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), *((_DWORD *)this + 189)); v24 = *((_DWORD *)this + 189); v25 = *((const cocos2d::CCPoint **)this + 111); v26 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v114, v16 - 95.0, v15 - 44.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v25); v26(v24, v115); v28 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Use Custom Controls", "bigFont.fnt", v27); (*(void (__fastcall **)(int, float))(*(_DWORD *)v28 + 80))(v28, 0.5); v29 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v28 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 0.0, 0.5); v29(v28, v115); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v28); v30 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v28 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, v16 - 75.0, v15 - 44.0); v30(v28, v115); v32 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&unk_B6B226, "goldFont.fnt", v31); *((_DWORD *)this + 190) = v32; (*(void (__fastcall **)(int, int))(*(_DWORD *)v32 + 80))(v32, 1060320051); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))( *((_DWORD *)this + 115), *((_DWORD *)this + 190)); v33 = *((_DWORD *)this + 190); v34 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v33 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, v16, v15 - 78.0); v34(v33, v115); PlatformerControlsPopup::updateEditLabel(this); v35 = ButtonSprite::create( (ButtonSprite *)"Keyboard", (const char *)&dword_78, 0, 0.6, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(26.0), *(float *)&v89); *((_DWORD *)this + 194) = v35; v101 = 0; v100 = PlatformerControlsPopup::onKeyboard; v36 = CCMenuItemSpriteExtra::create((int)v35, 0, (int)this, (int)PlatformerControlsPopup::onKeyboard, 0); *((_DWORD *)this + 191) = v36; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v36); v37 = ButtonSprite::create( (ButtonSprite *)"Touch", (const char *)&dword_78, 0, 0.6, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(26.0), v90); *((_DWORD *)this + 195) = v37; v103 = 0; v102 = PlatformerControlsPopup::onTouch; v38 = CCMenuItemSpriteExtra::create((int)v37, 0, (int)this, (int)PlatformerControlsPopup::onTouch, 0); *((_DWORD *)this + 192) = v38; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v38); v39 = ButtonSprite::create( (ButtonSprite *)"Controller", (const char *)&dword_78, 0, 0.6, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(26.0), v91); *((_DWORD *)this + 196) = v39; v105 = 0; v104 = PlatformerControlsPopup::onController; v40 = CCMenuItemSpriteExtra::create((int)v39, 0, (int)this, (int)PlatformerControlsPopup::onController, 0); *((_DWORD *)this + 193) = v40; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v40); cocos2d::CCNode::scheduleUpdate(this); if ( *((_BYTE *)this + 804) ) { v44 = ButtonSprite::create( (ButtonSprite *)"Upload Selected", (const char *)&dword_6C + 2, 0, 0.6, 1, "bigFont.fnt", "GJ_button_02.png", COERCE_CONST_CHAR_(26.0), *(float *)&v89); *((_DWORD *)this + 203) = v44; v107 = 0; v106 = PlatformerControlsPopup::onUpload; v45 = CCMenuItemSpriteExtra::create((int)v44, 0, (int)this, (int)PlatformerControlsPopup::onUpload, 0); *((_DWORD *)this + 202) = v45; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v45); v46 = *((_DWORD *)this + 202); v47 = *((const cocos2d::CCPoint **)this + 111); v48 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v46 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v114, v16, v15 - 207.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v47); v48(v46, v115); v49 = (cocos2d::CCNodeRGBA **)((char *)this + 816); v50 = this; do { v50 = (PlatformerControlsPopup *)((char *)v50 + 8); *((_DWORD *)v50 + 205) = cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_checkOff_001.png", v41); *((_DWORD *)v50 + 206) = cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_checkOn_001.png", v51); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v50 + 205) + 80))(*((_DWORD *)v50 + 205), 1060320051); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v50 + 206) + 80))(*((_DWORD *)v50 + 206), 1060320051); v52 = *((_DWORD *)v50 + 206); v53 = *((_DWORD *)v50 + 205); v109 = 0; v108 = PlatformerControlsPopup::onToggleUpload; v54 = CCMenuItemToggler::create(v53, v52, (int)this, (int)PlatformerControlsPopup::onToggleUpload, 0); v55 = dword_BF1208[v17]; *v49 = v54; (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, int))(*(_DWORD *)v54 + 36))(v54, v55); (*(void (__fastcall **)(_DWORD, cocos2d::CCNodeRGBA *))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), *v49); v56 = (int)*v49++; v92 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v56 + 92); v93 = *((cocos2d::CCPoint **)this + 111); v57 = (float *)((char *)&unk_BF1214 + v17 * 4); ++v17; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v114, v16 + 95.0, v15 - *v57); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v93); v92(v56, v115); } while ( v17 != 3 ); } v42 = *((_DWORD *)this + 182); v43 = (float)(v13 - (float)(*((float *)this + 140) * 0.5)) + 22.0; if ( v42 ) { if ( *(_DWORD *)(v42 + 952) == 3 ) { v58 = *((unsigned __int8 *)this + 804); if ( !*((_BYTE *)this + 804) ) { v80 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v41); (*(void (__fastcall **)(int, int))(*(_DWORD *)v80 + 80))(v80, 1060320051); v111 = v58; v110 = PlatformerControlsPopup::onUpdate; v81 = CCMenuItemSpriteExtra::create(v80, v58, (int)this, (int)PlatformerControlsPopup::onUpdate, v58); *((_DWORD *)this + 198) = v81; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v81); v82 = *((_DWORD *)this + 198); v83 = *((const cocos2d::CCPoint **)this + 111); v84 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v82 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v114, (float)(v16 + (float)(*((float *)this + 139) * 0.5)) - 30.0, v43); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v83); v84(v82, v115); v86 = LoadingCircleSprite::create((LoadingCircleSprite *)0x3F800000, v85); *((_DWORD *)this + 199) = v86; (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v86 + 80))(v86, 1058642330); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))( *((_DWORD *)this + 115), *((_DWORD *)this + 199), 5); v87 = *((_DWORD *)this + 199); v88 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v87 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v115, (float)(v16 + (float)(*((float *)this + 139) * 0.5)) - 30.0, v43); v88(v87, v115); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 199) + 172))(*((_DWORD *)this + 199), v58); } } } v59 = *((unsigned __int8 *)this + 804); if ( !*((_BYTE *)this + 804) ) { v60 = ButtonSprite::create( (ButtonSprite *)"Apply Creator Controls", (const char *)&dword_94 + 2, v59, 0.6, 1, "bigFont.fnt", "GJ_button_04.png", (const char *)0x41D00000, *(float *)&v89); v113 = v59; v112 = PlatformerControlsPopup::onApplyCreator; v61 = CCMenuItemSpriteExtra::create((int)v60, v59, (int)this, (int)PlatformerControlsPopup::onApplyCreator, v59); *((_DWORD *)this + 197) = v61; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v61); v62 = *((_DWORD *)this + 197); v63 = *((const cocos2d::CCPoint **)this + 111); v64 = v16 + (float)(*((float *)this + 139) * 0.5); v65 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v62 + 92); v66 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v62 + 164))(v62); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v114, (float)(v64 - 50.0) - (float)(*v66 * 0.5), v43); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v63); v65(v62, v115); PlatformerControlsPopup::refreshApplyVisible(this, v67, v68); } v69 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v41); (*(void (__fastcall **)(int, int))(*(_DWORD *)v69 + 80))(v69, 1060320051); v114[1] = 0; v114[0] = PlatformerControlsPopup::onInfo; v70 = CCMenuItemSpriteExtra::create(v69, 0, (int)this, (int)PlatformerControlsPopup::onInfo, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v70); v71 = *((const cocos2d::CCPoint **)this + 111); v72 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v70 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v97, (float)(v16 + (float)(*((float *)this + 139) * 0.5)) - 18.0, (float)(v13 + (float)(*((float *)this + 140) * 0.5)) - 18.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v115, v71); v72(v70, v115); v74 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v73); (*(void (__fastcall **)(int, int))(*(_DWORD *)v74 + 80))(v74, 1060320051); v115[0] = 684; v115[1] = 1; v75 = CCMenuItemSpriteExtra::create(v74, 0, (int)this, 684, 1); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v75); v76 = *((const cocos2d::CCPoint **)this + 111); v77 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v75 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v96, v16 - (float)(*((float *)this + 139) * 0.5), v13 + (float)(*((float *)this + 140) * 0.5)); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v97, v76); v77(v75, v97); PlatformerControlsPopup::refreshModeUI((cocos2d::CCPoint **)this); SetupTriggerPopup::postSetup(this); } return v89; }
GD Web Decomp Icon

GD Web Decomp

Raw Source