// // SetupAdvFollowRetargetPopup::init from 0xa1e5a8 to 0xa1edec (2116 bytes) // // 2 xrefs: // > SetupAdvFollowRetargetPopup::create @ 0xa1efa0 // > @ 0x8bfb0 // // 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 SetupAdvFollowRetargetPopup::init( SetupAdvFollowRetargetPopup *a1, AdvancedFollowEditObject *a2, cocos2d::CCArray *a3) { bool v4; // w26 __int64 v6; // x2 __int64 v7; // x3 __int64 v8; // x4 __int64 v9; // x5 const char *v10; // x6 cocos2d::CCPoint *p_m_textOffset; // x0 cocos2d::CCPoint *v12; // x0 cocos2d::CCPoint *v13; // x0 void *v14; // x0 cocos2d::CCDirector *v15; // x0 float v16; // s3 float v17; // s4 cocos2d::CCPoint *v18; // x0 float v19; // s3 float v20; // s4 cocos2d::CCPoint *v21; // x0 cocos2d::CCPoint *v22; // x0 cocos2d::CCPoint *v23; // x0 cocos2d::CCPoint *v24; // x0 cocos2d::CCPoint *v25; // x19 unsigned int *p_m_caption; // x1 int m_data; // w2 unsigned int *v28; // x1 int v29; // w2 unsigned int *v30; // x1 int v31; // w2 unsigned int *v32; // x1 int v33; // w2 unsigned int *v34; // x1 int v35; // w2 unsigned int *v36; // x1 int v37; // w2 unsigned int *v38; // x1 int v39; // w2 unsigned int *v40; // x1 int v41; // w2 unsigned int *v42; // x1 int v43; // w2 unsigned int *v44; // x21 int v45; // w0 _QWORD v46[2]; // [xsp+30h] [xbp+0h] BYREF float v47; // [xsp+A0h] [xbp+70h] float v48; // [xsp+A4h] [xbp+74h] cocos2d::CCPoint v49; // [xsp+A8h] [xbp+78h] BYREF cocos2d::CCPoint v50; // [xsp+B0h] [xbp+80h] BYREF cocos2d::CCPoint v51; // [xsp+B8h] [xbp+88h] BYREF ButtonSprite *v52; // [xsp+C0h] [xbp+90h] BYREF cocos2d::CCPoint v53; // 0:s0.4,4:s1.4 cocos2d::CCPoint v54; // 0:s0.4,4:s1.4 v4 = SetupTriggerPopup::init(a1, a2, a3, 380.0, 240.0, 1); if ( v4 ) { SetupTriggerPopup::preSetup(a1); sub_D153B8((unsigned int)v46 + 144, "OK"); SetupTriggerPopup::addCloseButton((__int64)a1, &v52, v6, v7, v8, v9, v10); p_m_textOffset = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_caption = (unsigned int *)&v52[-1].m_caption; do m_data = __ldaxr(p_m_caption); while ( __stlxr(m_data - 1, p_m_caption) ); } else { m_data = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = m_data - 1; } if ( m_data <= 0 ) operator delete(p_m_textOffset); } SetupTriggerPopup::createMultiTriggerItemsDefault(a1); sub_D153B8((unsigned int)v46 + 144, "Re-Target AdvFollow Trigger"); SetupTriggerPopup::addTitle((__int64)a1); v12 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v28 = (unsigned int *)&v52[-1].m_caption; do v29 = __ldaxr(v28); while ( __stlxr(v29 - 1, v28) ); } else { v29 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v29 - 1; } if ( v29 <= 0 ) operator delete(v12); } sub_D153B8((int)&v51, "Help"); sub_D153B8( (int)&v52, "Lets you change the target of an active Advanced Follow trigger.\n" "Target GID is the objects that follow Follow GID.\n" "You can also follow the player using P1 and P2 or the center of the screen using C.\n" "View the editor guide for more details. "); SetupTriggerPopup::addHelpButton((__int64)a1, 1.0); v13 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v30 = (unsigned int *)&v52[-1].m_caption; do v31 = __ldaxr(v30); while ( __stlxr(v31 - 1, v30) ); } else { v31 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v31 - 1; } if ( v31 <= 0 ) operator delete(v13); } v14 = (void *)(*(_QWORD *)&v51 - 24LL); if ( (__int64 *)(*(_QWORD *)&v51 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v38 = (unsigned int *)(*(_QWORD *)&v51 - 8LL); do v39 = __ldaxr(v38); while ( __stlxr(v39 - 1, v38) ); } else { v39 = *(_DWORD *)(*(_QWORD *)&v51 - 8LL); *(_DWORD *)(*(_QWORD *)&v51 - 8LL) = v39 - 1; } if ( v39 <= 0 ) operator delete(v14); } v15 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v15); cocos2d::CCPoint::CCPoint(&v49, v47 * 0.5, (float)(v48 * 0.5) + 30.0); sub_D153B8((int)&v52, "Target GID:"); cocos2d::CCPoint::CCPoint(&v50, -88.0, 0.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); v53.y = 0.0; v53.x = 0.8; SetupTriggerPopup::createValueControlAdvanced( a1, 0x33u, v53, 1.0, v16, v17, (std::string)&v52, &v51, Float, Int, 6, 1u, 0, 0, 0, 2, 0); v18 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v34 = (unsigned int *)&v52[-1].m_caption; do v35 = __ldaxr(v34); while ( __stlxr(v35 - 1, v34) ); } else { v35 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v35 - 1; } if ( v35 <= 0 ) operator delete(v18); } sub_D153B8((int)&v52, "Follow GID:"); cocos2d::CCPoint::CCPoint(&v50, 88.0, 0.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); v54.x = 0.8; v54.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x47u, v54, 1.0, v19, v20, (std::string)&v52, &v51, Float, Int, 6, 1u, 0, 0, 0, 2, 0); v21 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v42 = (unsigned int *)&v52[-1].m_caption; do v43 = __ldaxr(v42); while ( __stlxr(v43 - 1, v42) ); } else { v43 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v43 - 1; } if ( v43 <= 0 ) operator delete(v21); } sub_D153B8((int)&v52, "P1"); cocos2d::CCPoint::CCPoint(&v50, 18.0, -56.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); SetupTriggerPopup::createToggleValueControl(a1, 138, 1.0, (__int64)&v52, &v51, 0, 0, 0); v22 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v32 = (unsigned int *)&v52[-1].m_caption; do v33 = __ldaxr(v32); while ( __stlxr(v33 - 1, v32) ); } else { v33 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v33 - 1; } if ( v33 <= 0 ) operator delete(v22); } sub_D153B8((int)&v52, "P2"); cocos2d::CCPoint::CCPoint(&v50, 78.0, -56.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); SetupTriggerPopup::createToggleValueControl(a1, 200, 1.0, (__int64)&v52, &v51, 0, 0, 0); v23 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v40 = (unsigned int *)&v52[-1].m_caption; do v41 = __ldaxr(v40); while ( __stlxr(v41 - 1, v40) ); } else { v41 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v41 - 1; } if ( v41 <= 0 ) operator delete(v23); } sub_D153B8((int)&v52, "C"); cocos2d::CCPoint::CCPoint(&v50, 138.0, -56.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); SetupTriggerPopup::createToggleValueControl(a1, 201, 1.0, (__int64)&v52, &v51, 0, 0, 0); v24 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v36 = (unsigned int *)&v52[-1].m_caption; do v37 = __ldaxr(v36); while ( __stlxr(v37 - 1, v36) ); } else { v37 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v37 - 1; } if ( v37 <= 0 ) operator delete(v24); } sub_D153B8((int)&v52, "Target\nControl ID"); cocos2d::CCPoint::CCPoint(&v50, -120.0, -56.0); cocos2d::CCPoint::operator+(&v51, &v49, &v50); SetupTriggerPopup::createToggleValueControl(a1, 535, 1.0, (__int64)&v52, &v51, 0, 2, 0); v25 = &v52[-1].m_textOffset; if ( &v52[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v44 = (unsigned int *)&v52[-1].m_caption; do v45 = __ldaxr(v44); while ( __stlxr(v45 - 1, v44) ); } else { v45 = (int)v52[-1].m_caption.m_data.m_data; LODWORD(v52[-1].m_caption.m_data.m_data) = v45 - 1; } if ( v45 <= 0 ) operator delete(v25); } SetupTriggerPopup::postSetup(a1); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source