// // SetupCameraModePopup::init from 0x1003aa41c to 0x1003aab3c (1824 bytes) // // 1 xrefs: // > SetupCameraModePopup::create @ 0x1003aa3cc // // 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 // bool __fastcall SetupCameraModePopup::init(SetupCameraModePopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { _BOOL4 v4; // w20 cocos2d::CCArray *v5; // x0 cocos2d::CCArray *v6; // x0 cocos2d::CCDirector *v7; // x0 cocos2d::CCLabelBMFont *v8; // x22 __n128 v9; // q0 __n128 v10; // q1 ButtonSprite *v11; // x0 CCMenuItemSpriteExtra *v12; // x0 char *v13; // x21 __n128 v14; // q0 cocos2d::CCMenu *m_buttonMenu; // x22 __n128 v16; // q1 __n128 v17; // q0 __n128 v18; // q1 bool m_freeMode; // w21 cocos2d::CCMenu *v20; // x22 cocos2d::CCLayer *m_mainLayer; // x23 __n128 v22; // q0 __n128 v23; // q1 bool m_cameraSettingsEnabled; // w21 cocos2d::CCMenu *v25; // x22 __n128 v26; // q0 __n128 v27; // q1 __n128 v28; // q0 cocos2d::CCLayer *v29; // x23 __n128 v30; // q1 __n128 v31; // q0 __n128 v32; // q1 __n128 v33; // q0 __n128 v34; // q1 cocos2d::CCLabelBMFont *v35; // x0 __n128 v36; // q0 cocos2d::CCLabelBMFont *m_cameraEasingLabel; // x21 __n128 v38; // q1 Slider *v39; // x0 Slider *m_cameraEasingSlider; // x24 float32x2_t *v41; // x25 __n128 v42; // q0 __n128 v43; // q1 double v44; // d0 SliderThumb *Thumb; // x0 cocos2d::CCLabelBMFont *v46; // x0 cocos2d::CCLabelBMFont *m_cameraPaddingLabel; // x22 float32x2_t *v48; // x23 __n128 v49; // q1 __n128 v50; // q0 double v51; // d0 Slider *v52; // x0 Slider *m_cameraPaddingSlider; // x21 float32x2_t *v54; // x22 __n128 v55; // q0 __n128 v56; // q1 double v57; // d0 SliderThumb *v58; // x0 void *v60[2]; // [xsp+20h] [xbp-F0h] BYREF char v61; // [xsp+37h] [xbp-D9h] int v62; // [xsp+38h] [xbp-D8h] BYREF void *v63[2]; // [xsp+40h] [xbp-D0h] BYREF char v64; // [xsp+57h] [xbp-B9h] float32x2_t v65; // [xsp+58h] [xbp-B8h] BYREF void *v66[2]; // [xsp+60h] [xbp-B0h] BYREF char v67; // [xsp+77h] [xbp-99h] cocos2d::CCPoint v68; // [xsp+78h] [xbp-98h] BYREF void *__p[2]; // [xsp+80h] [xbp-90h] BYREF char v70; // [xsp+97h] [xbp-79h] void *v71[2]; // [xsp+98h] [xbp-78h] BYREF char v72; // [xsp+AFh] [xbp-61h] float32x2_t v73; // [xsp+B0h] [xbp-60h] BYREF float v74; // [xsp+B8h] [xbp-58h] float v75; // [xsp+BCh] [xbp-54h] cocos2d::CCPoint v76; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v77; // 0:x1.16 cocos2d::SEL_MenuHandler v78; // 0:x1.16 cocos2d::SEL_MenuHandler v79; // 0:x3.16 v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 280.0, 1); if ( v4 ) { v5 = (cocos2d::CCArray *)sub_10024A15C(); a1->m_freeModeObjects = v5; cocos2d::CCObject::retain(v5); v6 = (cocos2d::CCArray *)sub_10024A15C(); a1->m_cameraSettingsObjects = v6; cocos2d::CCObject::retain(v6); ((void (__fastcall *)(SetupCameraModePopup *))a1->determineStartValues)(a1); v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v7); v8 = cocos2d::CCLabelBMFont::create_1("Camera Mode", "goldFont.fnt"); ((void (__fastcall *)(SetupCameraModePopup *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v8); v9 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v8->setScale)(v8, 0.7); v9.n128_f32[0] = v74 * 0.5; v10.n128_f32[0] = (float)((float)(v75 * 0.5) + (float)(a1->m_height * 0.5)) + -18.0; sub_100022980(v9, v10, &v73); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v8->setPosition)(v8, &v73); v11 = ButtonSprite::create_1("OK", 40, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", 30.0); v79.ptr = (void (__cdecl *)(cocos2d::CCObject *))1320; v79.adj = 1; v12 = CCMenuItemSpriteExtra::create(v11, nullptr, a1, v79); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v12); sub_100009900(v71, "Help"); sub_100009900( __p, "Toggles Free Mode. This removes the borders for certain game modes.\n" "Edit Camera Settings allows you to edit camera movement in Free Mode. Padding is how close the pla" "yer has to be to the top or bottom for the camera to follow.\n" "Disable GridSnap removes default snapping to nearest grid space for the camera center."); v13 = InfoAlertButton::create((__int64)v71, (__int64)__p, 1.0); if ( v70 < 0 ) operator delete(__p[0]); if ( v72 < 0 ) operator delete(v71[0]); v14 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, char *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v13); m_buttonMenu = a1->m_buttonMenu; v14.n128_f32[0] = (float)((float)(v74 * 0.5) - (float)(a1->m_width * 0.5)) + 18.0; v16.n128_f32[0] = (float)((float)(v75 * 0.5) + (float)(a1->m_height * 0.5)) + -18.0; sub_100022980(v14, v16, &v68); v76 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v68); v17 = ((__n128 (__fastcall *)(char *, float32x2_t *, float, float))*(_QWORD *)(*(_QWORD *)v13 + 184LL))( v13, &v73, v76.x, v76.y); a1->m_joystickConnected = -1; v17.n128_f32[0] = (float)(v74 * 0.5) + -120.0; v18.n128_f32[0] = (float)(v75 * 0.5) + 70.0; sub_100022980(v17, v18, &v73); sub_100009900(v66, "Free Mode"); m_freeMode = a1->m_freeMode; v20 = a1->m_buttonMenu; sub_1000229B8((__int64 *)&v68, (__int64 *)&v73); m_mainLayer = a1->m_mainLayer; v22.n128_u32[0] = 8.0; v23.n128_u32[0] = 0; sub_100022980(v22, v23, &v65); GameToolbox::createToggleButton( (const char *)v66, (void (__cdecl *)(cocos2d::CCObject *))SetupCameraModePopup::onUnboundMode, 0, m_freeMode, v20, &v68, a1, m_mainLayer, 0.8, 0.45, 0.0, (float *)&v65, "bigFont.fnt", 0, 0, 0); if ( v67 < 0 ) operator delete(v66[0]); sub_100009900(v63, "Edit Camera\nSettings"); m_cameraSettingsEnabled = a1->m_cameraSettingsEnabled; v25 = a1->m_buttonMenu; v26.n128_u32[0] = 1125515264; v27.n128_u32[0] = 0; sub_100022980(v26, v27, &v65); v28.n128_f32[1] = sub_1000229DC(&v73, &v65, (float32x2_t *)&v68).f32[1]; v29 = a1->m_mainLayer; v28.n128_u32[0] = 8.0; v30.n128_u32[0] = 0; sub_100022980(v28, v30, &v62); GameToolbox::createToggleButton( (const char *)v63, (void (__cdecl *)(cocos2d::CCObject *))SetupCameraModePopup::onEditCameraSettings, 0, m_cameraSettingsEnabled, v25, &v68, a1, v29, 0.8, 0.45, 0.0, (float *)&v62, "bigFont.fnt", 0, 0, (__int64)a1->m_freeModeObjects); if ( v64 < 0 ) operator delete(v63[0]); sub_100009900(v60, "Disable\nGridSnap"); v31.n128_f32[0] = (float)((float)(v74 * 0.5) + (float)(a1->m_width * 0.5)) + -90.0; v32.n128_f32[0] = (float)((float)(v75 * 0.5) + (float)(a1->m_height * 0.5)) + -20.0; sub_100022980(v31, v32, &v68); v33.n128_u32[0] = 1.0; SetupTriggerPopup::createToggleValueControl((__int64)a1, 370, (__int64)v60, (__int64 *)&v68, 0, 0, 1, v33, v34); if ( v61 < 0 ) operator delete(v60[0]); v35 = cocos2d::CCLabelBMFont::create_1(" ", "goldFont.fnt"); a1->m_cameraEasingLabel = v35; v36 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v35); m_cameraEasingLabel = a1->m_cameraEasingLabel; v36.n128_f32[0] = v74 * 0.5; v38.n128_f32[0] = (float)(v75 * 0.5) + 20.0; sub_100022980(v36, v38, &v68); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))m_cameraEasingLabel->setPosition)( m_cameraEasingLabel, &v68); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_cameraEasingLabel->setScale)( a1->m_cameraEasingLabel, 0.8); sub_10024A2D0((__int64)a1->m_cameraSettingsObjects); v77.ptr = (void (__cdecl *)(cocos2d::CCObject *))SetupCameraModePopup::sliderChanged; v77.adj = 0; v39 = Slider::create_2(a1, v77); a1->m_cameraEasingSlider = v39; ((void (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v39); m_cameraEasingSlider = a1->m_cameraEasingSlider; v41 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraEasingLabel->getPosition)(a1->m_cameraEasingLabel); v42.n128_u32[0] = 0; v43.n128_u32[0] = -30.0; sub_100022980(v42, v43, &v65); *(float32x2_t *)&v44 = sub_1000229DC(v41, &v65, (float32x2_t *)&v68); ((void (__fastcall *)(Slider *, cocos2d::CCPoint *, double))m_cameraEasingSlider->setPosition)( m_cameraEasingSlider, &v68, v44); Thumb = Slider::getThumb(a1->m_cameraEasingSlider); ((void (__fastcall *)(SliderThumb *, _QWORD))Thumb->setTag)(Thumb, 0); sub_10024A2D0((__int64)a1->m_cameraSettingsObjects); SetupCameraModePopup::updateCameraEasingLabel(a1); Slider::setValue(a1->m_cameraEasingSlider, (float)((float)a1->m_cameraEasing + -1.0) / 39.0); v46 = cocos2d::CCLabelBMFont::create_1(" ", "goldFont.fnt"); a1->m_cameraPaddingLabel = v46; ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v46); m_cameraPaddingLabel = a1->m_cameraPaddingLabel; v48 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraEasingLabel->getPosition)(a1->m_cameraEasingLabel); v49.n128_u32[0] = -1032847360; v50.n128_u32[0] = 0; sub_100022980(v50, v49, &v65); *(float32x2_t *)&v51 = sub_1000229DC(v48, &v65, (float32x2_t *)&v68); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *, double))m_cameraPaddingLabel->setPosition)( m_cameraPaddingLabel, &v68, v51); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_cameraPaddingLabel->setScale)( a1->m_cameraPaddingLabel, 0.8); sub_10024A2D0((__int64)a1->m_cameraSettingsObjects); v78.ptr = (void (__cdecl *)(cocos2d::CCObject *))SetupCameraModePopup::sliderChanged; v78.adj = 0; v52 = Slider::create_2(a1, v78); a1->m_cameraPaddingSlider = v52; ((void (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v52); m_cameraPaddingSlider = a1->m_cameraPaddingSlider; v54 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_cameraPaddingLabel->getPosition)(a1->m_cameraPaddingLabel); v55.n128_u32[0] = 0; v56.n128_u32[0] = -30.0; sub_100022980(v55, v56, &v65); *(float32x2_t *)&v57 = sub_1000229DC(v54, &v65, (float32x2_t *)&v68); ((void (__fastcall *)(Slider *, cocos2d::CCPoint *, double))m_cameraPaddingSlider->setPosition)( m_cameraPaddingSlider, &v68, v57); v58 = Slider::getThumb(a1->m_cameraPaddingSlider); ((void (__fastcall *)(SliderThumb *, __int64))v58->setTag)(v58, 1); sub_10024A2D0((__int64)a1->m_cameraSettingsObjects); SetupCameraModePopup::updateCameraPaddingLabel(a1); Slider::setValue(a1->m_cameraPaddingSlider, a1->m_cameraPadding); SetupCameraModePopup::updateItemVisibility(a1); ((void (__fastcall *)(SetupCameraModePopup *))a1->updateDefaultTriggerValues)(a1); if ( a1->m_cameraModeObjects ) SetupTriggerPopup::createMultiTriggerItemsDefaultVertical(a1); a1->m_disableTextDelegate = 0; } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source