// // SetupGravityModPopup::init from 0xafb654 to 0xafbd8c (1848 bytes) // // 2 xrefs: // > SetupGravityModPopup::create @ 0xafbf28 // > @ 0x483b8 // // 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 13:01:18 +0000 // __int64 __fastcall SetupGravityModPopup::init( Slider **this, EffectGameObject *a2, cocos2d::CCArray *a3, unsigned __int8 a4) { int v4; // w22 unsigned __int8 v7; // w0 unsigned int v8; // w23 cocos2d::CCDirector *started; // x0 cocos2d::CCDirector *v10; // x0 __int64 v11; // x22 void (__fastcall *v12)(__int64, __int64 *); // x25 void (__fastcall *v13)(__int64, __int64 *); // x25 int v14; // w0 const char *v15; // x2 cocos2d::CCLabelBMFont *v16; // x0 __int64 v17; // x22 void (__fastcall *v18)(__int64, __int64 *); // x25 const char *v19; // x6 __int64 v20; // x0 cocos2d::CCMenu *v21; // x0 __int64 v22; // x0 __int64 v23; // x3 __int64 v24; // x22 void (__fastcall *v25)(__int64, __int64 *); // x25 int v26; // w0 const char *v27; // x1 size_t v28; // x0 __int64 v29; // x25 void (__fastcall *v30)(__int64, __int64 *); // x26 cocos2d::CCNode *v31; // x27 const char *v32; // x2 __int64 v33; // x0 Slider *v34; // x2 __int64 v35; // x24 void (__fastcall *v36)(__int64, __int64 *); // x25 __int64 v37; // x0 Slider *v38; // x2 __int64 v39; // x24 void (__fastcall *v40)(__int64, __int64 *); // x25 __int64 v41; // x26 __int64 Thumb; // x0 float v43; // s0 __int64 v45; // x0 char v46; // w1 Slider *v47; // x0 char v48; // w0 cocos2d::CCObject *v50; // [xsp+78h] [xbp+68h] __int64 v51; // [xsp+80h] [xbp+70h] BYREF _BYTE v52[8]; // [xsp+88h] [xbp+78h] BYREF __int64 v53[2]; // [xsp+90h] [xbp+80h] BYREF __int64 v54[2]; // [xsp+A0h] [xbp+90h] BYREF void *v55; // [xsp+B0h] [xbp+A0h] __int64 v56[2]; // [xsp+B8h] [xbp+A8h] BYREF void *v57; // [xsp+C8h] [xbp+B8h] __int64 v58[2]; // [xsp+D0h] [xbp+C0h] BYREF void *v59; // [xsp+E0h] [xbp+D0h] __int64 v60[2]; // [xsp+E8h] [xbp+D8h] BYREF void *v61; // [xsp+F8h] [xbp+E8h] __int64 v62[2]; // [xsp+100h] [xbp+F0h] BYREF void *v63; // [xsp+110h] [xbp+100h] v4 = a4; v7 = FLAlertLayer::init((FLAlertLayer *)this, 150); v8 = v7; if ( !v7 ) return v8; *((_BYTE *)this + 700) = v4; *((_BYTE *)this + 596) = 1; if ( v4 ) { *((float *)this + 177) = 2.0; *((_DWORD *)this + 176) = 1036831949; if ( a2 ) goto LABEL_4; } else { *((float *)this + 177) = 5.0; *((_DWORD *)this + 176) = 0; if ( a2 ) { LABEL_4: *(this + 83) = a2; cocos2d::CCObject::retain(a2); goto LABEL_5; } } if ( a3 ) { *(this + 84) = a3; cocos2d::CCObject::retain(a3); } LABEL_5: started = (cocos2d::CCDirector *)SetupGravityModPopup::determineStartValues((__int64)this); v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(started); cocos2d::CCDirector::getWinSize(&v51, v10); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v53, 0.0, 0.0, 80.0, 80.0); v11 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v53); v12 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v53, 360.0, 280.0); v12(v11, v53); (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v11, 4294967294LL); v13 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, *(float *)&v51 * 0.5, *((float *)&v51 + 1) * 0.5); v13(v11, v53); v54[0] = 0; v14 = *((unsigned __int8 *)this + 700); v54[1] = 0; v55 = nullptr; if ( v14 ) std::string::assign(v54, "Setup Gravity Trigger"); else std::string::assign(v54, "Setup Force Modifier"); if ( (v54[0] & 1) != 0 ) v16 = (cocos2d::CCLabelBMFont *)v55; else v16 = (cocos2d::CCLabelBMFont *)((char *)v54 + 1); v17 = cocos2d::CCLabelBMFont::create(v16, "goldFont.fnt", v15); (*((void (__fastcall **)(Slider **, __int64))*this + 57))(this, v17); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 160LL))(v17, 0.7); v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v53, *(float *)&v51 * 0.5, (float)((float)(*((float *)&v51 + 1) * 0.5) + 140.0) - 18.0); v18(v17, v53); v20 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v19, 30.0); v21 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create( v20, 0, (__int64)this, (__int64)SetupGravityModPopup::onClose, 0); v22 = cocos2d::CCMenu::create(v21, nullptr); v23 = (__int64)*(this + 73); *(this + 69) = (Slider *)v22; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v23 + 464LL))(v23, v22, 10); v24 = (__int64)*(this + 69); v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v53, *(float *)&v51 * 0.5, (float)((float)(*((float *)&v51 + 1) * 0.5) + -140.0) + 24.0); v25(v24, v53); v26 = *((unsigned __int8 *)this + 700); v56[0] = 0; v56[1] = 0; v57 = nullptr; if ( v26 ) std::string::assign(v56, "Changes the gravity for the player."); else std::string::assign( v56, "Pushes the player with a force in the direction of the objects rotation. Blocks with the same forceID do not stack."); v58[0] = 0; v58[1] = 0; v59 = nullptr; std::string::__init(v58, "Help", 4u); v27 = (char *)v56 + 1; if ( (v56[0] & 1) != 0 ) v27 = (const char *)v57; v50 = (cocos2d::CCObject *)v27; v60[0] = 0; v60[1] = 0; v61 = nullptr; v28 = strlen(v27); std::string::__init(v60, v50, v28); v29 = InfoAlertButton::create((char *)v58, (char *)v60, 1.0); if ( (v60[0] & 1) != 0 ) operator delete(v61); if ( (v58[0] & 1) != 0 ) operator delete(v59); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v29); v30 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v29 + 184LL); v31 = *(this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v52, (float)((float)(*(float *)&v51 * 0.5) + -180.0) + 18.0, (float)((float)(*((float *)&v51 + 1) * 0.5) + 140.0) - 18.0); cocos2d::CCNode::convertToNodeSpace(v53, v31, (const cocos2d::CCPoint *)v52); v30(v29, v53); *((_DWORD *)this + 160) = -1; v33 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "goldFont.fnt", v32); v34 = *this; *(this + 85) = (Slider *)v33; (*((void (__fastcall **)(Slider **, __int64))v34 + 57))(this, v33); v35 = (__int64)*(this + 85); v36 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v35 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, *(float *)&v51 * 0.5, (float)(*((float *)&v51 + 1) * 0.5) + 60.0); v36(v35, v53); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*(this + 85) + 160LL))(*(this + 85), 0.6); v37 = Slider::create((int)this, (int)SetupGravityModPopup::sliderChanged, 0); v38 = *this; *(this + 86) = (Slider *)v37; (*((void (__fastcall **)(Slider **, __int64))v38 + 57))(this, v37); v39 = (__int64)*(this + 86); v40 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v39 + 184LL); v41 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 85) + 192LL))(*(this + 85)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v52, 0.0, -23.0); cocos2d::CCPoint::operator+(v53, v41); v40(v39, v53); Thumb = Slider::getThumb(*(this + 86)); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)Thumb + 72LL))(Thumb, 2); SetupGravityModPopup::updateValueLabel((SetupGravityModPopup *)this); v43 = (float)(*((float *)this + 174) - *((float *)this + 176)) / (float)(*((float *)this + 177) - *((float *)this + 176)); if ( v43 < 1.0 ) { if ( v43 <= 0.0 ) v43 = 0.0; } else { v43 = 1.0; } Slider::setValue(*(this + 86), v43); if ( *((_BYTE *)this + 700) ) { if ( (v56[0] & 1) == 0 ) goto LABEL_21; } else { cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v52, *(float *)&v51 * 0.5, (float)(*((float *)&v51 + 1) * 0.5) + -40.0); v62[0] = 0; v62[1] = 0; v63 = nullptr; std::string::__init(v62, "Force ID", 8u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, (const cocos2d::CCPoint *)v52); v45 = IDNameInput::create(this, this + 68, 2, 0, v62, v53, 6, 0, 1.0, 0, 0); v46 = v62[0]; *(this + 90) = (Slider *)v45; if ( (v46 & 1) != 0 ) { operator delete(v63); v45 = (__int64)*(this + 90); } if ( v45 ) v47 = *(Slider **)(v45 + 384); else v47 = nullptr; *(this + 89) = v47; SetupGravityModPopup::updateTextInputLabel((SetupGravityModPopup *)this); v48 = v56[0]; *((_BYTE *)this + 732) = 0; if ( (v48 & 1) == 0 ) goto LABEL_21; } operator delete(v57); LABEL_21: if ( (v54[0] & 1) != 0 ) operator delete(v55); return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source