// // SetupAnimationPopup::init from 0x94d358 to 0x94e048 (3312 bytes) // // 2 xrefs: // > SetupAnimationPopup::create @ 0x94e214 // > @ 0x514b0 // // 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 SetupAnimationPopup::init(SetupAnimationPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCDirector *v5; // x0 cocos2d::CCLabelBMFont *v6; // x22 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 const char *v8; // x6 cocos2d::CCNode *v9; // x0 CCMenuItemSpriteExtra *v10; // x0 unsigned int v11; // w22 cocos2d::CCPoint origin; // x2 __int64 *v13; // x0 cocos2d::CCString *v14; // x0 size_t v15; // x0 int v16; // w28 unsigned int v17; // w22 cocos2d::CCPoint v18; // x2 __int64 *v19; // x0 cocos2d::CCString *v20; // x0 size_t v21; // x0 int v22; // w28 unsigned int v23; // w22 cocos2d::CCPoint v24; // x2 __int64 *v25; // x0 cocos2d::CCString *v26; // x0 size_t v27; // x0 int v28; // w28 cocos2d::CCNode *v29; // x22 void *v30; // x0 void *v31; // x0 cocos2d::CCMenu *m_buttonMenu; // x26 void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 float v34; // s0 float v35; // s1 void (*v36)(SetupAnimationPopup *, cocos2d::CCObject *); // x26 cocos2d::CCLabelBMFont *v37; // x22 cocos2d::CCNode *v38; // x22 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 CCTextInputNode *v40; // x22 void *v41; // x0 CCTextInputNode_vtbl *v42; // x1 cocos2d::CCSprite *v43; // x23 CCMenuItemSpriteExtra *v44; // x23 cocos2d::CCSprite *v45; // x23 CCMenuItemSpriteExtra *v46; // x23 void (__fastcall *v47)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v48; // x1 __int64 *v49; // x0 char *v50; // x0 unsigned int *v51; // x1 int v52; // w2 unsigned int *v53; // x2 int v54; // w1 unsigned int *v55; // x2 int v56; // w1 unsigned int *v57; // x2 int v58; // w1 unsigned int *v59; // x1 int v60; // w2 unsigned int *v61; // x1 int v62; // w2 unsigned int *v63; // x1 int v64; // w2 unsigned int *v65; // x1 int v66; // w2 float v67; // s0 float v68; // s1 __int64 v69; // [xsp+0h] [xbp+0h] BYREF void (__fastcall *v70)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+A8h] [xbp+A8h] cocos2d::CCSize *v71; // [xsp+B0h] [xbp+B0h] bool v72; // [xsp+BFh] [xbp+BFh] int v73[2]; // [xsp+C0h] [xbp+C0h] const char *CString; // [xsp+C8h] [xbp+C8h] __int64 v75; // [xsp+D8h] [xbp+D8h] float v76; // [xsp+E0h] [xbp+E0h] float v77; // [xsp+E4h] [xbp+E4h] char *v78; // [xsp+E8h] [xbp+E8h] BYREF __int64 v79; // [xsp+F0h] [xbp+F0h] BYREF cocos2d::CCPoint v80; // [xsp+F8h] [xbp+F8h] BYREF char v81; // [xsp+100h] [xbp+100h] BYREF char v82[8]; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCPoint v83; // [xsp+110h] [xbp+110h] BYREF cocos2d::CCRect v84; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCRect v85; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCPoint v86; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v87; // 0:x2.16 cocos2d::SEL_MenuHandler v88; // 0:x2.16 cocos2d::SEL_MenuHandler v89; // 0:x2.16 cocos2d::CCRect v90; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v72 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1); if ( v72 ) { a1->determineStartValues(a1); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v5); v6 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v6); v6->setScale(v6, 0.7); setPosition = v6->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v76 * 0.5, (float)((float)(a1->m_height * 0.5) + (float)(v77 * 0.5)) - 18.0); setPosition(v6, &v85.origin); v9 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v8, 30.0); v87.adj = 1320; v87.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v10 = CCMenuItemSpriteExtra::create(v9, nullptr, v87); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v10); sub_D153B8( (unsigned int)&v69 + 232, "Animates certain objects. Can also be used to activate animate on trigger objects.\n" "The Animation ID specifies the animation:"); sub_D15FD4(&v78, "\nBig Beast: ", 20); v11 = 0; do { while ( 1 ) { AnimatedGameObject::animationForID((AnimatedGameObject *)v11, 918, (__int64)&v85); origin = v85.origin; v13 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); if ( *(_QWORD *)(*(_QWORD *)&v85.origin - 24LL) ) { if ( v11 ) sub_D15FD4(&v78, ", ", 2); v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i: %s", (const char *)v11); CString = cocos2d::CCString::getCString(v14); v15 = strlen(CString); sub_D15FD4(&v78, CString, v15); origin = v85.origin; ++v11; v16 = 1; v13 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); } else { v16 = 0; } if ( v13 != &qword_124B6B0 ) { if ( &pthread_create ) { v53 = (unsigned int *)(*(_QWORD *)&origin - 8LL); do v54 = __ldaxr(v53); while ( __stlxr(v54 - 1, v53) ); } else { v54 = *(_DWORD *)(*(_QWORD *)&origin - 8LL); *(_DWORD *)(*(_QWORD *)&origin - 8LL) = v54 - 1; } if ( v54 <= 0 ) break; } if ( !v16 ) goto LABEL_10; } operator delete(v13); } while ( v16 ); LABEL_10: sub_D15FD4(&v78, "\n\nBat: ", 15); v17 = 0; do { while ( 1 ) { AnimatedGameObject::animationForID((AnimatedGameObject *)v17, 1584, (__int64)&v85); v18 = v85.origin; v19 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); if ( *(_QWORD *)(*(_QWORD *)&v85.origin - 24LL) ) { if ( v17 ) sub_D15FD4(&v78, ", ", 2); v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i: %s", (const char *)v17); CString = cocos2d::CCString::getCString(v20); v21 = strlen(CString); sub_D15FD4(&v78, CString, v21); v18 = v85.origin; ++v17; v22 = 1; v19 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); } else { v22 = 0; } if ( v19 != &qword_124B6B0 ) { if ( &pthread_create ) { v55 = (unsigned int *)(*(_QWORD *)&v18 - 8LL); do v56 = __ldaxr(v55); while ( __stlxr(v56 - 1, v55) ); } else { v56 = *(_DWORD *)(*(_QWORD *)&v18 - 8LL); *(_DWORD *)(*(_QWORD *)&v18 - 8LL) = v56 - 1; } if ( v56 <= 0 ) break; } if ( !v22 ) goto LABEL_17; } operator delete(v19); } while ( v22 ); LABEL_17: sub_D15FD4(&v78, "\n\nSpikeball: ", 21); v23 = 0; do { while ( 1 ) { AnimatedGameObject::animationForID((AnimatedGameObject *)v23, 2012, (__int64)&v85); v24 = v85.origin; v25 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); if ( *(_QWORD *)(*(_QWORD *)&v85.origin - 24LL) ) { if ( v23 ) sub_D15FD4(&v78, ", ", 2); v26 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i: %s", (const char *)v23); CString = cocos2d::CCString::getCString(v26); v27 = strlen(CString); sub_D15FD4(&v78, CString, v27); v24 = v85.origin; ++v23; v28 = 1; v25 = (__int64 *)(*(_QWORD *)&v85.origin - 24LL); } else { v28 = 0; } if ( v25 != &qword_124B6B0 ) { if ( &pthread_create ) { v57 = (unsigned int *)(*(_QWORD *)&v24 - 8LL); do v58 = __ldaxr(v57); while ( __stlxr(v58 - 1, v57) ); } else { v58 = *(_DWORD *)(*(_QWORD *)&v24 - 8LL); *(_DWORD *)(*(_QWORD *)&v24 - 8LL) = v58 - 1; } if ( v58 <= 0 ) break; } if ( !v28 ) goto LABEL_24; } operator delete(v25); } while ( v28 ); LABEL_24: v71 = (cocos2d::CCSize *)&v81; sub_D153B8((int)&v83, "Help"); sub_D153B8((int)&v84, v78); v29 = (cocos2d::CCNode *)InfoAlertButton::create(1.0); v30 = (void *)(*(_QWORD *)&v84.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v84.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)(*(_QWORD *)&v84.origin - 8LL); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *(_DWORD *)(*(_QWORD *)&v84.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v84.origin - 8LL) = v64 - 1; } if ( v64 <= 0 ) operator delete(v30); } v31 = (void *)(*(_QWORD *)&v83 - 24LL); if ( (__int64 *)(*(_QWORD *)&v83 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)(*(_QWORD *)&v83 - 8LL); do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = *(_DWORD *)(*(_QWORD *)&v83 - 8LL); *(_DWORD *)(*(_QWORD *)&v83 - 8LL) = v66 - 1; } if ( v66 <= 0 ) operator delete(v31); } a1->m_buttonMenu->addChild(a1->m_buttonMenu, v29); m_buttonMenu = a1->m_buttonMenu; v33 = v29->setPosition; cocos2d::CCPoint::CCPoint( &v84.origin, 18.0 - (float)((float)(a1->m_width * 0.5) - (float)(v76 * 0.5)), (float)((float)(a1->m_height * 0.5) + (float)(v77 * 0.5)) - 18.0); v86 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v84.origin); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *, float, float))v33)(v29, &v85, v86.x, v86.y); LODWORD(CString) = 0; *(_QWORD *)v73 = &v79; while ( 1 ) { sub_D153B8(v73[0], &byte_F288A0); cocos2d::CCPoint::CCPoint(&v80); if ( (_DWORD)CString ) { sub_D1798C(*(_QWORD *)v73, "Animation ID", 12); cocos2d::CCPoint::CCPoint(&v85.origin, v76 * 0.5, (float)(v77 * 0.5) + -25.0); cocos2d::CCPoint::operator=(&v80, v34, v35); v36 = SetupAnimationPopup::onAnimationIDArrow; } else { sub_D1798C(*(_QWORD *)v73, "Group ID", 8); cocos2d::CCPoint::CCPoint(&v85.origin, v76 * 0.5, (float)(v77 * 0.5) + 40.0); cocos2d::CCPoint::operator=(&v80, v67, v68); v36 = SetupAnimationPopup::onTargetIDArrow; } v37 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v37); v37->setScale(v37, 0.65); v70 = v37->setPosition; cocos2d::CCPoint::CCPoint(&v84.origin, 0.0, 30.0); cocos2d::CCPoint::operator+(&v85, &v80, &v84); v70(v37, &v85.origin); cocos2d::CCRect::CCRect(&v84, 0.0, 0.0, 40.0, 40.0); cocos2d::CCRect::CCRect(&v85, &v84); v38 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_small.png", (const char *)&v85, v90); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v38->__vftable[1].~CCNode_0)(v38, 100); getTag = v38->__vftable[1].getTag; LOWORD(v85.origin.x) = 0; BYTE2(v85.origin.x) = 0; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v38, &v85); cocos2d::CCSize::CCSize(v71, 50.0, 30.0); v38->setContentSize(v38, v71); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v38, -1); v38->setPosition(v38, &v80); v40 = CCTextInputNode::create(50.0, 40.0, "Num", "Thonburi"); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v40, 20); v40->setPosition(v40, &v80); CCTextInputNode::setMaxLabelScale(v40, 0.6); CCTextInputNode::setMaxLabelWidth(v40, 200.0); v40->m_textField->setVisible(v40->m_textField, 0); v40->m_maxLabelLength = 6; sub_D153B8((int)&v85, "0123456789"); CCTextInputNode::setAllowedChars((__int64)v40, (__int64)&v85); v41 = (void *)(*(_QWORD *)&v85.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v85.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v61 = (unsigned int *)(*(_QWORD *)&v85.origin - 8LL); do v62 = __ldaxr(v61); while ( __stlxr(v62 - 1, v61) ); } else { v62 = *(_DWORD *)(*(_QWORD *)&v85.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v85.origin - 8LL) = v62 - 1; } if ( v62 <= 0 ) operator delete(v41); } LOBYTE(v75) = 120; *(_WORD *)((char *)&v75 + 1) = -3926; CCTextInputNode::setLabelPlaceholderColor(v40, (cocos2d::ccColor3B)v75); CCTextInputNode::setLabelPlaceholderScale(v40, 0.5); v42 = v40->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v40->m_delegate = &a1->TextInputDelegate; v40->m_numberInput = 1; v42->setTag(v40, (int)CString); cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v80); v43 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); v43->setScale(v43, 1.1); v88.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v88.adj = (size_t)v36; v44 = CCMenuItemSpriteExtra::create(v43, nullptr, v88); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v44); v44->setTag(v44, 1); v70 = v44->setPosition; cocos2d::CCPoint::CCPoint(&v83, -50.0, 0.0); cocos2d::CCPoint::operator+(&v85, v82, &v83); v70(v44, &v85.origin); CCMenuItemSpriteExtra::setSizeMult(v44, 2.0); v45 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png"); v45->setScale(v45, 1.1); v89.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v89.adj = (size_t)v36; v46 = CCMenuItemSpriteExtra::create(v45, nullptr, v89); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v46); v46->setTag(v46, 2); v47 = v46->setPosition; cocos2d::CCPoint::CCPoint(&v83, 50.0, 0.0); cocos2d::CCPoint::operator+(&v85, v82, &v83); v47(v46, &v85.origin); CCMenuItemSpriteExtra::setSizeMult(v46, 2.0); if ( (_DWORD)CString ) a1->m_animationIDInput = v40; else a1->m_targetIDInput = v40; v48 = **(_QWORD **)v73; v49 = (__int64 *)(**(_QWORD **)v73 - 24LL); if ( v49 != &qword_124B6B0 ) { if ( &pthread_create ) { v59 = (unsigned int *)(v48 - 8); do v60 = __ldaxr(v59); while ( __stlxr(v60 - 1, v59) ); } else { v60 = *(_DWORD *)(v48 - 8); *(_DWORD *)(v48 - 8) = v60 - 1; } if ( v60 <= 0 ) operator delete(v49); } if ( (_DWORD)CString ) break; LODWORD(CString) = 1; } SetupAnimationPopup::updateTextInputLabel(a1); SetupAnimationPopup::updateAnimationTextInputLabel(a1); SetupTriggerPopup::createMultiTriggerItemsDefault(a1); a1->m_disableTextDelegate = 0; v50 = v78 - 24; if ( v78 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v51 = (unsigned int *)(v78 - 8); do v52 = __ldaxr(v51); while ( __stlxr(v52 - 1, v51) ); } else { v52 = *((_DWORD *)v78 - 2); *((_DWORD *)v78 - 2) = v52 - 1; } if ( v52 <= 0 ) operator delete(v50); } } return v72; }
GD Web Decomp Icon

GD Web Decomp

Raw Source