// // SetupAdvFollowEditPhysicsPopup::init from 0xa1d344 to 0xa1e360 (4124 bytes) // // 2 xrefs: // > SetupAdvFollowEditPhysicsPopup::create @ 0xa1e544 // > @ 0x79350 // // 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 SetupAdvFollowEditPhysicsPopup::init( SetupAdvFollowEditPhysicsPopup *a1, AdvancedFollowEditObject *a2, cocos2d::CCArray *a3) { bool v4; // w27 __int64 v6; // x2 __int64 v7; // x3 __int64 v8; // x4 __int64 v9; // x5 const char *v10; // x6 void *v11; // x0 void *v12; // x0 void *v13; // x0 void *v14; // x0 cocos2d::CCDirector *v15; // x0 float v16; // s3 float v17; // s4 void *v18; // x0 void *v19; // x0 void *v20; // x0 float v21; // s3 float v22; // s4 void *v23; // x0 float v24; // s3 float v25; // s4 void *v26; // x0 float v27; // s3 float v28; // s4 void *v29; // x0 float v30; // s3 float v31; // s4 void *v32; // x0 float v33; // s3 float v34; // s4 void *v35; // x0 float v36; // s3 float v37; // s4 void *v38; // x0 float v39; // s3 float v40; // s4 void *v41; // x0 float v42; // s3 float v43; // s4 void *v44; // x0 float v45; // s3 float v46; // s4 void *v47; // x0 float v48; // s3 float v49; // s4 void *v50; // x0 void *v51; // x0 void *v52; // x19 unsigned int *v53; // x1 int v54; // w2 unsigned int *v55; // x1 int v56; // w2 unsigned int *v57; // x1 int v58; // w2 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 unsigned int *v67; // x1 int v68; // w2 unsigned int *v69; // x1 int v70; // w2 unsigned int *v71; // x1 int v72; // w2 unsigned int *v73; // x1 int v74; // w2 unsigned int *v75; // x1 int v76; // w2 unsigned int *v77; // x1 int v78; // w2 unsigned int *v79; // x1 int v80; // w2 unsigned int *v81; // x1 int v82; // w2 unsigned int *v83; // x1 int v84; // w2 unsigned int *v85; // x1 int v86; // w2 unsigned int *v87; // x1 int v88; // w2 unsigned int *v89; // x21 int v90; // w0 _QWORD v91[2]; // [xsp+30h] [xbp+0h] BYREF float v92; // [xsp+C8h] [xbp+98h] float v93; // [xsp+CCh] [xbp+9Ch] cocos2d::CCPoint v94; // [xsp+D0h] [xbp+A0h] BYREF __int64 v95; // [xsp+D8h] [xbp+A8h] BYREF cocos2d::CCPoint v96; // [xsp+E0h] [xbp+B0h] BYREF cocos2d::CCPoint v97; // [xsp+E8h] [xbp+B8h] BYREF cocos2d::CCPoint v98; // [xsp+F0h] [xbp+C0h] BYREF cocos2d::CCPoint v99; // 0:s0.4,4:s1.4 cocos2d::CCPoint v100; // 0:s0.4,4:s1.4 cocos2d::CCPoint v101; // 0:s0.4,4:s1.4 cocos2d::CCPoint v102; // 0:s0.4,4:s1.4 cocos2d::CCPoint v103; // 0:s0.4,4:s1.4 cocos2d::CCPoint v104; // 0:s0.4,4:s1.4 cocos2d::CCPoint v105; // 0:s0.4,4:s1.4 cocos2d::CCPoint v106; // 0:s0.4,4:s1.4 cocos2d::CCPoint v107; // 0:s0.4,4:s1.4 cocos2d::CCPoint v108; // 0:s0.4,4:s1.4 cocos2d::CCPoint v109; // 0:s0.4,4:s1.4 v4 = SetupTriggerPopup::init(a1, a2, a3, 440.0, 310.0, 1); if ( v4 ) { SetupTriggerPopup::preSetup(a1); sub_D153B8((unsigned int)v91 + 192, "OK"); SetupTriggerPopup::addCloseButton((__int64)a1, (ButtonSprite **)&v98, v6, v7, v8, v9, v10); v11 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v53 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v54 = __ldaxr(v53); while ( __stlxr(v54 - 1, v53) ); } else { v54 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v54 - 1; } if ( v54 <= 0 ) operator delete(v11); } SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); sub_D153B8((unsigned int)v91 + 192, "Edit AdvFollow Object"); SetupTriggerPopup::addTitle((__int64)a1); v12 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v55 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v56 = __ldaxr(v55); while ( __stlxr(v56 - 1, v55) ); } else { v56 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v56 - 1; } if ( v56 <= 0 ) operator delete(v12); } sub_D153B8((int)&v97, "Help"); sub_D153B8( (unsigned int)v91 + 192, "Lets you change the attributes of an active Advanced Follow trigger.\n" "Target GID is the objects that follow.\n" "X and Y Only limit change to one axis.\n" "Mod X and Y modify movement on their axis.\n" "Speed modifies the speed.\n" "Dir modifies the direction.\n" "View the editor guide for more details."); SetupTriggerPopup::addHelpButton((__int64)a1, 1.0); v13 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v59 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v60 = __ldaxr(v59); while ( __stlxr(v60 - 1, v59) ); } else { v60 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v60 - 1; } if ( v60 <= 0 ) operator delete(v13); } v14 = (void *)(*(_QWORD *)&v97 - 24LL); if ( (__int64 *)(*(_QWORD *)&v97 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v57 = (unsigned int *)(*(_QWORD *)&v97 - 8LL); do v58 = __ldaxr(v57); while ( __stlxr(v58 - 1, v57) ); } else { v58 = *(_DWORD *)(*(_QWORD *)&v97 - 8LL); *(_DWORD *)(*(_QWORD *)&v97 - 8LL) = v58 - 1; } if ( v58 <= 0 ) operator delete(v14); } v15 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v15); cocos2d::CCPoint::CCPoint(&v94, v92 * 0.5, (float)(v93 * 0.5) + 110.0); cocos2d::CCPoint::CCPoint(&v98, 0.0, -30.0); cocos2d::CCPoint::operator+(&v95, &v94, &v98); sub_D153B8((unsigned int)v91 + 192, "Target GID:"); cocos2d::CCPoint::CCPoint(&v96, -88.0, -0.0); cocos2d::CCPoint::operator+(&v97, &v95, &v96); v99.y = 0.0; v99.x = 0.8; SetupTriggerPopup::createValueControlAdvanced( a1, 0x33u, v99, 1.0, v16, v17, (std::string)&v98, &v97, Float, Int, 6, 1u, 0, 0, 0, 2, 0); v18 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v75 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v76 = __ldaxr(v75); while ( __stlxr(v76 - 1, v75) ); } else { v76 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v76 - 1; } if ( v76 <= 0 ) operator delete(v18); } sub_D153B8((unsigned int)v91 + 192, "X\nOnly"); cocos2d::CCPoint::CCPoint(&v96, 15.0, -0.0); cocos2d::CCPoint::operator+(&v97, &v95, &v96); SetupTriggerPopup::createToggleValueControl(a1, 306, 1.0, (__int64)&v98, &v97, 0, 0, 0); v19 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v67 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v68 = __ldaxr(v67); while ( __stlxr(v68 - 1, v67) ); } else { v68 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v68 - 1; } if ( v68 <= 0 ) operator delete(v19); } sub_D153B8((unsigned int)v91 + 192, "Y\nOnly"); cocos2d::CCPoint::CCPoint(&v96, 100.0, -0.0); cocos2d::CCPoint::operator+(&v97, &v95, &v96); SetupTriggerPopup::createToggleValueControl(a1, 307, 1.0, (__int64)&v98, &v97, 0, 0, 0); v20 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v83 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v84 = __ldaxr(v83); while ( __stlxr(v84 - 1, v83) ); } else { v84 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v84 - 1; } if ( v84 <= 0 ) operator delete(v20); } sub_D153B8((unsigned int)v91 + 192, "Mod X:"); cocos2d::CCPoint::CCPoint(&v96, -72.0, -70.2); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v100.x = 0.6; v100.y = -1.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x236u, v100, 1.0, v21, v22, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v23 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v64 - 1; } if ( v64 <= 0 ) operator delete(v23); } sub_D153B8((unsigned int)v91 + 192, "+-"); cocos2d::CCPoint::CCPoint(&v96, 72.0, -70.2); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v101.x = 0.6; v101.y = -1.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x237u, v101, 1.0, v24, v25, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v26 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v79 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v80 = __ldaxr(v79); while ( __stlxr(v80 - 1, v79) ); } else { v80 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v80 - 1; } if ( v80 <= 0 ) operator delete(v26); } sub_D153B8((unsigned int)v91 + 192, "Mod Y:"); cocos2d::CCPoint::CCPoint(&v96, -72.0, -93.6); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v102.x = 0.6; v102.y = -1.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x238u, v102, 1.0, v27, v28, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v29 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v71 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v72 = __ldaxr(v71); while ( __stlxr(v72 - 1, v71) ); } else { v72 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v72 - 1; } if ( v72 <= 0 ) operator delete(v29); } sub_D153B8((unsigned int)v91 + 192, "+-"); cocos2d::CCPoint::CCPoint(&v96, 72.0, -93.6); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v103.x = 0.6; v103.y = -1.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x239u, v103, 1.0, v30, v31, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v32 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v87 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v88 = __ldaxr(v87); while ( __stlxr(v88 - 1, v87) ); } else { v88 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v88 - 1; } if ( v88 <= 0 ) operator delete(v32); } sub_D153B8((unsigned int)v91 + 192, "Speed:"); cocos2d::CCPoint::CCPoint(&v96, -72.0, -117.0); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v104.x = 0.6; v104.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x12Cu, v104, 1.0, v33, v34, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v35 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v61 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v62 = __ldaxr(v61); while ( __stlxr(v62 - 1, v61) ); } else { v62 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v62 - 1; } if ( v62 <= 0 ) operator delete(v35); } sub_D153B8((unsigned int)v91 + 192, "+-"); cocos2d::CCPoint::CCPoint(&v96, 72.0, -117.0); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v105.x = 0.6; v105.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x12Du, v105, 1.0, v36, v37, (std::string)&v98, &v97, (InputValueType)0, Float, 6, 0, 1, 0, 1, 2, 0); v38 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v77 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v78 = __ldaxr(v77); while ( __stlxr(v78 - 1, v77) ); } else { v78 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v78 - 1; } if ( v78 <= 0 ) operator delete(v38); } sub_D153B8((unsigned int)v91 + 192, &byte_F288A0); cocos2d::CCPoint::CCPoint(&v96, 202.0, -117.0); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v106.x = 0.6; v106.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x230u, v106, 1.0, v39, v40, (std::string)&v98, &v97, Float, Int, 6, 0, 1, 0, 1, 2, 0); v41 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v69 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v70 = __ldaxr(v69); while ( __stlxr(v70 - 1, v69) ); } else { v70 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v70 - 1; } if ( v70 <= 0 ) operator delete(v41); } sub_D153B8((unsigned int)v91 + 192, "Dir:"); cocos2d::CCPoint::CCPoint(&v96, -72.0, -140.4); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v107.x = 0.6; v107.y = -180.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x233u, v107, 180.0, v42, v43, (std::string)&v98, &v97, (InputValueType)0, Int, 6, 0, 1, 0, 1, 2, 0); v44 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v85 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v86 = __ldaxr(v85); while ( __stlxr(v86 - 1, v85) ); } else { v86 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v86 - 1; } if ( v86 <= 0 ) operator delete(v44); } sub_D153B8((unsigned int)v91 + 192, "+-"); cocos2d::CCPoint::CCPoint(&v96, 72.0, -140.4); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v108.x = 0.6; v108.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x234u, v108, 360.0, v45, v46, (std::string)&v98, &v97, (InputValueType)0, Int, 6, 0, 1, 0, 1, 2, 0); v47 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v66 - 1; } if ( v66 <= 0 ) operator delete(v47); } sub_D153B8((unsigned int)v91 + 192, &byte_F288A0); cocos2d::CCPoint::CCPoint(&v96, 202.0, -140.4); cocos2d::CCPoint::operator+(&v97, &v94, &v96); v109.x = 0.6; v109.y = 0.0; SetupTriggerPopup::createValueControlAdvanced( a1, 0x235u, v109, 1.0, v48, v49, (std::string)&v98, &v97, Float, Int, 6, 0, 1, 0, 1, 2, 0); v50 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v81 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v82 = __ldaxr(v81); while ( __stlxr(v82 - 1, v81) ); } else { v82 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v82 - 1; } if ( v82 <= 0 ) operator delete(v50); } sub_D153B8((unsigned int)v91 + 192, "Target\nControl ID"); cocos2d::CCPoint::CCPoint(&v96, -90.0, -163.8); cocos2d::CCPoint::operator+(&v97, &v94, &v96); SetupTriggerPopup::createToggleValueControl(a1, 535, 1.0, (__int64)&v98, &v97, 0, 2, 0); v51 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v73 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v74 = __ldaxr(v73); while ( __stlxr(v74 - 1, v73) ); } else { v74 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v74 - 1; } if ( v74 <= 0 ) operator delete(v51); } sub_D153B8((unsigned int)v91 + 192, "Redirect\nDir"); cocos2d::CCPoint::CCPoint(&v96, 60.0, -163.8); cocos2d::CCPoint::operator+(&v97, &v94, &v96); SetupTriggerPopup::createToggleValueControl(a1, 570, 1.0, (__int64)&v98, &v97, 0, 2, 0); v52 = (void *)(*(_QWORD *)&v98 - 24LL); if ( (__int64 *)(*(_QWORD *)&v98 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v89 = (unsigned int *)(*(_QWORD *)&v98 - 8LL); do v90 = __ldaxr(v89); while ( __stlxr(v90 - 1, v89) ); } else { v90 = *(_DWORD *)(*(_QWORD *)&v98 - 8LL); *(_DWORD *)(*(_QWORD *)&v98 - 8LL) = v90 - 1; } if ( v90 <= 0 ) operator delete(v52); } SetupTriggerPopup::postSetup(a1); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source