// // SetItemIDLayer::init from 0x94b8fc to 0x94c300 (2564 bytes) // // 2 xrefs: // > SetItemIDLayer::create @ 0x94c4b8 // > @ 0x8f7d8 // // 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 SetItemIDLayer::init(SetItemIDLayer *a1, EffectGameObject *a2, cocos2d::CCArray *a3) { bool v4; // w27 void *v6; // x0 void *v7; // x0 void *v8; // x0 void *v9; // x0 cocos2d::CCDirector *v10; // x0 float v11; // s3 float v12; // s4 void *v13; // x0 float v14; // s2 void *v15; // x0 float v16; // s2 void *v17; // x0 int v18; // w28 void *v19; // x0 void *v20; // x0 _BOOL4 v21; // w28 void *v22; // x0 _BOOL4 v23; // w28 void *v24; // x0 _BOOL4 v25; // w26 void *v26; // x19 unsigned int *v27; // x1 int v28; // w2 unsigned int *v29; // x1 int v30; // w2 unsigned int *v31; // x1 int v32; // w2 unsigned int *v33; // x1 int v34; // w2 unsigned int *v35; // x1 int v36; // w2 unsigned int *v37; // x1 int v38; // w2 unsigned int *v39; // x1 int v40; // w2 unsigned int *v41; // x1 int v42; // w2 unsigned int *v43; // x1 int v44; // w2 unsigned int *v45; // x1 int v46; // w2 unsigned int *v47; // x1 int v48; // w2 unsigned int *v49; // x22 int v50; // w0 _QWORD v51[2]; // [xsp+30h] [xbp+0h] BYREF int v52; // [xsp+ACh] [xbp+7Ch] float v53; // [xsp+C0h] [xbp+90h] float v54; // [xsp+C4h] [xbp+94h] cocos2d::CCPoint v55; // [xsp+C8h] [xbp+98h] BYREF cocos2d::CCPoint v56; // [xsp+D0h] [xbp+A0h] BYREF __int64 v57; // [xsp+D8h] [xbp+A8h] BYREF __int64 v58; // [xsp+E0h] [xbp+B0h] BYREF cocos2d::CCPoint v59; // 0:s0.4,4:s1.4 cocos2d::CCPoint v60; // 0:s0.4,4:s1.4 cocos2d::CCPoint v61; // 0:s0.4,4:s1.4 v4 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 260.0, 1); if ( v4 ) { SetupTriggerPopup::preSetup(a1); sub_D153B8((unsigned int)v51 + 176, "Counter Label"); SetupTriggerPopup::addTitle(a1, (std::string)&v58); v6 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v27 = (unsigned int *)(v58 - 8); do v28 = __ldaxr(v27); while ( __stlxr(v28 - 1, v27) ); } else { v28 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v28 - 1; } if ( v28 <= 0 ) operator delete(v6); } sub_D153B8((unsigned int)v51 + 176, "OK"); SetupTriggerPopup::addCloseButton(a1, (std::string)&v58); v7 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v29 = (unsigned int *)(v58 - 8); do v30 = __ldaxr(v29); while ( __stlxr(v30 - 1, v29) ); } else { v30 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v30 - 1; } if ( v30 <= 0 ) operator delete(v7); } sub_D153B8((int)&v57, "Help"); sub_D153B8( (int)&v58, "Displays a set counter value depending on the setting. By default it displays Item ID.\n" "Use Time Counter to make it function as a timer.\n" "MainTime shows the exact game time.\n" "Use Points to show linked collectables.\n" "Attempts displays the current attempt.\n" "Left and Right Align changes the alignment of the display."); SetupTriggerPopup::addHelpButton(a1, (std::string)&v57, (std::string)&v58, 1.0); v8 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v33 = (unsigned int *)(v58 - 8); do v34 = __ldaxr(v33); while ( __stlxr(v34 - 1, v33) ); } else { v34 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v34 - 1; } if ( v34 <= 0 ) operator delete(v8); } v9 = (void *)(v57 - 24); if ( (__int64 *)(v57 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v37 = (unsigned int *)(v57 - 8); do v38 = __ldaxr(v37); while ( __stlxr(v38 - 1, v37) ); } else { v38 = *(_DWORD *)(v57 - 8); *(_DWORD *)(v57 - 8) = v38 - 1; } if ( v38 <= 0 ) operator delete(v9); } v10 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v10); cocos2d::CCPoint::CCPoint(&v55, v53 * 0.5, v54 * 0.5); sub_D153B8((int)&v58, "ItemID"); cocos2d::CCPoint::CCPoint(&v56, -60.0, 50.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); v59.y = 0.0; v59.x = 0.8; SetupTriggerPopup::createValueControlAdvanced( a1, 80, (std::string)&v58, v59, 100.0, (bool)&v57, Float, 3, 6, v11, v12, 1, 0, GoldLabel, 0, 2, 0); v13 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v31 = (unsigned int *)(v58 - 8); do v32 = __ldaxr(v31); while ( __stlxr(v32 - 1, v31) ); } else { v32 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v32 - 1; } if ( v32 <= 0 ) operator delete(v13); } sub_D153B8((int)&v58, "Time\nCounter"); cocos2d::CCPoint::CCPoint(&v56, -60.0, 0.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); v60.x = 1.0; SetupTriggerPopup::createToggleValueControl(a1, 466, (std::string)&v58, v60, (bool)&v57, 0, 0, v14); v15 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v43 = (unsigned int *)(v58 - 8); do v44 = __ldaxr(v43); while ( __stlxr(v44 - 1, v43) ); } else { v44 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v44 - 1; } if ( v44 <= 0 ) operator delete(v15); } sub_D153B8((int)&v58, "Seconds\nOnly"); cocos2d::CCPoint::CCPoint(&v56, 60.0, 0.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); v61.x = 1.0; SetupTriggerPopup::createToggleValueControl(a1, 389, (std::string)&v58, v61, (bool)&v57, 0, 0, v16); v17 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v39 = (unsigned int *)(v58 - 8); do v40 = __ldaxr(v39); while ( __stlxr(v40 - 1, v39) ); } else { v40 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v40 - 1; } if ( v40 <= 0 ) operator delete(v17); } v18 = (int)a1->getValue(a1, 391); v52 = v18 == 1; sub_D153B8((int)&v58, "Left\nAlign"); cocos2d::CCPoint::CCPoint(&v56, 60.0, 80.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); SetupTriggerPopup::createCustomToggleValueControl( (int)a1, 1, (unsigned __int8)v52, 1, (int)&v58, (int)&v57, 0, 0, 0); v19 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v47 = (unsigned int *)(v58 - 8); do v48 = __ldaxr(v47); while ( __stlxr(v48 - 1, v47) ); } else { v48 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v48 - 1; } if ( v48 <= 0 ) operator delete(v19); } sub_D153B8((int)&v58, "Right\nAlign"); cocos2d::CCPoint::CCPoint(&v56, 60.0, 40.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); SetupTriggerPopup::createCustomToggleValueControl((int)a1, 2, v18 == 2, 1, (int)&v58, (int)&v57, 0, 0, 0); v20 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v35 = (unsigned int *)(v58 - 8); do v36 = __ldaxr(v35); while ( __stlxr(v36 - 1, v35) ); } else { v36 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v36 - 1; } if ( v36 <= 0 ) operator delete(v20); } v52 = (int)a1->getValue(a1, 390); v21 = v52 == -1; sub_D153B8((int)&v58, "MainTime"); cocos2d::CCPoint::CCPoint(&v56, -90.0, -60.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); SetupTriggerPopup::createCustomToggleValueControl((int)a1, -1, v21, 1, (int)&v58, (int)&v57, 1, 0, 0); v22 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v45 = (unsigned int *)(v58 - 8); do v46 = __ldaxr(v45); while ( __stlxr(v46 - 1, v45) ); } else { v46 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v46 - 1; } if ( v46 <= 0 ) operator delete(v22); } v23 = v52 == -2; sub_D153B8((int)&v58, "Points"); cocos2d::CCPoint::CCPoint(&v56, -15.0, -60.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); SetupTriggerPopup::createCustomToggleValueControl((int)a1, -2, v23, 1, (int)&v58, (int)&v57, 1, 0, 0); v24 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v41 = (unsigned int *)(v58 - 8); do v42 = __ldaxr(v41); while ( __stlxr(v42 - 1, v41) ); } else { v42 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v42 - 1; } if ( v42 <= 0 ) operator delete(v24); } v25 = v52 == -3; sub_D153B8((int)&v58, "Attempts"); cocos2d::CCPoint::CCPoint(&v56, 60.0, -60.0); cocos2d::CCPoint::operator+(&v57, &v55, &v56); SetupTriggerPopup::createCustomToggleValueControl((int)a1, -3, v25, 1, (int)&v58, (int)&v57, 1, 0, 0); v26 = (void *)(v58 - 24); if ( (__int64 *)(v58 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v49 = (unsigned int *)(v58 - 8); do v50 = __ldaxr(v49); while ( __stlxr(v50 - 1, v49) ); } else { v50 = *(_DWORD *)(v58 - 8); *(_DWORD *)(v58 - 8) = v50 - 1; } if ( v50 <= 0 ) operator delete(v26); } SetupTriggerPopup::postSetup(a1); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source