// // SetupCameraModePopup::init from 0x55e08c to 0x55e6ba (1582 bytes) // // 1 xrefs: // > SetupCameraModePopup::create @ 0x55e846 // // 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 SetupCameraModePopup::init(SetupCameraModePopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { _BOOL4 v4; // r0 cocos2d::CCArray *v5; // r0 cocos2d::CCArray *v6; // r0 cocos2d::CCArray *v7; // r0 cocos2d::CCDirector *v8; // r0 cocos2d::CCLabelBMFont *v9; // r5 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 ButtonSprite *v11; // r0 CCMenuItemSpriteExtra *v12; // r0 CCMenuItemSpriteExtra *v13; // r7 cocos2d::CCMenu *m_buttonMenu; // r9 void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 float width; // s14 cocos2d::CCMenu *v17; // r11 cocos2d::CCLayer *m_mainLayer; // r10 cocos2d::CCMenu *v19; // r11 cocos2d::CCLabelBMFont *v20; // r0 cocos2d::CCLabelBMFont *m_cameraEasingLabel; // r7 void (__fastcall *v22)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 Slider *v23; // r0 Slider *m_cameraEasingSlider; // r11 SliderThumb *Thumb; // r0 cocos2d::CCLabelBMFont *v26; // r0 cocos2d::CCLabelBMFont *m_cameraPaddingLabel; // r9 void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 const cocos2d::CCPoint *v29; // r11 Slider *v30; // r0 Slider *m_cameraPaddingSlider; // r6 void (__fastcall *v32)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 const cocos2d::CCPoint *v33; // r10 SliderThumb *v34; // r0 float v36; // [sp+10h] [bp-84h] bool v37; // [sp+30h] [bp-64h] bool m_freeMode; // [sp+34h] [bp-60h] cocos2d::CCLayer *v39; // [sp+34h] [bp-60h] const cocos2d::CCPoint *v40; // [sp+34h] [bp-60h] void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+3Ch] [bp-58h] cocos2d::CCSize v42; // [sp+44h] [bp-50h] BYREF cocos2d::CCPoint v43; // [sp+4Ch] [bp-48h] BYREF cocos2d::CCPoint v44; // [sp+54h] [bp-40h] BYREF cocos2d::CCPoint v45; // [sp+5Ch] [bp-38h] BYREF int v46; // [sp+64h] [bp-30h] int v47; // [sp+68h] [bp-2Ch] void (*v48)(SetupCameraModePopup *, cocos2d::CCObject *); // [sp+6Ch] [bp-28h] unsigned int v49; // [sp+70h] [bp-24h] void (*v50)(SetupCameraModePopup *, cocos2d::CCObject *); // [sp+74h] [bp-20h] BYREF unsigned int v51; // [sp+78h] [bp-1Ch] cocos2d::CCPoint v52; // [sp+7Ch] [bp-18h] BYREF cocos2d::CCPoint v53; // [sp+84h] [bp-10h] BYREF v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 280.0, 1); v37 = v4; if ( v4 ) { v5 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v4); a1->m_freeModeObjects = v5; cocos2d::CCObject::retain(v5); v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6); a1->m_cameraSettingsObjects = v7; cocos2d::CCObject::retain(v7); a1->determineStartValues(a1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v42, v8); v9 = cocos2d::CCLabelBMFont::create(); a1->addChild(a1, v9); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v9->setScale)(v9, 1060320051); setPosition = v9->setPosition; cocos2d::CCPoint::CCPoint( &v53, v42.width * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v42.height * 0.5)) - 18.0); setPosition(v9, &v53); v11 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&word_28, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", (const char *)0x41F00000, v36); v46 = 660; v47 = 1; v12 = CCMenuItemSpriteExtra::create(v11, nullptr, (cocos2d::SEL_MenuHandler)((unsigned int)a1 | 0x29400000000LL)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v12); sub_776584((int)&v52, "Help"); sub_776584( (int)&v53, "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((int)&v52, (int)&v53, 1065353216); sub_774008(&v53); sub_774008(&v52); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v13); m_buttonMenu = a1->m_buttonMenu; v15 = v13->setPosition; cocos2d::CCPoint::CCPoint( &v52, (float)((float)(v42.width * 0.5) - (float)(a1->m_width * 0.5)) + 18.0, (float)((float)(a1->m_height * 0.5) + (float)(v42.height * 0.5)) - 18.0); cocos2d::CCNode::convertToNodeSpace(&v53, m_buttonMenu, &v52); v15(v13, &v53); width = v42.width; a1->m_joystickConnected = -1; cocos2d::CCPoint::CCPoint(&v43, (float)(width * 0.5) - 120.0, (float)(v42.height * 0.5) + 70.0); sub_776584((int)&v50, "Free Mode"); v48 = SetupCameraModePopup::onUnboundMode; v49 = 0; v17 = a1->m_buttonMenu; m_freeMode = a1->m_freeMode; cocos2d::CCPoint::CCPoint(&v53, &v43); m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v52, 8.0, 0.0); GameToolbox::createToggleButton( (int)&v50, (unsigned int)v48, v49, m_freeMode, v17, &v53, a1, m_mainLayer, 0.8, 0.45, 0.0, (int)&v52, (int)"bigFont.fnt", 0, 0, nullptr); sub_774008(&v50); sub_776584((int)&v44, "Edit Camera\nSettings"); LOBYTE(m_mainLayer) = a1->m_cameraSettingsEnabled; v50 = SetupCameraModePopup::onEditCameraSettings; v19 = a1->m_buttonMenu; v51 = 0; cocos2d::CCPoint::CCPoint(&v45, 150.0, 0.0); cocos2d::CCPoint::operator+(&v52, &v43, &v45); v39 = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v53, 8.0, 0.0); GameToolbox::createToggleButton( (int)&v44, (unsigned int)v50, v51, (bool)m_mainLayer, v19, &v52, a1, v39, 0.8, 0.45, 0.0, (int)&v53, (int)"bigFont.fnt", 0, 0, a1->m_freeModeObjects); sub_774008(&v44); sub_776584((int)&v52, "Disable\nGridSnap"); cocos2d::CCPoint::CCPoint( &v53, (float)((float)(a1->m_width * 0.5) + (float)(v42.width * 0.5)) - 90.0, (float)((float)(a1->m_height * 0.5) + (float)(v42.height * 0.5)) - 20.0); SetupTriggerPopup::createToggleValueControl(a1, 370, (int)&v52, &v53, 0, 0, 1, 1.0); sub_774008(&v52); v20 = cocos2d::CCLabelBMFont::create(); a1->m_cameraEasingLabel = v20; a1->m_mainLayer->addChild(a1->m_mainLayer, v20); m_cameraEasingLabel = a1->m_cameraEasingLabel; v22 = m_cameraEasingLabel->setPosition; cocos2d::CCPoint::CCPoint(&v53, v42.width * 0.5, (float)(v42.height * 0.5) + 20.0); v22(m_cameraEasingLabel, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_cameraEasingLabel->setScale)( a1->m_cameraEasingLabel, 1061997773); cocos2d::CCArray::addObject(a1->m_cameraSettingsObjects, a1->m_cameraEasingLabel); v52.y = 0.0; LODWORD(v52.x) = SetupCameraModePopup::sliderChanged; v23 = Slider::create(a1, (cocos2d::SEL_MenuHandler)(unsigned int)SetupCameraModePopup::sliderChanged); a1->m_cameraEasingSlider = v23; a1->m_mainLayer->addChild(a1->m_mainLayer, v23); m_cameraEasingSlider = a1->m_cameraEasingSlider; v41 = m_cameraEasingSlider->setPosition; v40 = a1->m_cameraEasingLabel->getPosition(a1->m_cameraEasingLabel); cocos2d::CCPoint::CCPoint(&v45, 0.0, -30.0); cocos2d::CCPoint::operator+(&v53, v40, &v45); v41(m_cameraEasingSlider, &v53); Thumb = Slider::getThumb(a1->m_cameraEasingSlider); Thumb->setTag(Thumb, 0); cocos2d::CCArray::addObject(a1->m_cameraSettingsObjects, a1->m_cameraEasingSlider); SetupCameraModePopup::updateCameraEasingLabel(a1); Slider::setValue(a1->m_cameraEasingSlider, (float)((float)a1->m_cameraEasing - 1.0) / 39.0); v26 = cocos2d::CCLabelBMFont::create(); a1->m_cameraPaddingLabel = v26; a1->m_mainLayer->addChild(a1->m_mainLayer, v26); m_cameraPaddingLabel = a1->m_cameraPaddingLabel; v28 = m_cameraPaddingLabel->setPosition; v29 = a1->m_cameraEasingLabel->getPosition(a1->m_cameraEasingLabel); cocos2d::CCPoint::CCPoint(&v45, 0.0, -60.0); cocos2d::CCPoint::operator+(&v53, v29, &v45); v28(m_cameraPaddingLabel, &v53); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_cameraPaddingLabel->setScale)( a1->m_cameraPaddingLabel, 1061997773); cocos2d::CCArray::addObject(a1->m_cameraSettingsObjects, a1->m_cameraPaddingLabel); LODWORD(v53.x) = SetupCameraModePopup::sliderChanged; v53.y = 0.0; v30 = Slider::create(a1, (cocos2d::SEL_MenuHandler)(unsigned int)SetupCameraModePopup::sliderChanged); a1->m_cameraPaddingSlider = v30; a1->m_mainLayer->addChild(a1->m_mainLayer, v30); m_cameraPaddingSlider = a1->m_cameraPaddingSlider; v32 = m_cameraPaddingSlider->setPosition; v33 = a1->m_cameraPaddingLabel->getPosition(a1->m_cameraPaddingLabel); cocos2d::CCPoint::CCPoint(&v44, 0.0, -30.0); cocos2d::CCPoint::operator+(&v45, v33, &v44); v32(m_cameraPaddingSlider, &v45); v34 = Slider::getThumb(a1->m_cameraPaddingSlider); v34->setTag(v34, 1); cocos2d::CCArray::addObject(a1->m_cameraSettingsObjects, a1->m_cameraPaddingSlider); SetupCameraModePopup::updateCameraPaddingLabel(a1); Slider::setValue(a1->m_cameraPaddingSlider, a1->m_cameraPadding); SetupCameraModePopup::updateItemVisibility(a1); a1->updateDefaultTriggerValues(a1); if ( a1->m_cameraModeObjects ) SetupTriggerPopup::createMultiTriggerItemsDefaultVertical(a1); a1->m_disableTextDelegate = 0; } return v37; }
GD Web Decomp Icon

GD Web Decomp

Raw Source