// // SetupPickupTriggerPopup::init from 0x9577dc to 0x958160 (2436 bytes) // // 2 xrefs: // > SetupPickupTriggerPopup::create @ 0x958310 // > @ 0x620a0 // // 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 SetupPickupTriggerPopup::init(SetupPickupTriggerPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { bool v4; // w27 cocos2d::CCDirector *v6; // x0 void *v7; // x0 void *v8; // x0 void *v9; // x0 void *v10; // x0 float v11; // s3 float v12; // s4 void *v13; // x0 void *v14; // x0 int v15; // w28 void *v16; // x0 void *v17; // x0 float v18; // s3 float v19; // s4 void *v20; // x0 float v21; // s2 void *v22; // x0 float v23; // s3 float v24; // s4 void *v25; // x19 unsigned int *v26; // x1 int v27; // 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; // x1 int v45; // w2 unsigned int *v46; // x22 int v47; // w0 int v48; // [xsp+18h] [xbp-18h] __int64 v49; // [xsp+18h] [xbp-18h] __int64 v50; // [xsp+18h] [xbp-18h] char v51; // [xsp+20h] [xbp-10h] __int64 v52; // [xsp+20h] [xbp-10h] __int64 v53; // [xsp+20h] [xbp-10h] _QWORD v54[2]; // [xsp+30h] [xbp+0h] BYREF int v55; // [xsp+BCh] [xbp+8Ch] float v56; // [xsp+D0h] [xbp+A0h] float v57; // [xsp+D4h] [xbp+A4h] cocos2d::CCPoint v58; // [xsp+D8h] [xbp+A8h] BYREF cocos2d::CCPoint v59; // [xsp+E0h] [xbp+B0h] BYREF __int64 v60; // [xsp+E8h] [xbp+B8h] BYREF __int64 v61; // [xsp+F0h] [xbp+C0h] BYREF cocos2d::CCPoint v62; // 0:s0.4,4:s1.4 cocos2d::CCPoint v63; // 0:s0.4,4:s1.4 cocos2d::CCPoint v64; // 0:s0.4,4:s1.4 cocos2d::CCPoint v65; // 0:s0.4,4:s1.4 v4 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 250.0, 1); if ( v4 ) { SetupTriggerPopup::preSetup(a1); v6 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v6); sub_D153B8((unsigned int)v54 + 192, "Pickup Trigger"); SetupTriggerPopup::addTitle(a1, (std::string)&v61); v7 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v26 = (unsigned int *)(v61 - 8); do v27 = __ldaxr(v26); while ( __stlxr(v27 - 1, v26) ); } else { v27 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v27 - 1; } if ( v27 <= 0 ) operator delete(v7); } sub_D153B8((unsigned int)v54 + 192, "OK"); SetupTriggerPopup::addCloseButton(a1, (std::string)&v61); v8 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v28 = (unsigned int *)(v61 - 8); do v29 = __ldaxr(v28); while ( __stlxr(v29 - 1, v28) ); } else { v29 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v29 - 1; } if ( v29 <= 0 ) operator delete(v8); } sub_D153B8((int)&v60, "Help"); sub_D153B8( (unsigned int)v54 + 192, "Changes the value of an Item ID by adding Count to the previous value.\n" "Use Multiply or Divide to modify in another way than addition.\n" "Override specifies the exact value to change to instead of modifying the previous value."); SetupTriggerPopup::addHelpButton(a1, (std::string)&v60, (std::string)&v61, 1.0); v9 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v32 = (unsigned int *)(v61 - 8); do v33 = __ldaxr(v32); while ( __stlxr(v33 - 1, v32) ); } else { v33 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v33 - 1; } if ( v33 <= 0 ) operator delete(v9); } v10 = (void *)(v60 - 24); if ( (__int64 *)(v60 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v30 = (unsigned int *)(v60 - 8); do v31 = __ldaxr(v30); while ( __stlxr(v31 - 1, v30) ); } else { v31 = *(_DWORD *)(v60 - 8); *(_DWORD *)(v60 - 8) = v31 - 1; } if ( v31 <= 0 ) operator delete(v10); } cocos2d::CCPoint::CCPoint(&v58, v56 * 0.5, v57 * 0.5); sub_D153B8((unsigned int)v54 + 192, "ItemID"); cocos2d::CCPoint::CCPoint(&v59, -50.0, 50.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); v62.y = 0.0; v48 = 2; v62.x = 0.8; v51 = 0; SetupTriggerPopup::createValueControlAdvanced( a1, 80, (std::string)&v61, v62, 100.0, (bool)&v60, Float, 3, 6, v11, v12, 1, 0, GoldLabel, 0, v48, v51); v13 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v40 = (unsigned int *)(v61 - 8); do v41 = __ldaxr(v40); while ( __stlxr(v41 - 1, v40) ); } else { v41 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v41 - 1; } if ( v41 <= 0 ) operator delete(v13); } cocos2d::CCPoint::CCPoint(&v59, -5.0, 80.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); sub_D153B8((int)&v61, &byte_F288A0); SetupTriggerPopup::createPlusButton((int)a1, 80, (int)&v60, (unsigned int)v54 + 192, 0); v14 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v36 = (unsigned int *)(v61 - 8); do v37 = __ldaxr(v36); while ( __stlxr(v37 - 1, v36) ); } else { v37 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v37 - 1; } if ( v37 <= 0 ) operator delete(v14); } v15 = (int)a1->getValue(a1, 88); v55 = v15 == 1; sub_D153B8((unsigned int)v54 + 192, "Multiply"); cocos2d::CCPoint::CCPoint(&v59, 50.0, 70.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); SetupTriggerPopup::createCustomToggleValueControl( (int)a1, 1, (unsigned __int8)v55, 1, (int)&v61, (int)&v60, 0, 0, 0); v16 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v44 = (unsigned int *)(v61 - 8); do v45 = __ldaxr(v44); while ( __stlxr(v45 - 1, v44) ); } else { v45 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v45 - 1; } if ( v45 <= 0 ) operator delete(v16); } sub_D153B8((unsigned int)v54 + 192, "Divide"); cocos2d::CCPoint::CCPoint(&v59, 50.0, 30.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); SetupTriggerPopup::createCustomToggleValueControl( (int)a1, 2, v15 == 2, 1, (unsigned int)v54 + 192, (int)&v60, 0, 0, 0); v17 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v34 = (unsigned int *)(v61 - 8); do v35 = __ldaxr(v34); while ( __stlxr(v35 - 1, v34) ); } else { v35 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v35 - 1; } if ( v35 <= 0 ) operator delete(v17); } sub_D153B8((unsigned int)v54 + 192, "Count"); cocos2d::CCPoint::CCPoint(&v59, -50.0, -20.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); v63.x = 0.8; v63.y = 0.0; LODWORD(v49) = 2; LOBYTE(v52) = 0; SetupTriggerPopup::createValueControlAdvanced( a1, 77, (std::string)&v61, v63, 100.0, (bool)&v60, Float, 2, 6, v18, v19, 1, 0, ChatLabel, 0, v49, v52); v20 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v42 = (unsigned int *)(v61 - 8); do v43 = __ldaxr(v42); while ( __stlxr(v43 - 1, v42) ); } else { v43 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v43 - 1; } if ( v43 <= 0 ) operator delete(v20); } sub_D153B8((unsigned int)v54 + 192, "Override"); cocos2d::CCPoint::CCPoint(&v59, 50.0, -20.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); v64.x = 1.0; SetupTriggerPopup::createToggleValueControl(a1, 139, (std::string)&v61, v64, (bool)&v60, 0, 0, v21); v22 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v38 = (unsigned int *)(v61 - 8); do v39 = __ldaxr(v38); while ( __stlxr(v39 - 1, v38) ); } else { v39 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v39 - 1; } if ( v39 <= 0 ) operator delete(v22); } sub_D153B8((unsigned int)v54 + 192, "Modifier:"); cocos2d::CCPoint::CCPoint(&v59, 0.0, -20.0); cocos2d::CCPoint::operator+(&v60, &v58, &v59); v65.x = 0.8; v65.y = 0.0; LODWORD(v50) = 3; LOBYTE(v53) = 0; SetupTriggerPopup::createValueControlAdvanced( a1, 449, (std::string)&v61, v65, 10.0, (bool)&v60, (InputValueType)0, 1, 6, v23, v24, 0, 0, (GJInputStyle)2, 0, v50, v53); v25 = (void *)(v61 - 24); if ( (__int64 *)(v61 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v46 = (unsigned int *)(v61 - 8); do v47 = __ldaxr(v46); while ( __stlxr(v47 - 1, v46) ); } else { v47 = *(_DWORD *)(v61 - 8); *(_DWORD *)(v61 - 8) = v47 - 1; } if ( v47 <= 0 ) operator delete(v25); } SetupTriggerPopup::createMultiTriggerItemsDefault(a1); SetupPickupTriggerPopup::updateState(a1); SetupTriggerPopup::postSetup(a1); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source