// // SetupCameraRotatePopup::init from 0x5266c0 to 0x52717c (2748 bytes) // // 1 xrefs: // > SetupCameraRotatePopup::create @ 0x527242 // // 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 SetupCameraRotatePopup::init(SetupCameraRotatePopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCDirector *v4; // r0 cocos2d::CCLabelBMFont *v5; // r5 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 const char *v7; // r1 ButtonSprite *v8; // r0 CCMenuItemSpriteExtra *v9; // r0 CCMenuItemSpriteExtra *v10; // r5 cocos2d::CCMenu *m_buttonMenu; // r7 void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCLabelBMFont *v13; // r5 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCNode *v15; // r7 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 const char *v17; // r2 CCTextInputNode *v18; // r0 CCTextInputNode *m_moveTimeInput; // r5 void (__fastcall *v20)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 int v21; // r0 CCTextInputNode *v22; // r5 CCTextInputNode *v23; // r3 Slider *v24; // r0 Slider *m_moveTimeSlider; // r6 void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 float v27; // s15 cocos2d::CCLabelBMFont *v28; // r9 void (__fastcall *v29)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCLabelBMFont *v30; // r0 cocos2d::CCLabelBMFont *m_cameraEasingLabel; // r7 int v32; // r11 cocos2d::CCSprite *v33; // r11 cocos2d::CCLabelBMFont *v34; // r0 cocos2d::CCSprite_vtbl *v35; // r3 void (__fastcall *v36)(cocos2d::CCPoint *, cocos2d::CCRect *); // r7 CCMenuItemSpriteExtra *v37; // r0 void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v39; // r9 cocos2d::CCSprite *v40; // r9 CCMenuItemSpriteExtra *v41; // r9 cocos2d::CCSprite *v42; // r9 CCMenuItemSpriteExtra *v43; // r9 const cocos2d::CCPoint *v44; // r11 int v45; // r2 bool v46; // r3 cocos2d::CCLabelBMFont *v47; // r8 void (__fastcall *v48)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCNode *v49; // r8 void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 int m_degrees; // r9 const char *v52; // r2 CCTextInputNode *v53; // r6 void (__fastcall *v54)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v55; // r0 CCTextInputNode_vtbl *v56; // r3 Slider *v57; // r6 void (__fastcall *v58)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 float v59; // s15 _BOOL4 v61; // [sp+8h] [bp-BCh] cocos2d::CCPoint *v62; // [sp+14h] [bp-B0h] cocos2d::CCPoint *m_cameraEasingRateLabel; // [sp+14h] [bp-B0h] cocos2d::CCMenu *v64; // [sp+14h] [bp-B0h] cocos2d::CCPoint *v65; // [sp+14h] [bp-B0h] cocos2d::CCPoint *v66; // [sp+14h] [bp-B0h] CCMenuItemSpriteExtra *m_cameraEasingRateButton; // [sp+18h] [bp-ACh] cocos2d::CCPoint *v68; // [sp+18h] [bp-ACh] cocos2d::CCMenu *v69; // [sp+18h] [bp-ACh] cocos2d::CCMenu *v70; // [sp+20h] [bp-A4h] cocos2d::ccColor3B v71; // [sp+2Ch] [bp-98h] cocos2d::ccColor3B v72; // [sp+30h] [bp-94h] cocos2d::CCSize v73; // [sp+34h] [bp-90h] BYREF cocos2d::CCPoint v74; // [sp+3Ch] [bp-88h] BYREF cocos2d::CCSize v75; // [sp+44h] [bp-80h] BYREF void (*v76)(SetupCameraRotatePopup *, cocos2d::CCObject *); // [sp+4Ch] [bp-78h] unsigned int v77; // [sp+50h] [bp-74h] cocos2d::CCSize v78; // [sp+54h] [bp-70h] BYREF cocos2d::CCPoint v79; // [sp+5Ch] [bp-68h] BYREF int v80; // [sp+64h] [bp-60h] int v81; // [sp+68h] [bp-5Ch] void (*v82)(SetupCameraRotatePopup *, cocos2d::CCObject *); // [sp+6Ch] [bp-58h] int v83; // [sp+70h] [bp-54h] void (*v84)(SetupCameraRotatePopup *, cocos2d::CCObject *); // [sp+74h] [bp-50h] int v85; // [sp+78h] [bp-4Ch] void (*v86)(SetupCameraRotatePopup *, cocos2d::CCObject *); // [sp+7Ch] [bp-48h] int v87; // [sp+80h] [bp-44h] cocos2d::CCPoint v88; // [sp+84h] [bp-40h] BYREF cocos2d::CCRect v89; // [sp+8Ch] [bp-38h] BYREF cocos2d::CCRect v90; // [sp+9Ch] [bp-28h] BYREF cocos2d::CCRect v91; // [sp+ACh] [bp-18h] BYREF cocos2d::CCRect v92; // 0:r2.8,8:^0.8 cocos2d::CCRect v93; // 0:r2.8,8:^0.8 v61 = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1); if ( v61 ) { v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v73, v4); v5 = cocos2d::CCLabelBMFont::create(); setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint( &v91.origin, v73.width * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v73.height * 0.5)) - 15.0); setPosition(v5, &v91.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v5->setScale)(v5, 1058642330); v8 = ButtonSprite::create((ButtonSprite *)"OK", v7); v80 = 660; v81 = 1; v9 = CCMenuItemSpriteExtra::create(v8, nullptr, (cocos2d::SEL_MenuHandler)((unsigned int)a1 | 0x29400000000LL)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v9); sub_776584((int)&v90, "Help"); sub_776584( (int)&v91, "Rotates the camera to the target value.\n" "Move Time is how fast the rotate happens.\n" "Easing changes the method used."); v10 = InfoAlertButton::create((int)&v90, (int)&v91, 1065353216); sub_774008(&v91); sub_774008(&v90); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v10); m_buttonMenu = a1->m_buttonMenu; v12 = v10->setPosition; cocos2d::CCPoint::CCPoint( &v90.origin, (float)((float)(a1->m_width * 0.5) + (float)(v73.width * 0.5)) - 18.0, (float)((float)(a1->m_height * 0.5) + (float)(v73.height * 0.5)) - 18.0); cocos2d::CCNode::convertToNodeSpace(&v91.origin, m_buttonMenu, &v90.origin); v12(v10, &v91.origin); a1->determineStartValues(a1); cocos2d::CCPoint::CCPoint(&v74, (float)(v73.width * 0.5) - 90.0, (float)(v73.height * 0.5) - 50.0); v13 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v13->setScale)(v13, 1060320051); v13->setPosition(v13, &v74); setAnchorPoint = v13->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v91.origin, 1.0, 0.5); setAnchorPoint(v13, &v91.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v13); cocos2d::CCRect::CCRect(&v89, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect(&v91, &v89); v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02_small.png", (const char *)&v91, v92); ((void (__fastcall *)(cocos2d::CCNode *, int))v15->__vftable[1].~CCNode_0)(v15, 100); cocos2d::CCSize::CCSize(&v75, 70.0, 30.0); v15->setContentSize(v15, &v75); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, -1); v16 = v15->setPosition; cocos2d::CCPoint::CCPoint(&v90.origin, 45.0, 0.0); cocos2d::CCPoint::operator+(&v91, &v74, &v90); v16(v15, &v91.origin); if ( a1->m_moveTime == -99999.0 ) v17 = "Mixed"; else v17 = "Num"; v18 = CCTextInputNode::create(50.0, 40.0, v17, "Thonburi"); a1->m_moveTimeInput = v18; ((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v18, 20, a1->m_mainLayer->addChild_0, &dword_18, "bigFont.fnt"); m_moveTimeInput = a1->m_moveTimeInput; v20 = m_moveTimeInput->setPosition; v21 = (int)v15->getPosition(v15); v20(m_moveTimeInput, (const cocos2d::CCPoint *)v21); CCTextInputNode::setMaxLabelScale(a1->m_moveTimeInput, 0.6); CCTextInputNode::setMaxLabelWidth(a1->m_moveTimeInput, 200.0); a1->m_moveTimeInput->m_textField->setVisible(a1->m_moveTimeInput->m_textField, 0); v22 = a1->m_moveTimeInput; v22->m_maxLabelLength = 4; sub_776584((int)&v91, "0123456789."); CCTextInputNode::setAllowedChars((int)v22, (int)&v91); sub_774008(&v91); *(_WORD *)&v71.r = -21896; v71.b = -16; CCTextInputNode::setLabelPlaceholderColor(a1->m_moveTimeInput, v71); CCTextInputNode::setLabelPlaceholderScale(a1->m_moveTimeInput, 0.5); v23 = a1->m_moveTimeInput; v23->m_numberInput = 1; v23->m_delegate = &a1->TextInputDelegate; a1->m_moveTimeInput->setTag(a1->m_moveTimeInput, 2); v83 = 0; v82 = SetupCameraRotatePopup::sliderChanged; v24 = (Slider *)Slider::create(a1, (unsigned int)SetupCameraRotatePopup::sliderChanged, 0, 0.8); a1->m_moveTimeSlider = v24; Slider::setBarVisibility(v24, 0); a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_moveTimeSlider); m_moveTimeSlider = a1->m_moveTimeSlider; v26 = m_moveTimeSlider->setPosition; cocos2d::CCPoint::CCPoint(&v90.origin, 0.0, -32.0); cocos2d::CCPoint::operator+(&v91, &v74, &v90); v26(m_moveTimeSlider, &v91.origin); v27 = a1->m_moveTime / 10.0; if ( v27 >= 1.0 ) { v27 = 1.0; } else if ( v27 <= 0.0 ) { v27 = 0.0; } Slider::setValue(a1->m_moveTimeSlider, v27); SetupCameraRotatePopup::updateDurLabel(a1, 0); v28 = cocos2d::CCLabelBMFont::create(); v29 = v28->setPosition; cocos2d::CCPoint::CCPoint(&v91.origin, (float)(v73.width * 0.5) - 90.0, (float)(v73.height * 0.5) + 20.0); v29(v28, &v91.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v28); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v28->setScale)(v28, 1061997773); v30 = cocos2d::CCLabelBMFont::create(); a1->m_cameraEasingLabel = v30; a1->m_mainLayer->addChild(a1->m_mainLayer, v30); m_cameraEasingLabel = a1->m_cameraEasingLabel; v62 = (cocos2d::CCPoint *)m_cameraEasingLabel->setPosition; v32 = (int)v28->getPosition(v28); cocos2d::CCPoint::CCPoint(&v90.origin, 0.0, -30.0); cocos2d::CCPoint::operator+(&v91, v32, &v90); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v62)(m_cameraEasingLabel, &v91); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_cameraEasingLabel->setScale)( a1->m_cameraEasingLabel, 1060320051); v33 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png"); v33->setColor(v33, &stru_9ACF6C); v33->setOpacity(v33, 100); v34 = cocos2d::CCLabelBMFont::create(); v35 = v33->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_cameraEasingRateLabel = v34; v35->addChild(v33, v34); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_cameraEasingRateLabel->setScaleX)( a1->m_cameraEasingRateLabel, 1052770304); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_cameraEasingRateLabel->setScaleY)( a1->m_cameraEasingRateLabel, 1061158912); m_cameraEasingRateLabel = (cocos2d::CCPoint *)a1->m_cameraEasingRateLabel; v36 = *(void (__fastcall **)(cocos2d::CCPoint *, cocos2d::CCRect *))(LODWORD(m_cameraEasingRateLabel->x) + 92); cocos2d::CCNode::convertToNodeSpace(&v88, v33, &stru_AC7648); cocos2d::CCPoint::CCPoint(&v90.origin, 1.0, 1.5); cocos2d::CCPoint::operator+(&v91, &v88, &v90); v36(m_cameraEasingRateLabel, &v91); ((void (__fastcall *)(cocos2d::CCSprite *, int))v33->setScaleX)(v33, 1061997773); ((void (__fastcall *)(cocos2d::CCSprite *, int))v33->setScaleY)(v33, 1053609165); v85 = 0; v84 = SetupCameraRotatePopup::onEasingRate; v37 = CCMenuItemSpriteExtra::create( v33, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetupCameraRotatePopup::onEasingRate, (unsigned int)a1)); a1->m_cameraEasingRateButton = v37; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v37); m_cameraEasingRateButton = a1->m_cameraEasingRateButton; v38 = m_cameraEasingRateButton->setPosition; v64 = a1->m_buttonMenu; v39 = (int)v28->getPosition(v28); cocos2d::CCPoint::CCPoint(&v88, 55.0, -2.0); cocos2d::CCPoint::operator+(&v90, v39, &v88); cocos2d::CCNode::convertToNodeSpace(&v91.origin, v64, &v90.origin); v38(m_cameraEasingRateButton, &v91.origin); CCMenuItemSpriteExtra::setSizeMult(a1->m_cameraEasingRateButton, 1.2); SetupCameraRotatePopup::updateEasingRateLabel(a1); SetupCameraRotatePopup::toggleEasingRateVisibility(a1); v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v40, 1); ((void (__fastcall *)(cocos2d::CCSprite *, int))v40->setScale)(v40, 1060320051); v87 = 0; v86 = SetupCameraRotatePopup::onEasing; v41 = CCMenuItemSpriteExtra::create( v40, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetupCameraRotatePopup::onEasing, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v41); v65 = (cocos2d::CCPoint *)v41->setPosition; v70 = a1->m_buttonMenu; v68 = (cocos2d::CCPoint *)a1->m_cameraEasingLabel->getPosition(a1->m_cameraEasingLabel); cocos2d::CCPoint::CCPoint(&v88, 100.0, 0.0); cocos2d::CCPoint::operator+(&v90, v68, &v88); cocos2d::CCNode::convertToNodeSpace(&v91.origin, v70, &v90.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v65)(v41, &v91); CCMenuItemSpriteExtra::setSizeMult(v41, 2.0); v41->setTag(v41, 1); v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v42->setScale)(v42, 1060320051); LODWORD(v88.x) = SetupCameraRotatePopup::onEasing; v88.y = 0.0; v43 = CCMenuItemSpriteExtra::create( v42, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetupCameraRotatePopup::onEasing, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v43); v66 = (cocos2d::CCPoint *)v43->setPosition; v69 = a1->m_buttonMenu; v44 = a1->m_cameraEasingLabel->getPosition(a1->m_cameraEasingLabel); cocos2d::CCPoint::CCPoint(&v79, -100.0, 0.0); cocos2d::CCPoint::operator+(&v90, v44, &v79); cocos2d::CCNode::convertToNodeSpace(&v91.origin, v69, &v90.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v66)(v43, &v91); CCMenuItemSpriteExtra::setSizeMult(v43, 2.0); v43->setTag(v43, 0); v77 = 0; v76 = SetupCameraRotatePopup::sliderDegreesChanged; cocos2d::CCPoint::CCPoint(&v91.origin, v74.x + 180.0, v74.y); cocos2d::CCPoint::operator=((PlayerObject *)&v74, COERCE_FLOAT(&v91), v45, v46); v47 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v47->setScale)(v47, 1060320051); v47->setPosition(v47, &v74); v48 = v47->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v91.origin, 1.0, 0.5); v48(v47, &v91.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v47); cocos2d::CCRect::CCRect(&v90, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect(&v91, &v90); v49 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02_small.png", (const char *)&v91, v93); ((void (__fastcall *)(cocos2d::CCNode *, int))v49->__vftable[1].~CCNode_0)(v49, 100); cocos2d::CCSize::CCSize(&v78, 70.0, 30.0); v49->setContentSize(v49, &v78); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v49, -1); v50 = v49->setPosition; cocos2d::CCPoint::CCPoint(&v79, 45.0, 0.0); cocos2d::CCPoint::operator+(&v91, &v74, &v79); v50(v49, &v91.origin); m_degrees = (int)a1->m_degrees; if ( m_degrees == -99999 ) v52 = "Mixed"; else v52 = "Num"; v53 = CCTextInputNode::create(60.0, 40.0, v52, "Thonburi"); ((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v53, 20, a1->m_mainLayer->addChild_0, &dword_18, "bigFont.fnt"); v54 = v53->setPosition; v55 = (int)v49->getPosition(v49); v54(v53, (const cocos2d::CCPoint *)v55); CCTextInputNode::setMaxLabelScale(v53, 0.6); CCTextInputNode::setMaxLabelWidth(v53, 200.0); v53->m_textField->setVisible(v53->m_textField, 0); v53->m_maxLabelLength = 6; sub_776584((int)&v91, "0123456789-."); CCTextInputNode::setAllowedChars((int)v53, (int)&v91); sub_774008(&v91); *(_WORD *)&v72.r = -21896; v72.b = -16; CCTextInputNode::setLabelPlaceholderColor(v53, v72); CCTextInputNode::setLabelPlaceholderScale(v53, 0.5); v53->m_delegate = &a1->TextInputDelegate; v53->m_numberInput = 1; v56 = v53->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_degreesInput = v53; v56->setTag(v53, 0); v57 = (Slider *)Slider::create(a1, (unsigned int)v76, v77, 0.8); Slider::setBarVisibility(v57, 0); a1->m_mainLayer->addChild(a1->m_mainLayer, v57); v58 = v57->setPosition; cocos2d::CCPoint::CCPoint(&v79, 0.0, -32.0); cocos2d::CCPoint::operator+(&v91, &v74, &v79); v58(v57, &v91.origin); if ( m_degrees == -99999 ) { v59 = 0.5; } else { v59 = (float)((float)m_degrees / 720.0) + 0.5; if ( v59 >= 1.0 ) { v59 = 1.0; } else if ( v59 <= 0.0 ) { v59 = 0.0; } } Slider::setValue(v57, v59); a1->m_degreesSlider = v57; SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); SetupCameraRotatePopup::updateDegreesLabel(a1); SetupCameraRotatePopup::updateEasingLabel(a1); a1->m_disableTextDelegate = 0; } return v61; }
GD Web Decomp Icon

GD Web Decomp

Raw Source