// // SetupShaderEffectPopup::setupColorChange from 0xa07518 to 0xa07d98 (2176 bytes) // // 2 xrefs: // > SetupShaderEffectPopup::init @ 0xa08628 // > @ 0xb8a28 // // 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 // void SetupShaderEffectPopup::setupColorChange(SetupShaderEffectPopup *a1) { void *v2; // x0 void *v3; // x0 void *v4; // x0 cocos2d::CCDirector *v5; // x0 void *v6; // x0 void *v7; // x0 void *v8; // x0 void *v9; // x0 void *v10; // x0 void *v11; // x0 void *v12; // x0 float v13; // s2 cocos2d::CCSprite *v14; // x0 CCMenuItemSpriteExtra *v15; // x21 cocos2d::CCMenu *m_buttonMenu; // x23 float m_height; // s1 float v18; // s4 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 unsigned int *v20; // x1 int v21; // w2 unsigned int *v22; // x1 int v23; // w2 unsigned int *v24; // x1 int v25; // w2 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; // x21 int v39; // w1 float v40; // [xsp+90h] [xbp+90h] float v41; // [xsp+94h] [xbp+94h] cocos2d::CCPoint v42; // [xsp+98h] [xbp+98h] BYREF cocos2d::CCPoint v43; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCPoint v44; // [xsp+A8h] [xbp+A8h] BYREF __int64 v45; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v46; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v47; // 0:x2.16 cocos2d::CCPoint v48; // 0:s0.4,4:s1.4 sub_D153B8((int)&v45, "Setup Brightness Contrast"); SetupTriggerPopup::addTitle((__int64)a1); v2 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v20 = (unsigned int *)(v45 - 8); do v21 = __ldaxr(v20); while ( __stlxr(v21 - 1, v20) ); } else { v21 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v21 - 1; } if ( v21 <= 0 ) operator delete(v2); } sub_D153B8((int)&v44, "Help"); sub_D153B8( (int)&v45, "Edits colors on the screen.\n" "CR, CG, and CB define how much red, green, and blue to tint with respectively.\n" "BR, BG, and BB define the brightness of red, green, and blue."); SetupTriggerPopup::addHelpButton((__int64)a1, 1.0); v3 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v22 = (unsigned int *)(v45 - 8); do v23 = __ldaxr(v22); while ( __stlxr(v23 - 1, v22) ); } else { v23 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v23 - 1; } if ( v23 <= 0 ) operator delete(v3); } v4 = (void *)(*(_QWORD *)&v44 - 24LL); if ( (__int64 *)(*(_QWORD *)&v44 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v24 = (unsigned int *)(*(_QWORD *)&v44 - 8LL); do v25 = __ldaxr(v24); while ( __stlxr(v25 - 1, v24) ); } else { v25 = *(_DWORD *)(*(_QWORD *)&v44 - 8LL); *(_DWORD *)(*(_QWORD *)&v44 - 8LL) = v25 - 1; } if ( v25 <= 0 ) operator delete(v4); } v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v5); cocos2d::CCPoint::CCPoint(&v42, v40 * 0.5, (float)(v41 * 0.5) + 90.0); sub_D153B8((int)&v45, "FadeTime:"); cocos2d::CCPoint::CCPoint(&v43, 0.0, 0.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xAu, 0.7, 0.0, 0.0, (__int64)&v45, &v44); v6 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v26 = (unsigned int *)(v45 - 8); do v27 = __ldaxr(v26); while ( __stlxr(v27 - 1, v26) ); } else { v27 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v27 - 1; } if ( v27 <= 0 ) operator delete(v6); } sub_D153B8((int)&v45, "CR:"); cocos2d::CCPoint::CCPoint(&v43, -130.0, -50.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xB0u, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v7 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v28 = (unsigned int *)(v45 - 8); do v29 = __ldaxr(v28); while ( __stlxr(v29 - 1, v28) ); } else { v29 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v29 - 1; } if ( v29 <= 0 ) operator delete(v7); } sub_D153B8((int)&v45, "CG:"); cocos2d::CCPoint::CCPoint(&v43, 0.0, -50.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xBFu, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v8 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v30 = (unsigned int *)(v45 - 8); do v31 = __ldaxr(v30); while ( __stlxr(v31 - 1, v30) ); } else { v31 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v31 - 1; } if ( v31 <= 0 ) operator delete(v8); } sub_D153B8((int)&v45, "CB:"); cocos2d::CCPoint::CCPoint(&v43, 130.0, -50.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xAFu, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v9 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v32 = (unsigned int *)(v45 - 8); do v33 = __ldaxr(v32); while ( __stlxr(v33 - 1, v32) ); } else { v33 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v33 - 1; } if ( v33 <= 0 ) operator delete(v9); } sub_D153B8((int)&v45, "BR:"); cocos2d::CCPoint::CCPoint(&v43, -130.0, -100.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xB3u, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v10 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v34 = (unsigned int *)(v45 - 8); do v35 = __ldaxr(v34); while ( __stlxr(v35 - 1, v34) ); } else { v35 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v35 - 1; } if ( v35 <= 0 ) operator delete(v10); } sub_D153B8((int)&v45, "BG:"); cocos2d::CCPoint::CCPoint(&v43, 0.0, -100.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xB4u, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v11 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v36 = (unsigned int *)(v45 - 8); do v37 = __ldaxr(v36); while ( __stlxr(v37 - 1, v36) ); } else { v37 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v37 - 1; } if ( v37 <= 0 ) operator delete(v11); } sub_D153B8((int)&v45, "BB:"); cocos2d::CCPoint::CCPoint(&v43, 130.0, -100.0); cocos2d::CCPoint::operator+(&v44, &v42, &v43); SetupTriggerPopup::createValueControl(a1, 0xBDu, 0.6, -2.0, 2.0, (__int64)&v45, &v44); v12 = (void *)(v45 - 24); if ( (__int64 *)(v45 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v38 = (unsigned int *)(v45 - 8); do v39 = __ldaxr(v38); while ( __stlxr(v39 - 1, v38) ); } else { v39 = *(_DWORD *)(v45 - 8); *(_DWORD *)(v45 - 8) = v39 - 1; } if ( v39 <= 0 ) operator delete(v12); } cocos2d::CCPoint::CCPoint(&v44, 0.0, -145.0); cocos2d::CCPoint::operator+(&v45, &v42, &v44); v48.x = 0.7; SetupTriggerPopup::createEasingControls(a1, v48, v13, (int)&v45, 0); v14 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_resetBtn_001.png"); v47.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v47.adj = (size_t)SetupShaderEffectPopup::onResetColors; v15 = CCMenuItemSpriteExtra::create(v14, nullptr, v47); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v15); m_buttonMenu = a1->m_buttonMenu; m_height = a1->m_height; v18 = a1->m_width * 0.5; setPosition = v15->setPosition; cocos2d::CCPoint::CCPoint( &v44, (float)(v18 + (float)(v40 * 0.5)) - 50.0, (float)((float)(m_height * 0.5) + (float)(v41 * 0.5)) - 20.0); v46 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v44); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, float, float))setPosition)(v15, &v45, v46.x, v46.y); }
GD Web Decomp Icon

GD Web Decomp

Raw Source