// // SetupShakePopup::init from 0xaa1b9c to 0xaa23e0 (2116 bytes) // // 2 xrefs: // > SetupShakePopup::create @ 0xaa2644 // > @ 0x70e58 // // 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:00:49 +0000 // __int64 __fastcall SetupShakePopup::init(SetupShakePopup *this, EffectGameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCDirector *v5; // x0 cocos2d::CCDirector *v6; // x0 const char *v7; // x2 __int64 v8; // x19 void (__fastcall *v9)(__int64, __int64 *); // x23 const char *v10; // x6 __int64 v11; // x0 __int64 v12; // x0 __int64 v13; // x19 int v14; // w23 cocos2d::CCNode *v15; // x26 void (__fastcall *v16)(__int64, __int64 *); // x25 const char *v17; // x2 float v18; // s8 cocos2d::CCLabelBMFont *v19; // x0 __int64 v20; // x19 void (__fastcall *v21)(__int64, __int64 *); // x25 __int64 v22; // x25 void (__fastcall *v23)(__int64, __int64 *); // x19 const char *v24; // x4 char *v25; // x0 __int64 v26; // x19 __int64 v27; // x0 __int64 (__fastcall *v28)(__int64); // x1 void (__fastcall *v29)(__int64, __int64); // x25 __int64 v30; // x0 Slider *v31; // x25 __int64 v32; // x0 float v33; // s1 float v34; // s0 bool v35; // nf __int64 v36; // x0 __int64 Thumb; // x0 unsigned __int8 v38; // [xsp+B7h] [xbp+B7h] void (__fastcall *v39)(Slider *, __int64 *); // [xsp+B8h] [xbp+B8h] int v40; // [xsp+C8h] [xbp+C8h] __int64 v41; // [xsp+D0h] [xbp+D0h] BYREF _BYTE v42[8]; // [xsp+D8h] [xbp+D8h] BYREF _BYTE v43[8]; // [xsp+E0h] [xbp+E0h] BYREF _BYTE v44[8]; // [xsp+E8h] [xbp+E8h] BYREF _BYTE v45[8]; // [xsp+F0h] [xbp+F0h] BYREF _BYTE v46[16]; // [xsp+F8h] [xbp+F8h] BYREF __int64 v47[2]; // [xsp+108h] [xbp+108h] BYREF __int64 v48; // [xsp+118h] [xbp+118h] BYREF __int64 v49; // [xsp+120h] [xbp+120h] void *v50; // [xsp+128h] [xbp+128h] __int64 v51; // [xsp+130h] [xbp+130h] BYREF __int64 v52; // [xsp+138h] [xbp+138h] void *v53; // [xsp+140h] [xbp+140h] v38 = SetupTriggerPopup::init(this, a2, a3, 300.0, 285.0, 1, 0.0); if ( v38 ) { v5 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(SetupShakePopup *))(*(_QWORD *)this + 1360LL))(this); v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5); cocos2d::CCDirector::getWinSize(&v41, v6); v8 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Setup Shake", "bigFont.fnt", v7); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v8); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 160LL))(v8, 0.5); v9 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v47, *(float *)&v41 * 0.5, (float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v41 + 1) * 0.5)) - 14.0); v9(v8, v47); v11 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v10, 30.0); v12 = CCMenuItemSpriteExtra::create(v11, 0, (__int64)this, 1368, 1); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v12); v48 = 0; v49 = 0; v50 = nullptr; std::string::__init(&v48, "Help", 4u); v51 = 0; v52 = 0; v53 = nullptr; std::string::__init( &v51, "Shakes the screen for a set duration.\n" "Strength is how intense the shake is.\n" "Interval is how often the screen shakes. Leaving this at 0 means that every frame shakes.\n" "Avoid overusing this effect as it can cause bad gameplay.", 0xF7u); v13 = InfoAlertButton::create((char *)&v48, (char *)&v51, 1.0); if ( (v51 & 1) != 0 ) { operator delete(v53); if ( (v48 & 1) == 0 ) goto LABEL_5; } else if ( (v48 & 1) == 0 ) { LABEL_5: v14 = 0; (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v13); v15 = *((cocos2d::CCNode **)this + 69); v16 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v46, 18.0 - (float)((float)(*((float *)this + 183) * 0.5) - (float)(*(float *)&v41 * 0.5)), (float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v41 + 1) * 0.5)) - 18.0); cocos2d::CCNode::convertToNodeSpace(v47, v15, (const cocos2d::CCPoint *)v46); v16(v13, v47); SetupTriggerPopup::createMultiTriggerItemsDefault(this); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v42, *(float *)&v41 * 0.5, (float)(*((float *)&v41 + 1) * 0.5) + 95.0); while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43); v48 = 0; v49 = 0; v50 = nullptr; if ( v14 ) { if ( v14 == 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, -60.0); cocos2d::CCPoint::operator+(v47, v42); cocos2d::CCPoint::operator=(v43, v47); std::string::assign(&v48, "Interval: "); v18 = *((float *)this + 270); } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, -120.0); cocos2d::CCPoint::operator+(v47, v42); cocos2d::CCPoint::operator=(v43, v47); std::string::assign(&v48, "Duration: "); v18 = *((float *)this + 258); } } else { cocos2d::CCPoint::operator=(v43, v42); std::string::assign(&v48, "Strength: "); v18 = *((float *)this + 264); } v19 = (cocos2d::CCLabelBMFont *)((char *)&v48 + 1); if ( (v48 & 1) != 0 ) v19 = (cocos2d::CCLabelBMFont *)v50; v20 = cocos2d::CCLabelBMFont::create(v19, "goldFont.fnt", v17); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 0.7); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v20 + 184LL))(v20, v43); v21 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, 1.0, 0.5); v21(v20, v47); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v20); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v47, (const cocos2d::CCRect *)v46); v22 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v47); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 912LL))(v22, 100); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v44, 70.0, 30.0); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v22 + 320LL))(v22, v44); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v22, 0xFFFFFFFFLL); v23 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v22 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, 45.0, 0.0); cocos2d::CCPoint::operator+(v47, v43); v23(v22, v47); if ( v18 == -99999.0 ) v25 = "Mixed"; else v25 = "Num"; v26 = CCTextInputNode::create( (CCTextInputNode *)v25, 50.0, 40.0, "Thonburi", (const char *)&off_18, "bigFont.fnt", v24); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v26, 20); v27 = v22; v28 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 192LL); v29 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 184LL); v30 = v28(v27); v29(v26, v30); CCTextInputNode::setMaxLabelScale((CCTextInputNode *)v26, 0.6); CCTextInputNode::setMaxLabelWidth((CCTextInputNode *)v26, 200.0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v26 + 576) + 344LL))(*(_QWORD *)(v26 + 576), 0); *(_DWORD *)(v26 + 592) = 4; v51 = 0; v52 = 0; v53 = nullptr; std::string::__init(&v51, "0123456789.", 0xBu); CCTextInputNode::setAllowedChars(v26, (__int64)&v51); if ( (v51 & 1) != 0 ) operator delete(v53); LOBYTE(v40) = 120; *(_WORD *)((char *)&v40 + 1) = -3926; CCTextInputNode::setLabelPlaceholderColor(v26, v40); CCTextInputNode::setLabelPlaceholderScale((CCTextInputNode *)v26, 0.5); *(_BYTE *)(v26 + 424) = 1; *(_QWORD *)(v26 + 584) = (char *)this + 544; v31 = (Slider *)Slider::create((int)this, (int)SetupShakePopup::sliderChanged, 0, 0.8); Slider::setBarVisibility(v31); (*(void (__fastcall **)(_QWORD, Slider *))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v31); v39 = *(void (__fastcall **)(Slider *, __int64 *))(*(_QWORD *)v31 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, 0.0, -32.0); cocos2d::CCPoint::operator+(v47, v43); v39(v31, v47); if ( v14 ) { if ( v14 == 1 ) { *((_QWORD *)this + 133) = v26; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 72LL))(v26, 8); *((_QWORD *)this + 134) = v31; Thumb = Slider::getThumb(v31); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)Thumb + 72LL))(Thumb, 7); v33 = 1.0; v34 = v18 / 0.1; v35 = (float)(v18 / 0.1) < 1.0; if ( (float)(v18 / 0.1) < 1.0 ) { LABEL_25: if ( v34 <= 0.0 ) v34 = 0.0; goto LABEL_20; } } else { *((_QWORD *)this + 127) = v26; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 72LL))(v26, 5); *((_QWORD *)this + 128) = v31; v32 = Slider::getThumb(v31); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v32 + 72LL))(v32, 3); v33 = 1.0; v34 = v18 * 0.5; v35 = (float)(v18 * 0.5) < 1.0; if ( (float)(v18 * 0.5) < 1.0 ) goto LABEL_25; } } else { *((_QWORD *)this + 130) = v26; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 72LL))(v26, 6); *((_QWORD *)this + 131) = v31; v36 = Slider::getThumb(v31); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v36 + 72LL))(v36, 4); v33 = 1.0; v34 = v18 / 5.0; v35 = (float)(v18 / 5.0) < 1.0; if ( (float)(v18 / 5.0) < 1.0 ) goto LABEL_25; } if ( !v35 ) v34 = v33; LABEL_20: Slider::setValue(v31, v34); if ( (v48 & 1) != 0 ) operator delete(v50); if ( ++v14 == 3 ) { SetupShakePopup::updateShakeLabel(this, 0); SetupShakePopup::updateDurLabel(this, 0); SetupShakePopup::updateIntervalLabel(this, 0); *((_BYTE *)this + 744) = 0; return v38; } } } operator delete(v50); goto LABEL_5; } return v38; }
GD Web Decomp Icon

GD Web Decomp

Raw Source