// // GJPFollowCommandLayer::init from 0x14028a800 to 0x14028c0b2 (6322 bytes) // // 2 xrefs: // > GJPFollowCommandLayer::create @ 0x14028a7c1 // > @ 0x1406d1664 // // 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=6 bool GJPFollowCommandLayer::init(GJPFollowCommandLayer *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; // rax CCMenuItemSpriteExtra *v11; // rax cocos2d::CCNode *v12; // rdi cocos2d::CCNode_vtbl *v13; // rbx struct cocos2d::CCPoint v14; // rax float v15; // xmm0_4 struct cocos2d::CCLabelBMFont *v16; // rdi float v17; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v18; // rbx const cocos2d::CCPoint *v19; // rax struct cocos2d::CCRect *v20; // rax struct cocos2d::extension::CCScale9Sprite *v21; // rdi __int64 v22; // rdx size_t v23; // r12 float v24; // xmm0_4 const char *v25; // r9 const char *v26; // r8 CCTextInputNode *v27; // rax CCTextInputNode_vtbl *v28; // rbx __int64 v29; // rax CCTextInputNode *m_moveTimeInput; // rcx CCTextInputNode *v31; // rcx std::string *p_m_allowedChars; // rcx CCTextInputNode *v33; // rcx CCTextInputNode *v34; // rcx const char *v35; // r8 Slider *v36; // rax float v37; // xmm0_4 float v38; // xmm1_4 int v39; // r14d const char *v40; // rbx void (*v41)(GJPFollowCommandLayer *, cocos2d::CCObject *); // r13 float v42; // xmm0_4 struct cocos2d::CCLabelBMFont *v43; // rdi float v44; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v45; // rbx const cocos2d::CCPoint *v46; // rax struct cocos2d::CCRect *v47; // rax struct cocos2d::extension::CCScale9Sprite *v48; // r15 __int64 v49; // rdx float v50; // xmm0_4 const char *v51; // r9 float m_delay; // xmm6_4 const char *v53; // r8 CCTextInputNode *v54; // rdi CCTextInputNode_vtbl *v55; // rbx __int64 v56; // rax TextInputDelegate *v57; // r15 __int64 v58; // rdx const char *v59; // r8 Slider *v60; // rbx float v61; // xmm0_4 float v62; // xmm1_4 __int64 v63; // rax unsigned __int64 v64; // rdi void **v65; // rbx _WORD *v66; // rbx unsigned __int64 v67; // rcx __int64 v68; // r14 void *v69; // rcx int m_targetGroupID; // edi void **v71; // rcx struct cocos2d::CCLabelBMFont *v72; // rbx float v73; // xmm0_4 struct cocos2d::CCRect *v74; // rax struct cocos2d::extension::CCScale9Sprite *v75; // rbx __int64 v76; // rdx const char *v77; // r9 const char *v78; // r8 CCTextInputNode *v79; // rbx struct cocos2d::CCSprite *v80; // rdi CCMenuItemSpriteExtra *v81; // rbx float v82; // xmm0_4 struct cocos2d::CCSprite *v83; // rdi CCMenuItemSpriteExtra *v84; // rbx float v85; // xmm0_4 float v86; // xmm0_4 __int64 v87; // rax struct cocos2d::CCLabelBMFont *v88; // rbx float v89; // xmm0_4 __int64 v90; // rax struct cocos2d::CCRect *v91; // rax struct cocos2d::extension::CCScale9Sprite *v92; // rbx __int64 v93; // rdx __int64 v94; // rax const char *v95; // r9 CCTextInputNode *v96; // rax CCTextInputNode *m_offsetInput; // rcx CCTextInputNode *v98; // rcx std::string *v99; // rcx CCTextInputNode *v100; // rcx CCTextInputNode *v101; // rcx float v102; // xmm0_4 __int64 v103; // rax struct cocos2d::CCLabelBMFont *v104; // rbx float v105; // xmm0_4 __int64 v106; // rax struct cocos2d::CCRect *v107; // rax struct cocos2d::extension::CCScale9Sprite *v108; // rbx __int64 v109; // rdx __int64 v110; // rax const char *v111; // r9 CCTextInputNode *v112; // rax CCTextInputNode *m_maxSpeedInput; // rcx CCTextInputNode *v114; // rcx std::string *v115; // rcx CCTextInputNode *v116; // rcx CCTextInputNode *v117; // rcx char *v118; // rbx char *CString; // rax int m_offset; // ecx float v121; // xmm0_4 cocos2d::CCString *v122; // rax size_t v123; // r8 float m_maxSpeed; // xmm0_4 cocos2d::CCString *v125; // rax int v126; // [rsp+28h] [rbp-E0h] int v127; // [rsp+28h] [rbp-E0h] int v128; // [rsp+28h] [rbp-E0h] int v129; // [rsp+28h] [rbp-E0h] int v130; // [rsp+28h] [rbp-E0h] char *v131; // [rsp+50h] [rbp-B8h] BYREF CCMenuItemSpriteExtra *v132; // [rsp+58h] [rbp-B0h] BYREF float v133; // [rsp+60h] [rbp-A8h] cocos2d::CCPoint v134; // [rsp+68h] [rbp-A0h] BYREF _QWORD v135[3]; // [rsp+70h] [rbp-98h] BYREF __int64 v136; // [rsp+88h] [rbp-80h] __int64 v137; // [rsp+90h] [rbp-78h] cocos2d::CCSize v138; // [rsp+98h] [rbp-70h] BYREF char v139[8]; // [rsp+A0h] [rbp-68h] BYREF char Src[12]; // [rsp+A8h] [rbp-60h] BYREF int v141; // [rsp+B4h] [rbp-54h] __int64 v142; // [rsp+B8h] [rbp-50h] __int64 v143; // [rsp+C0h] [rbp-48h] _DWORD v144[4]; // [rsp+C8h] [rbp-40h] BYREF __int64 v145; // [rsp+D8h] [rbp-30h] __int64 v146; // [rsp+E0h] [rbp-28h] _DWORD v147[4]; // [rsp+E8h] [rbp-20h] BYREF __int64 v148; // [rsp+F8h] [rbp-10h] __int64 v149; // [rsp+100h] [rbp-8h] struct cocos2d::CCPoint v150; // [rsp+108h] [rbp+0h] BYREF struct cocos2d::CCPoint v151; // [rsp+110h] [rbp+8h] BYREF cocos2d::CCRect v152; // [rsp+118h] [rbp+10h] BYREF char v153[14]; // [rsp+128h] [rbp+20h] BYREF __int16 v154; // [rsp+136h] [rbp+2Eh] __int64 v155; // [rsp+138h] [rbp+30h] __int64 v156; // [rsp+140h] [rbp+38h] _QWORD v157[4]; // [rsp+148h] [rbp+40h] BYREF cocos2d::CCRect v158; // [rsp+168h] [rbp+60h] BYREF __int64 v159; // [rsp+178h] [rbp+70h] __int64 v160; // [rsp+180h] [rbp+78h] cocos2d::CCSize v161; // [rsp+188h] [rbp+80h] BYREF cocos2d::CCSize v162[2]; // [rsp+190h] [rbp+88h] BYREF cocos2d::CCRect v163; // [rsp+1B8h] [rbp+B0h] BYREF void *Block[2]; // [rsp+1C8h] [rbp+C0h] BYREF __int64 v165; // [rsp+1D8h] [rbp+D0h] unsigned __int64 v166; // [rsp+1E0h] [rbp+D8h] result = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1); if ( !result ) return result; v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5); cocos2d::CCDirector::getWinSize(v6); v7 = cocos2d::CCLabelBMFont::create("Setup follow player command", (const char *)&qword_14052A4D8); v8 = v7->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(a1->m_height * 0.5, v133 * 0.5); v8->setPosition_0(v7, v9); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v7); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v7->setScale_0)(v7); v10 = ButtonSprite::create_1("OK", 0, 0, 1.0, 0, "goldFont.fnt", "GJ_button_01.png", 0.0); v11 = CCMenuItemSpriteExtra::create(v10, nullptr, a1, (cocos2d::SEL_MenuHandler *)sub_14009BEF0); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v11); v131 = (char *)&v135[1]; *(_OWORD *)&v135[1] = 0; v136 = 0; v137 = 15; v135[1] = sub_14003AA10(0xE0u); v136 = 214; v137 = 223; strcpy( (char *)v135[1], "Make a group of objects follow the player's Y position.\n" "Speed is how fast it snaps to the position. Leaving this at 1.0 makes it instantaneous.\n" "Max Speed limits how fast the movement can be."); v158 = 0; v159 = 4; v160 = 15; strcpy((char *)&v158, "Help"); v12 = (cocos2d::CCNode *)InfoAlertButton::create(&v158, &v135[1]); a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v12); v13 = v12->__vftable; cocos2d::CCPoint::CCPoint(a1->m_width * 0.5, (float)((float)(v133 * 0.5) - (float)(a1->m_width * 0.5)) + 18.0); v14 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v151); ((void (__fastcall *)(cocos2d::CCNode *, struct cocos2d::CCPoint))v13->setPosition_0)(v12, v14); v15 = ((float (__fastcall *)(GJPFollowCommandLayer *))a1->determineStartValues)(a1); cocos2d::CCPoint::CCPoint(v15, v133 * 0.5); v16 = cocos2d::CCLabelBMFont::create("Move Time: ", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v16->setScale_0)(v16); v17 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, char *))v16->setPosition_0)(v16, v139); v18 = v16->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v17, 1.0); v18->setAnchorPoint(v16, v19); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v16); cocos2d::CCRect::CCRect(&v163, 0.0, 0.0, 40.0, 40.0); v20 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v158, &v163); v21 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v20); LOBYTE(v22) = 100; v21->setOpacity(&v21->cocos2d::CCRGBAProtocol, v22); cocos2d::CCSize::CCSize(&v161, 70.0, 30.0); v21->setContentSize(v21, &v161); v23 = -1; v24 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v21, 0xFFFFFFFFLL); cocos2d::CCPoint::CCPoint(v24, 45.0); cocos2d::CCPoint::operator+(v139, v135); v21->setPosition_0(v21, (const cocos2d::CCPoint *)v135); v26 = "Num"; if ( a1->m_moveTime == -99999.0 ) v26 = "Mixed"; v27 = CCTextInputNode::create(50.0, 40.0, v26, v25, v126, (const char *)&qword_14052A4D8); a1->m_moveTimeInput = v27; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v27, 20); v28 = a1->m_moveTimeInput->__vftable; v29 = (__int64)v21->getPosition_0(v21); v28->setPosition_0(a1->m_moveTimeInput, (const cocos2d::CCPoint *)v29); m_moveTimeInput = a1->m_moveTimeInput; m_moveTimeInput->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(m_moveTimeInput); v31 = a1->m_moveTimeInput; v31->m_maxLabelWidth = 200.0; CCTextInputNode::refreshLabel(v31); a1->m_moveTimeInput->m_textField->setVisible(a1->m_moveTimeInput->m_textField, 0); a1->m_moveTimeInput->m_maxLabelLength = 4; v141 = 0; v142 = 11; v143 = 15; strcpy(Src, "0123456789."); v131 = Src; p_m_allowedChars = &a1->m_moveTimeInput->m_allowedChars; if ( p_m_allowedChars != (std::string *)Src ) sub_14003CCE0((void **)p_m_allowedChars, Src, 0xBu); sub_14003A830((__int64)Src); v33 = a1->m_moveTimeInput; *(_WORD *)&v33->m_placeholderColor.r = -21896; v33->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v33); v34 = a1->m_moveTimeInput; v34->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v34); a1->m_moveTimeInput->m_numberInput = 1; a1->m_moveTimeInput->m_delegate = &a1->TextInputDelegate; a1->m_moveTimeInput->setTag(a1->m_moveTimeInput, 3); v36 = Slider::create( a1, (cocos2d::SEL_MenuHandler *)GJFollowCommandLayer::sliderChanged, v35, "slidergroove.png", "sliderthumb.png", "sliderthumbsel.png", 0.80000001); a1->m_moveTimeSlider = v36; v36->m_sliderBar->setVisible(v36->m_sliderBar, 0); v37 = ((float (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, a1->m_moveTimeSlider); cocos2d::CCPoint::CCPoint(v37, 0.0); cocos2d::CCPoint::operator+(v139, v135); a1->m_moveTimeSlider->setPosition_0(a1->m_moveTimeSlider, (const cocos2d::CCPoint *)v135); v38 = fminf(1.0, a1->m_moveTime / 10.0); if ( v38 < 0.0 ) v38 = 0.0; Slider::setValue(a1->m_moveTimeSlider, v38); GJFollowCommandLayer::updateDurLabel((__int64)a1, 0); v39 = 0; v162[1] = (cocos2d::CCSize)v153; do { while ( 1 ) { if ( v39 ) { v40 = "Delay:"; v41 = GJPFollowCommandLayer::sliderYModChanged; v42 = 105.0; } else { v40 = "Speed:"; v41 = GJPFollowCommandLayer::sliderXModChanged; v42 = -105.0; } cocos2d::CCPoint::CCPoint(v42, (float)(v133 * 0.5) + v42); v43 = cocos2d::CCLabelBMFont::create(v40, "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v43->setScale_0)(v43); v44 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, _QWORD *))v43->setPosition_0)(v43, v135); v45 = v43->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v44, 1.0); v45->setAnchorPoint(v43, v46); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v43); cocos2d::CCRect::CCRect(&v158, 0.0, 0.0, 40.0, 40.0); v47 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], &v158); v48 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v47); LOBYTE(v49) = 100; v48->setOpacity(&v48->cocos2d::CCRGBAProtocol, v49); cocos2d::CCSize::CCSize(v162, 70.0, 30.0); v48->setContentSize(v48, v162); v50 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v48, 0xFFFFFFFFLL); cocos2d::CCPoint::CCPoint(v50, 45.0); cocos2d::CCPoint::operator+(v135, &v151); v48->setPosition_0(v48, &v151); if ( v39 ) m_delay = a1->m_delay; else m_delay = a1->m_speed; v53 = "Num"; if ( m_delay == -99999.0 ) v53 = "Mixed"; v54 = CCTextInputNode::create(60.0, 40.0, v53, v51, v127, (const char *)&qword_14052A4D8); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v54, 20); v55 = v54->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v56 = (__int64)v48->getPosition_0(v48); v55->setPosition_0(v54, (const cocos2d::CCPoint *)v56); v54->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(v54); v54->m_maxLabelWidth = 200.0; CCTextInputNode::refreshLabel(v54); v54->m_textField->setVisible(v54->m_textField, 0); v54->m_maxLabelLength = 5; v155 = 12; v156 = 15; strcpy(v153, "0123456789.-"); v153[13] = 0; v154 = 0; if ( &v54->m_allowedChars != (std::string *)v153 ) sub_14003CCE0((void **)&v54->m_allowedChars, v153, 0xCu); sub_14003A830((__int64)v153); *(_WORD *)&v54->m_placeholderColor.r = -21896; v54->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v54); v54->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v54); v57 = &a1->TextInputDelegate; v54->m_delegate = &a1->TextInputDelegate; v54->m_numberInput = 1; if ( v39 ) { a1->m_delayInput = v54; v58 = 1; } else { a1->m_speedInput = v54; v58 = 0; } v54->setTag(v54, v58); v60 = Slider::create( a1, (cocos2d::SEL_MenuHandler *)v41, v59, "slidergroove.png", "sliderthumb.png", "sliderthumbsel.png", 0.80000001); v60->m_sliderBar->setVisible(v60->m_sliderBar, 0); v61 = ((float (__fastcall *)(cocos2d::CCLayer *, Slider *))a1->m_mainLayer->addChild_1)(a1->m_mainLayer, v60); cocos2d::CCPoint::CCPoint(v61, 0.0); cocos2d::CCPoint::operator+(v135, &v131); v60->setPosition_0(v60, (const cocos2d::CCPoint *)&v131); v62 = 0.5; if ( m_delay != -99999.0 ) v62 = m_delay; Slider::setValue(v60, v62); if ( v39 ) break; a1->m_speedSlider = v60; v39 = 1; } a1->m_delaySlider = v60; ++v39; } while ( v39 < 2 ); SetupTriggerPopup::createMultiTriggerItemsDefaultVertical(a1); cocos2d::CCPoint::CCPoint(&v134); *(_OWORD *)Block = 0; v165 = 0; v166 = 15; LOBYTE(Block[0]) = 0; cocos2d::CCPoint::CCPoint(0.0, (float)(v133 * 0.5) + 170.0); cocos2d::CCPoint::operator=(&v134, v63); v64 = v166; if ( v166 < 0xF ) { v67 = v166 >> 1; v68 = 0x7FFFFFFFFFFFFFFFLL; if ( v166 <= 0x7FFFFFFFFFFFFFFFLL - (v166 >> 1) ) { v68 = 15; if ( v166 + v67 > 0xF ) v68 = v166 + v67; } v66 = sub_14003AA10(v68 + 1); v165 = 15; v166 = v68; qmemcpy(v66, "Target\nGroup I", 14); v66[7] = (unsigned __int8)aTargetGroupId[14]; if ( v64 > 0xF ) { v69 = Block[0]; if ( v64 + 1 >= 0x1000 ) { v69 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v69 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v69); } Block[0] = v66; } else { v65 = Block; if ( v166 > 0xF ) v65 = (void **)Block[0]; v165 = 15; memmove(v65, "Target\nGroup ID", 0xFu); *((_BYTE *)v65 + 15) = 0; v66 = Block[0]; } m_targetGroupID = a1->m_targetGroupID; v71 = Block; if ( v166 > 0xF ) v71 = (void **)v66; v72 = cocos2d::CCLabelBMFont::create((const char *)v71, "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v72->setScale_0)(v72); v73 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v72); cocos2d::CCPoint::CCPoint(v73, 0.0); cocos2d::CCPoint::operator+(&v134, &v131); v72->setPosition_0(v72, (const cocos2d::CCPoint *)&v131); cocos2d::CCRect::CCRect(&v152, 0.0, 0.0, 40.0, 40.0); v74 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], &v152); v75 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v74); LOBYTE(v76) = 100; v75->setOpacity(&v75->cocos2d::CCRGBAProtocol, v76); cocos2d::CCSize::CCSize(&v138, 50.0, 30.0); v75->setContentSize(v75, &v138); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v75, -1); v75->setPosition_0(v75, &v134); v78 = "Mixed"; if ( m_targetGroupID != -99999 ) v78 = "Num"; v79 = CCTextInputNode::create(50.0, 40.0, v78, v77, v128, (const char *)&qword_14052A4D8); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v79, 20); v79->setPosition_0(v79, &v134); v79->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(v79); v79->m_maxLabelWidth = 80.0; CCTextInputNode::refreshLabel(v79); v79->m_textField->setVisible(v79->m_textField, 0); v79->m_maxLabelLength = 6; v157[1] = 14648; v157[2] = 10; v157[3] = 15; v157[0] = 0x3736353433323130LL; v132 = (CCMenuItemSpriteExtra *)v157; if ( &v79->m_allowedChars != (std::string *)v157 ) sub_14003CCE0((void **)&v79->m_allowedChars, v157, 0xAu); sub_14003A830((__int64)v157); *(_WORD *)&v79->m_placeholderColor.r = -21896; v79->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v79); v79->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v79); v79->m_delegate = v57; v79->m_numberInput = 1; v79->setTag(v79, 2); a1->m_targetIDInput = v79; cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v150); v80 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v80->setScale_0)(v80); ((void (__fastcall *)(struct cocos2d::CCSprite *))v80->setRotation)(v80); v132 = (CCMenuItemSpriteExtra *)operator new(0x208u); v81 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v132); if ( v81 ) { if ( CCMenuItemSpriteExtra::init( v81, v80, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJPFollowCommandLayer::onUpdateGroupID) ) { cocos2d::CCObject::autorelease(v81); goto LABEL_51; } ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v81->~CCMenuItemSpriteExtra)(v81, 1); } v81 = nullptr; LABEL_51: a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v81); v82 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v81->setTag)(v81, 1); cocos2d::CCPoint::CCPoint(v82, 0.0); cocos2d::CCPoint::operator+(&v150, &v131); v81->setPosition_0(v81, (const cocos2d::CCPoint *)&v131); HIDWORD(v81->m_pfnSelector.adj) = 0x40000000; v83 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v83->setScale_0)(v83); ((void (__fastcall *)(struct cocos2d::CCSprite *))v83->setRotation)(v83); v132 = (CCMenuItemSpriteExtra *)operator new(0x208u); v84 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v132); if ( !v84 ) { LABEL_55: v84 = nullptr; goto LABEL_56; } if ( !CCMenuItemSpriteExtra::init( v84, v83, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJPFollowCommandLayer::onUpdateGroupID) ) { ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v84->~CCMenuItemSpriteExtra)(v84, 1); goto LABEL_55; } cocos2d::CCObject::autorelease(v84); LABEL_56: a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v84); v85 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v84->setTag)(v84, 2); cocos2d::CCPoint::CCPoint(v85, 0.0); cocos2d::CCPoint::operator+(&v150, &v131); v86 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, char **))v84->setPosition_0)(v84, &v131); HIDWORD(v84->m_pfnSelector.adj) = 0x40000000; cocos2d::CCPoint::CCPoint(v86, (float)(v133 * 0.5) - 100.0); cocos2d::CCPoint::operator=(&v134, v87); v88 = cocos2d::CCLabelBMFont::create("Offset", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v88->setScale_0)(v88); v89 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v88); cocos2d::CCPoint::CCPoint(v89, 0.0); cocos2d::CCPoint::operator+(&v134, &v131); v88->setPosition_0(v88, (const cocos2d::CCPoint *)&v131); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::operator=(&v152, v90); v91 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], &v152); v92 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v91); LOBYTE(v93) = 100; v92->setOpacity(&v92->cocos2d::CCRGBAProtocol, v93); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v132, 50.0, 30.0); cocos2d::CCSize::operator=(&v138, v94); v92->setContentSize(v92, &v138); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v92, -1); v92->setPosition_0(v92, &v134); v96 = CCTextInputNode::create(50.0, 40.0, "Num", v95, v129, (const char *)&qword_14052A4D8); a1->m_offsetInput = v96; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v96, 20); a1->m_offsetInput->setPosition_0(a1->m_offsetInput, &v134); m_offsetInput = a1->m_offsetInput; m_offsetInput->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(m_offsetInput); v98 = a1->m_offsetInput; v98->m_maxLabelWidth = 80.0; CCTextInputNode::refreshLabel(v98); a1->m_offsetInput->m_textField->setVisible(a1->m_offsetInput->m_textField, 0); a1->m_offsetInput->m_maxLabelLength = 6; v144[3] = 0; v145 = 11; v146 = 15; strcpy((char *)v144, "0123456789-"); v132 = (CCMenuItemSpriteExtra *)v144; v99 = &a1->m_offsetInput->m_allowedChars; if ( v99 != (std::string *)v144 ) sub_14003CCE0((void **)v99, v144, 0xBu); sub_14003A830((__int64)v144); v100 = a1->m_offsetInput; *(_WORD *)&v100->m_placeholderColor.r = -21896; v100->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v100); v101 = a1->m_offsetInput; v101->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v101); a1->m_offsetInput->m_delegate = v57; a1->m_offsetInput->m_numberInput = 1; v102 = ((float (__fastcall *)(CCTextInputNode *, __int64))a1->m_offsetInput->setTag)(a1->m_offsetInput, 5); cocos2d::CCPoint::CCPoint(v102, (float)(v133 * 0.5) + 100.0); cocos2d::CCPoint::operator=(&v134, v103); v104 = cocos2d::CCLabelBMFont::create("Max Speed", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v104->setScale_0)(v104); v105 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v104); cocos2d::CCPoint::CCPoint(v105, 0.0); cocos2d::CCPoint::operator+(&v134, &v131); v104->setPosition_0(v104, (const cocos2d::CCPoint *)&v131); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::operator=(&v152, v106); v107 = (struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v135[1], &v152); v108 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v107); LOBYTE(v109) = 100; v108->setOpacity(&v108->cocos2d::CCRGBAProtocol, v109); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v132, 50.0, 30.0); cocos2d::CCSize::operator=(&v138, v110); v108->setContentSize(v108, &v138); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v108, -1); v108->setPosition_0(v108, &v134); v112 = CCTextInputNode::create(50.0, 40.0, "Num", v111, v130, (const char *)&qword_14052A4D8); a1->m_maxSpeedInput = v112; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v112, 20); a1->m_maxSpeedInput->setPosition_0(a1->m_maxSpeedInput, &v134); m_maxSpeedInput = a1->m_maxSpeedInput; m_maxSpeedInput->m_maxLabelScale = 0.60000002; CCTextInputNode::refreshLabel(m_maxSpeedInput); v114 = a1->m_maxSpeedInput; v114->m_maxLabelWidth = 80.0; CCTextInputNode::refreshLabel(v114); a1->m_maxSpeedInput->m_textField->setVisible(a1->m_maxSpeedInput->m_textField, 0); a1->m_maxSpeedInput->m_maxLabelLength = 3; v147[3] = 0; v148 = 11; v149 = 15; strcpy((char *)v147, "0123456789."); v132 = (CCMenuItemSpriteExtra *)v147; v115 = &a1->m_maxSpeedInput->m_allowedChars; if ( v115 != (std::string *)v147 ) sub_14003CCE0((void **)v115, v147, 0xBu); sub_14003A830((__int64)v147); v116 = a1->m_maxSpeedInput; *(_WORD *)&v116->m_placeholderColor.r = -21896; v116->m_placeholderColor.b = -16; CCTextInputNode::refreshLabel(v116); v117 = a1->m_maxSpeedInput; v117->m_placeholderScale = 0.5; CCTextInputNode::refreshLabel(v117); a1->m_maxSpeedInput->m_delegate = v57; a1->m_maxSpeedInput->m_numberInput = 1; a1->m_maxSpeedInput->setTag(a1->m_maxSpeedInput, 6); GJPFollowCommandLayer::updateTextInputLabel(a1); GJPFollowCommandLayer::updateXModLabel(a1); GJPFollowCommandLayer::updateYModLabel(a1); a1->m_disableTextDelegate = 1; v118 = byte_140518980; CString = byte_140518980; m_offset = a1->m_offset; if ( m_offset != -99999 ) { v121 = floorf((float)m_offset / 3.0); v122 = cocos2d::CCString::createWithFormat("%i", (int)v121); CString = (char *)cocos2d::CCString::getCString(v122); } *(_OWORD *)&v135[1] = 0; v136 = 0; v137 = 0; v123 = -1; do ++v123; while ( CString[v123] ); sub_14003A930(&v135[1], CString, v123); CCTextInputNode::setString((__int64)a1->m_offsetInput, &v135[1]); a1->m_disableTextDelegate = 1; m_maxSpeed = a1->m_maxSpeed; if ( m_maxSpeed != -99999.0 ) { v125 = cocos2d::CCString::createWithFormat("%0.1f", m_maxSpeed); v118 = (char *)cocos2d::CCString::getCString(v125); } *(_OWORD *)&v135[1] = 0; v136 = 0; v137 = 0; do ++v23; while ( v118[v23] ); sub_14003A930(&v135[1], v118, v23); CCTextInputNode::setString((__int64)a1->m_maxSpeedInput, &v135[1]); a1->m_disableTextDelegate = 0; sub_14003A830((__int64)Block); return 1; }