// // SetupOpacityPopup::init from 0x14042a5e0 to 0x14042b3d9 (3577 bytes) // // 2 xrefs: // > SetupOpacityPopup::create @ 0x14042a593 // > @ 0x1406d9944 // // 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 // // Hidden C++ exception states: #wind=2 bool SetupOpacityPopup::init(SetupOpacityPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { bool result; // al __int64 v5; // rcx cocos2d::CCDirector *v6; // rax struct cocos2d::CCLabelBMFont *v7; // rdi cocos2d::CCLabelBMFont_vtbl *v8; // rbx const cocos2d::CCPoint *v9; // rax ButtonSprite *v10; // rbx CCMenuItemSpriteExtra *v11; // rax char *v12; // rdi __int64 v13; // rbx struct cocos2d::CCPoint v14; // rax float v15; // xmm0_4 struct cocos2d::CCLabelBMFont *v16; // rbx float v17; // xmm0_4 struct cocos2d::CCRect *v18; // rax struct cocos2d::extension::CCScale9Sprite *v19; // rdi __int64 v20; // rdx const char *v21; // r14 const char *v22; // r9 CCTextInputNode *v23; // rax CCTextInputNode *m_groupIDInput; // rcx CCTextInputNode *v25; // rcx std::string *p_m_allowedChars; // rcx CCTextInputNode *v27; // rcx CCTextInputNode *v28; // rcx struct cocos2d::CCSprite *v29; // rbx cocos2d::CCNode *v30; // rbx float v31; // xmm0_4 struct cocos2d::CCSprite *v32; // rbx cocos2d::CCNode *v33; // rbx float v34; // xmm0_4 double v35; // xmm0_8 struct cocos2d::CCLabelBMFont *v36; // rdi float v37; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v38; // rbx const cocos2d::CCPoint *v39; // rax struct cocos2d::CCRect *v40; // rax struct cocos2d::extension::CCScale9Sprite *v41; // rdi __int64 v42; // rdx float v43; // xmm0_4 const char *v44; // r9 CCTextInputNode *v45; // rax CCTextInputNode_vtbl *v46; // rbx __int64 v47; // rax CCTextInputNode *m_fadeTimeInput; // rcx CCTextInputNode *v49; // rcx std::string *v50; // rcx CCTextInputNode *v51; // rcx CCTextInputNode *v52; // rcx const char *v53; // r8 Slider *v54; // rax float v55; // xmm0_4 float v56; // xmm1_4 SliderThumb *m_thumb; // rcx cocos2d::CCLabelBMFont *v58; // rax float v59; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v60; // rbx const cocos2d::CCPoint *v61; // rax const char *v62; // r8 Slider *v63; // rax float v64; // xmm0_4 const cocos2d::CCPoint *v65; // rax SliderThumb *v66; // rcx Slider *m_opacitySlider; // rdi float Value; // xmm0_4 float m_width; // xmm3_4 cocos2d::CCSprite_vtbl *v70; // rbx const cocos2d::CCRect *v71; // rax int v72; // [rsp+28h] [rbp-E0h] int v73; // [rsp+28h] [rbp-E0h] float v74; // [rsp+58h] [rbp-B0h] cocos2d::CCPoint v75; // [rsp+60h] [rbp-A8h] BYREF char v76[8]; // [rsp+68h] [rbp-A0h] BYREF cocos2d::CCRect v77; // [rsp+70h] [rbp-98h] BYREF _DWORD v78[4]; // [rsp+80h] [rbp-88h] BYREF __int64 v79; // [rsp+90h] [rbp-78h] __int64 v80; // [rsp+98h] [rbp-70h] struct cocos2d::CCPoint v81; // [rsp+A0h] [rbp-68h] BYREF _QWORD Src[4]; // [rsp+A8h] [rbp-60h] BYREF cocos2d::CCRect v83; // [rsp+C8h] [rbp-40h] BYREF __int64 v84; // [rsp+D8h] [rbp-30h] __int64 v85; // [rsp+E0h] [rbp-28h] cocos2d::CCSize v86; // [rsp+E8h] [rbp-20h] BYREF cocos2d::CCSize v87; // [rsp+F0h] [rbp-18h] BYREF __int128 v88; // [rsp+F8h] [rbp-10h] BYREF __int64 v89; // [rsp+108h] [rbp+0h] __int64 v90; // [rsp+110h] [rbp+8h] cocos2d::CCRect v91; // [rsp+118h] [rbp+10h] BYREF cocos2d::CCRect v92[9]; // [rsp+128h] [rbp+20h] BYREF ButtonSprite *v93; // [rsp+200h] [rbp+F8h] BYREF result = SetupTriggerPopup::init(a1, a2, a3, 360.0, 290.0, 1); if ( result ) { a1->determineStartValues(a1); v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5); cocos2d::CCDirector::getWinSize(v6); v7 = cocos2d::CCLabelBMFont::create("Setup Opacity Effect", "goldFont.fnt"); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v7); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v7->setScale_0)(v7); v8 = v7->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(a1->m_height * 0.5, v74 * 0.5); v8->setPosition_0(v7, v9); v93 = (ButtonSprite *)operator new(0x2C0u); v10 = ButtonSprite::ButtonSprite(v93); if ( v10 ) { if ( ButtonSprite::init_1(v10, "OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0) ) { cocos2d::CCObject::autorelease(v10); } else { ((void (__fastcall *)(ButtonSprite *, __int64))v10->~ButtonSprite)(v10, 1); v10 = nullptr; } } v11 = CCMenuItemSpriteExtra::create(v10, nullptr, a1, (cocos2d::SEL_MenuHandler *)sub_14009BEF0); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v11); v93 = (ButtonSprite *)&v83; v83 = 0; v84 = 0; v85 = 15; v83.origin = (cocos2d::CCPoint)sub_14003AA10(0x90u); v84 = 129; v85 = 143; strcpy( *(char **)&v83.origin, "Changes the opacity of a group. If any objects in the group have a color channel with opacity, the values are multiplied."); v88 = 0; v89 = 4; v90 = 15; strcpy((char *)&v88, "Help"); v12 = InfoAlertButton::create((__int64)&v88, (__int64)&v83); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, (cocos2d::CCNode *)v12); v13 = *(_QWORD *)v12; cocos2d::CCPoint::CCPoint(a1->m_width * 0.5, (float)((float)(v74 * 0.5) - (float)(a1->m_width * 0.5)) + 18.0); v14 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v77.origin); v15 = (*(float (__fastcall **)(char *, struct cocos2d::CCPoint))(v13 + 184))(v12, v14); cocos2d::CCPoint::CCPoint(v15, v74 * 0.5); v16 = cocos2d::CCLabelBMFont::create((const char *)&qword_1405DA090, "goldFont.fnt"); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v16); v17 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v16->setScale_0)(v16); cocos2d::CCPoint::CCPoint(v17, 0.0); cocos2d::CCPoint::operator+(&v75, &v93); v16->setPosition_0(v16, (const cocos2d::CCPoint *)&v93); cocos2d::CCRect::CCRect(&v91, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect(&v77, &v91); v19 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v18); LOBYTE(v20) = 100; v19->setOpacity(&v19->cocos2d::CCRGBAProtocol, v20); LOWORD(v93) = 0; BYTE2(v93) = 0; v19->setColor(&v19->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v93); cocos2d::CCSize::CCSize(&v86, 50.0, 30.0); v19->setContentSize(v19, &v86); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v19, -1); v19->setPosition_0(v19, &v75); v21 = "Num"; v23 = CCTextInputNode::create(50.0, 40.0, "Num", v22, v72, (const char *)&qword_14052A4D8); a1->m_groupIDInput = v23; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v23, 20); a1->m_groupIDInput->setPosition_0(a1->m_groupIDInput, &v75); m_groupIDInput = a1->m_groupIDInput; m_groupIDInput->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(m_groupIDInput); v25 = a1->m_groupIDInput; v25->m_maxLabelWidth = 200.0; CCTextInputNode::refreshLabel(v25); a1->m_groupIDInput->m_textField->setVisible(a1->m_groupIDInput->m_textField, 0); a1->m_groupIDInput->m_maxLabelLength = 6; Src[1] = 14648; Src[2] = 10; Src[3] = 15; Src[0] = 0x3736353433323130LL; v93 = (ButtonSprite *)Src; p_m_allowedChars = &a1->m_groupIDInput->m_allowedChars; if ( p_m_allowedChars != (std::string *)Src ) sub_14003CCE0((void **)p_m_allowedChars, Src, 0xAu); sub_14003A830((__int64)Src); LOWORD(v93) = -21896; v27 = a1->m_groupIDInput; *(_WORD *)&v27->m_placeholderColor.r = -21896; v27->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v27); v28 = a1->m_groupIDInput; v28->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v28); a1->m_groupIDInput->m_delegate = &a1->TextInputDelegate; a1->m_groupIDInput->m_numberInput = 1; a1->m_groupIDInput->setTag(a1->m_groupIDInput, 3); cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v81); v29 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v29->setScale_0)(v29); v30 = CCMenuItemSpriteExtra::create( v29, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupOpacityPopup::onTargetIDArrow); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v30); v31 = ((float (__fastcall *)(cocos2d::CCNode *, __int64))v30->setTag)(v30, 1); cocos2d::CCPoint::CCPoint(v31, -50.0); cocos2d::CCPoint::operator+(&v81, &v93); v30->setPosition_0(v30, (const cocos2d::CCPoint *)&v93); v30[1].m_unknown5 = 0x40000000; v32 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v32->setScale_0)(v32); v33 = CCMenuItemSpriteExtra::create( v32, nullptr, a1, (cocos2d::SEL_MenuHandler *)SetupOpacityPopup::onTargetIDArrow); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v33); v34 = ((float (__fastcall *)(cocos2d::CCNode *, __int64))v33->setTag)(v33, 2); cocos2d::CCPoint::CCPoint(v34, 50.0); v35 = cocos2d::CCPoint::operator+(&v81, &v93); v33->setPosition_0(v33, (const cocos2d::CCPoint *)&v93); v33[1].m_unknown5 = 0x40000000; SetupOpacityPopup::updateTextInputLabel(a1); cocos2d::CCPoint::CCPoint(*(float *)&v35, v74 * 0.5); v36 = cocos2d::CCLabelBMFont::create("Fade Time: ", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v36->setScale_0)(v36); v37 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, char *))v36->setPosition_0)(v36, v76); v38 = v36->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v37, 1.0); v38->setAnchorPoint(v36, v39); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v36); cocos2d::CCRect::CCRect(v92, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect(&v83, v92); v41 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v40); LOBYTE(v42) = 100; v41->setOpacity(&v41->cocos2d::CCRGBAProtocol, v42); cocos2d::CCSize::CCSize(&v87, 70.0, 30.0); v41->setContentSize(v41, &v87); v43 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v41, 0xFFFFFFFFLL); cocos2d::CCPoint::CCPoint(v43, 45.0); cocos2d::CCPoint::operator+(v76, &v93); v41->setPosition_0(v41, (const cocos2d::CCPoint *)&v93); if ( a1->m_fadeTime == -99999.0 ) v21 = "Mixed"; v45 = CCTextInputNode::create(50.0, 40.0, v21, v44, v73, (const char *)&qword_14052A4D8); a1->m_fadeTimeInput = v45; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v45, 20); v46 = a1->m_fadeTimeInput->__vftable; v47 = (__int64)v41->getPosition_0(v41); v46->setPosition_0(a1->m_fadeTimeInput, (const cocos2d::CCPoint *)v47); m_fadeTimeInput = a1->m_fadeTimeInput; m_fadeTimeInput->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(m_fadeTimeInput); v49 = a1->m_fadeTimeInput; v49->m_maxLabelWidth = 200.0; CCTextInputNode::refreshLabel(v49); a1->m_fadeTimeInput->m_textField->setVisible(a1->m_fadeTimeInput->m_textField, 0); a1->m_fadeTimeInput->m_maxLabelLength = 4; v78[3] = 0; v79 = 11; v80 = 15; strcpy((char *)v78, "0123456789."); v93 = (ButtonSprite *)v78; v50 = &a1->m_fadeTimeInput->m_allowedChars; if ( v50 != (std::string *)v78 ) sub_14003CCE0((void **)v50, v78, 0xBu); sub_14003A830((__int64)v78); LOWORD(v93) = -21896; v51 = a1->m_fadeTimeInput; *(_WORD *)&v51->m_placeholderColor.r = -21896; v51->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v51); v52 = a1->m_fadeTimeInput; v52->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v52); a1->m_fadeTimeInput->m_numberInput = 1; a1->m_fadeTimeInput->m_delegate = &a1->TextInputDelegate; a1->m_fadeTimeInput->setTag(a1->m_fadeTimeInput, 4); v54 = Slider::create( a1, (cocos2d::SEL_MenuHandler *)SetupOpacityPopup::sliderChanged, v53, "slidergroove.png", "sliderthumb.png", "sliderthumbsel.png", 0.80000001); a1->m_fadeTimeSlider = v54; v55 = ((float (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild_1)(a1->m_mainLayer, v54); cocos2d::CCPoint::CCPoint(v55, 0.0); cocos2d::CCPoint::operator+(v76, &v93); a1->m_fadeTimeSlider->setPosition_0(a1->m_fadeTimeSlider, (const cocos2d::CCPoint *)&v93); v56 = fminf(1.0, a1->m_fadeTime / 10.0); if ( v56 < 0.0 ) v56 = 0.0; Slider::setValue(a1->m_fadeTimeSlider, v56); m_thumb = a1->m_fadeTimeSlider->m_touchLogic->m_thumb; m_thumb->setTag(m_thumb, 1); SetupOpacityPopup::updateDurLabel(a1, 0); v58 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt"); a1->m_opacityLabel = v58; v59 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v58); v60 = a1->m_opacityLabel->__vftable; cocos2d::CCPoint::CCPoint(v59, v74 * 0.5); v60->setPosition_0(a1->m_opacityLabel, v61); ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_opacityLabel->setScale_0)(a1->m_opacityLabel); v63 = Slider::create( a1, (cocos2d::SEL_MenuHandler *)SetupOpacityPopup::sliderChanged, v62, "slidergroove.png", "sliderthumb.png", "sliderthumbsel.png", 1.0); a1->m_opacitySlider = v63; v64 = ((float (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild_1)(a1->m_mainLayer, v63); cocos2d::CCPoint::CCPoint(v64, 0.0); v65 = a1->m_opacityLabel->getPosition_0(a1->m_opacityLabel); cocos2d::CCPoint::operator+(v65, &v93); a1->m_opacitySlider->setPosition_0(a1->m_opacitySlider, (const cocos2d::CCPoint *)&v93); v66 = a1->m_opacitySlider->m_touchLogic->m_thumb; v66->setTag(v66, 2); SetupOpacityPopup::updateOpacityLabel(a1); m_opacitySlider = a1->m_opacitySlider; SliderThumb::setValue(m_opacitySlider->m_touchLogic->m_thumb, a1->m_opacity); Value = SliderThumb::getValue(m_opacitySlider->m_touchLogic->m_thumb); m_width = m_opacitySlider->m_width; if ( (float)(Value * m_width) <= m_width ) m_width = Value * m_width; v70 = m_opacitySlider->m_sliderBar->__vftable; cocos2d::CCRect::CCRect(&v83, 0.0, 0.0, m_width, m_opacitySlider->m_height); v70->setTextureRect_0(m_opacitySlider->m_sliderBar, v71); SetupTriggerPopup::createMultiTriggerItemsDefault(a1); a1->m_disableTextDelegate = 0; return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source