// // SetupAnimationPopup::init from 0x1003d4780 to 0x1003d5263 (2787 bytes) // // 1 xrefs: // > SetupAnimationPopup::create @ 0x1003d473d // // 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 SetupAnimationPopup::init(SetupAnimationPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { bool result; // al cocos2d::CCLabelBMFont *v4; // r15 ButtonSprite *v5; // rax CCMenuItemSpriteExtra *v6; // rax int v7; // r13d char v8; // al std::string::size_type size; // r15 cocos2d::CCString *v10; // rax const char *CString; // rax int v12; // r13d char v13; // al std::string::size_type v14; // r15 cocos2d::CCString *v15; // rax const char *v16; // rax int v17; // r13d char v18; // al std::string::size_type v19; // r15 cocos2d::CCString *v20; // rax const char *v21; // rax const char *data; // rbx size_t v23; // rax size_t v24; // r15 char *v25; // r12 size_t v26; // r13 __int64 v27; // rbx SetupAnimationPopup *v28; // r14 const cocos2d::CCPoint *m_buttonMenu; // r15 unsigned int v30; // r12d char v31; // r13 bool v32; // zf double v33; // xmm0_8 void (__fastcall *v34)(SetupAnimationPopup *, cocos2d::CCObject *); // r15 const char *v35; // rdi cocos2d::CCLabelBMFont *v36; // rbx cocos2d::extension::CCScale9Sprite *v37; // rbx CCTextInputNode *v38; // rbx cocos2d::CCSprite *v39; // r12 CCMenuItemSpriteExtra *v40; // r12 cocos2d::CCSprite *v41; // r12 CCMenuItemSpriteExtra *v42; // r15 SetupAnimationPopup *v43; // r14 char v44; // [rsp+0h] [rbp-100h] TextInputDelegate *v45; // [rsp+0h] [rbp-100h] unsigned __int64 v46[2]; // [rsp+8h] [rbp-F8h] BYREF char v47; // [rsp+18h] [rbp-E8h] BYREF char v48[15]; // [rsp+19h] [rbp-E7h] BYREF void *v49; // [rsp+28h] [rbp-D8h] std::string v50; // [rsp+30h] [rbp-D0h] BYREF __m128 v51; // [rsp+48h] [rbp-B8h] BYREF unsigned __int64 v52; // [rsp+58h] [rbp-A8h] BYREF _QWORD __dst[2]; // [rsp+60h] [rbp-A0h] BYREF void *v54; // [rsp+70h] [rbp-90h] double v55; // [rsp+78h] [rbp-88h] BYREF unsigned __int64 v56; // [rsp+80h] [rbp-80h] BYREF std::string v57; // [rsp+88h] [rbp-78h] BYREF unsigned __int64 v58; // [rsp+A0h] [rbp-60h] BYREF float v59; // [rsp+A8h] [rbp-58h] BYREF float v60; // [rsp+ACh] [rbp-54h] SetupAnimationPopup *v61; // [rsp+B0h] [rbp-50h] std::string v62; // [rsp+B8h] [rbp-48h] BYREF bool v63; // [rsp+D7h] [rbp-29h] double v64; // 0:xmm0_8.8 double v65; // 0:xmm0_8.8 cocos2d::CCRect v66; // 0:xmm0_8.8,8:xmm1_8.8 result = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1); if ( !result ) return result; v63 = result; ((void (__fastcall *)(SetupAnimationPopup *))a1->determineStartValues)(a1); cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v64 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v59); v4 = cocos2d::CCLabelBMFont::create_3("Setup Animation", "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, double))a1->m_mainLayer->addChild)( a1->m_mainLayer, v4, v64); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v4->setScale)(v4, 0.69999999); sub_10028CBE0((float *)&v57, v59 * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v60 * 0.5)) + -18.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v4->setPosition)(v4, &v57); v5 = ButtonSprite::create_1("OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0); v6 = CCMenuItemSpriteExtra::create(v5, nullptr, a1, (cocos2d::SEL_MenuHandler)0x529uLL); v61 = a1; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v6); v57.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x90u); v57.__r_.__value_.__r.__words[0] = 145; v57.__r_.__value_.__l.__size_ = 140; strcpy( v57.__r_.__value_.__l.__data_, "Animates certain objects. Can also be used to activate animate on trigger objects.\n" "The Animation ID specifies the animation:"); std::string::append(&v57, "\nBig Beast: "); v7 = 0; do { AnimatedGameObject::animationForID(&v62, v7, 918); v8 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) != 0 ) { size = v62.__r_.__value_.__l.__size_; if ( !v62.__r_.__value_.__l.__size_ ) goto LABEL_11; } else { size = *(_BYTE *)&v62.__r_.__value_.__l.0 >> 1; if ( !(*(_BYTE *)&v62.__r_.__value_.__l.0 >> 1) ) goto LABEL_11; } if ( v7 ) std::string::append(&v57, ", "); v10 = (cocos2d::CCString *)sub_1007AB580("%i: %s", v44); CString = cocos2d::CCString::getCString(v10); std::string::append(&v57, CString); ++v7; v8 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; LABEL_11: if ( v8 ) operator delete(v62.__r_.__value_.__l.__data_); } while ( size ); std::string::append(&v57, "\n\nBat: "); v12 = 0; do { AnimatedGameObject::animationForID(&v62, v12, 1584); v13 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) != 0 ) { v14 = v62.__r_.__value_.__l.__size_; if ( !v62.__r_.__value_.__l.__size_ ) goto LABEL_22; } else { v14 = *(_BYTE *)&v62.__r_.__value_.__l.0 >> 1; if ( !(*(_BYTE *)&v62.__r_.__value_.__l.0 >> 1) ) goto LABEL_22; } if ( v12 ) std::string::append(&v57, ", "); v15 = (cocos2d::CCString *)sub_1007AB580("%i: %s", v44); v16 = cocos2d::CCString::getCString(v15); std::string::append(&v57, v16); ++v12; v13 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; LABEL_22: if ( v13 ) operator delete(v62.__r_.__value_.__l.__data_); } while ( v14 ); std::string::append(&v57, "\n\nSpikeball: "); v17 = 0; do { AnimatedGameObject::animationForID(&v62, v17, 2012); v18 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) != 0 ) { v19 = v62.__r_.__value_.__l.__size_; if ( !v62.__r_.__value_.__l.__size_ ) goto LABEL_33; } else { v19 = *(_BYTE *)&v62.__r_.__value_.__l.0 >> 1; if ( !(*(_BYTE *)&v62.__r_.__value_.__l.0 >> 1) ) goto LABEL_33; } if ( v17 ) std::string::append(&v57, ", "); v20 = (cocos2d::CCString *)sub_1007AB580("%i: %s", v44); v21 = cocos2d::CCString::getCString(v20); std::string::append(&v57, v21); ++v17; v18 = *(_BYTE *)&v62.__r_.__value_.__s.0 & 1; LABEL_33: if ( v18 ) operator delete(v62.__r_.__value_.__l.__data_); } while ( v19 ); v47 = 8; strcpy(v48, "Help"); if ( (*(_BYTE *)&v57.__r_.__value_.__s.0 & 1) != 0 ) data = v57.__r_.__value_.__l.__data_; else data = v57.__r_.__value_.__s.__data_; v23 = strlen(data); if ( v23 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(COERCE_DOUBLE(1061997773)); v24 = v23; if ( v23 >= 0x17 ) { v26 = 26; if ( (v23 | 7) != 0x17 ) v26 = (v23 | 7) + 1; v25 = (char *)operator new(v26); v54 = v25; __dst[0] = v26 | 1; __dst[1] = v24; goto LABEL_45; } LOBYTE(__dst[0]) = 2 * v23; v25 = (char *)__dst + 1; if ( v23 ) LABEL_45: memmove(v25, data, v24); v25[v24] = 0; v27 = InfoAlertButton::create(&v47, __dst, 1.0); v28 = v61; if ( (__dst[0] & 1) != 0 ) operator delete(v54); if ( (v47 & 1) != 0 ) operator delete(v49); ((void (__fastcall *)(cocos2d::CCMenu *, __int64))v28->m_buttonMenu->addChild)(v28->m_buttonMenu, v27); m_buttonMenu = (const cocos2d::CCPoint *)v28->m_buttonMenu; sub_10028CBE0( (float *)v46, (float)((float)(v59 * 0.5) - (float)(v28->m_width * 0.5)) + 18.0, (float)((float)(v28->m_height * 0.5) + (float)(v60 * 0.5)) + -18.0); *(cocos2d::CCPoint *)&v65 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v62, m_buttonMenu); (*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v27 + 184LL))(v27, &v62, v65); v45 = &v61->TextInputDelegate; v30 = 0; v31 = 1; while ( 2 ) { *(_WORD *)&v62.__r_.__value_.__l.0 = 0; sub_10028CC30(&v58); if ( (v31 & 1) == 0 ) { std::string::assign(&v62, "Animation ID"); sub_10028CBE0((float *)v46, v59 * 0.5, (float)(v60 * 0.5) + -25.0); v33 = sub_10028CC90(&v58, (double *)v46); v34 = SetupAnimationPopup::onAnimationIDArrow; v35 = v62.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_57; goto LABEL_56; } std::string::assign(&v62, "Group ID"); sub_10028CBE0((float *)v46, v59 * 0.5, (float)(v60 * 0.5) + 40.0); v33 = sub_10028CC90(&v58, (double *)v46); v34 = SetupAnimationPopup::onTargetIDArrow; v35 = v62.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) != 0 ) LABEL_56: v35 = v62.__r_.__value_.__l.__data_; LABEL_57: v36 = cocos2d::CCLabelBMFont::create_3(v35, "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, double))v61->m_mainLayer->addChild)( v61->m_mainLayer, v36, v33); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v36->setScale)(v36, 0.64999998); sub_10028CBE0(v51.f32, 0.0, 30.0); sub_10028CCE0((double *)v46, &v58, (unsigned __int64 *)&v51); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v36->setPosition)(v36, v46); v66.size = 0; sub_10028CC00((__int64)v46, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); *(double *)&v66.origin = sub_10028D180(&v51, v46); v37 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v66); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v37->setOpacity)(v37, 100); v51.i8[2] = 0; v51.i16[0] = 0; ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __m128 *))v37->setColor)(v37, &v51); sub_10028CBF0(v51.f32, 50.0, 30.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __m128 *))v37->setContentSize)(v37, &v51); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))v61->m_mainLayer->addChild_0)( v61->m_mainLayer, v37, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v37->setPosition)(v37, &v58); v38 = CCTextInputNode::create(50.0, 40.0, "Num", "Thonburi", 24, "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, CCTextInputNode *, __int64))v61->m_mainLayer->addChild_0)( v61->m_mainLayer, v38, 20); ((void (__fastcall *)(CCTextInputNode *, unsigned __int64 *))v38->setPosition)(v38, &v58); CCTextInputNode::setMaxLabelScale(v38, 0.60000002); CCTextInputNode::setMaxLabelWidth(v38, 200.0); ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))v38->m_textField->setVisible)(v38->m_textField, 0); v38->m_maxLabelLength = 6; v50.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)20; strcpy(v50.__r_.__value_.__s.__data_, "0123456789"); CCTextInputNode::setAllowedChars((std::string *)v38, &v50); if ( (*(_BYTE *)&v50.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v50.__r_.__value_.__l.__data_); CCTextInputNode::setLabelPlaceholderColor(v38, (cocos2d::ccColor3B)-1004936); CCTextInputNode::setLabelPlaceholderScale(v38, 0.5); v38->m_delegate = v45; v38->m_numberInput = 1; ((void (__fastcall *)(CCTextInputNode *, _QWORD))v38->setTag)(v38, v30); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v52, (const cocos2d::CCPoint *)v61->m_buttonMenu); v39 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v39->setScale)(v39, 1.1); v40 = CCMenuItemSpriteExtra::create(v39, nullptr, v61, (cocos2d::SEL_MenuHandler)(unsigned __int64)v34); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v61->m_buttonMenu->addChild)( v61->m_buttonMenu, v40); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v40->setTag)(v40, 1); sub_10028CBE0((float *)&v56, -50.0, 0.0); sub_10028CCE0(&v55, &v52, &v56); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *))v40->setPosition)(v40, &v55); CCMenuItemSpriteExtra::setSizeMult(v40, 2.0); v41 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v41->setScale)(v41, 1.1); v42 = CCMenuItemSpriteExtra::create(v41, nullptr, v61, (cocos2d::SEL_MenuHandler)(unsigned __int64)v34); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v61->m_buttonMenu->addChild)( v61->m_buttonMenu, v42); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v42->setTag)(v42, 2); sub_10028CBE0((float *)&v56, 50.0, 0.0); sub_10028CCE0(&v55, &v52, &v56); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *))v42->setPosition)(v42, &v55); CCMenuItemSpriteExtra::setSizeMult(v42, 2.0); v43 = v61; *((_QWORD *)&v61->m_targetIDInput + ((v31 & 1) == 0)) = v38; if ( (*(_BYTE *)&v62.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v62.__r_.__value_.__l.__data_); v30 = 1; v32 = (v31 & 1) == 0; v31 = 0; if ( !v32 ) continue; break; } SetupAnimationPopup::updateTextInputLabel(v43); SetupAnimationPopup::updateAnimationTextInputLabel(v43); SetupTriggerPopup::createMultiTriggerItemsDefault(v43); v43->m_disableTextDelegate = 0; if ( (*(_BYTE *)&v57.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v57.__r_.__value_.__l.__data_); return v63; }
GD Web Decomp Icon

GD Web Decomp

Raw Source