// // SetupAreaTintTriggerPopup::init from 0x1004d80a0 to 0x1004d8ada (2618 bytes) // // 1 xrefs: // > SetupAreaTintTriggerPopup::create @ 0x1004d8052 // // 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 __fastcall SetupAreaTintTriggerPopup::init( SetupAreaTintTriggerPopup *a1, EnterEffectObject *a2, cocos2d::CCArray *a3) { bool result; // al cocos2d::CCSprite *v4; // rax CCMenuItemSpriteExtra *v5; // rax CCMenuItemSpriteExtra *m_hsvButton; // r15 cocos2d::CCMenu *m_buttonMenu; // r12 __int64 v8; // r15 cocos2d::CCSpriteFrameCache *v9; // rax const char *v10; // rsi cocos2d::CCSpriteFrame *v11; // rax __m128 m_width_low; // xmm0 __m128 v13; // xmm0 __m128 v14; // rt1 unsigned __int64 v15; // [rsp+40h] [rbp-190h] BYREF __int128 v16; // [rsp+48h] [rbp-188h] BYREF void *v17; // [rsp+58h] [rbp-178h] void *v18[3]; // [rsp+60h] [rbp-170h] BYREF char v19; // [rsp+78h] [rbp-158h] BYREF char v20[15]; // [rsp+79h] [rbp-157h] BYREF void *v21; // [rsp+88h] [rbp-148h] char v22; // [rsp+90h] [rbp-140h] BYREF char v23[15]; // [rsp+91h] [rbp-13Fh] BYREF void *v24; // [rsp+A0h] [rbp-130h] __int128 v25; // [rsp+A8h] [rbp-128h] BYREF void *v26; // [rsp+B8h] [rbp-118h] char v27; // [rsp+C0h] [rbp-110h] BYREF char v28[15]; // [rsp+C1h] [rbp-10Fh] BYREF void *v29; // [rsp+D0h] [rbp-100h] char v30; // [rsp+D8h] [rbp-F8h] BYREF char v31[15]; // [rsp+D9h] [rbp-F7h] BYREF void *v32; // [rsp+E8h] [rbp-E8h] char v33; // [rsp+F0h] [rbp-E0h] BYREF char v34[15]; // [rsp+F1h] [rbp-DFh] BYREF void *v35; // [rsp+100h] [rbp-D0h] __int128 v36; // [rsp+108h] [rbp-C8h] BYREF void *v37; // [rsp+118h] [rbp-B8h] float v38[2]; // [rsp+120h] [rbp-B0h] BYREF char v39; // [rsp+128h] [rbp-A8h] BYREF char v40[15]; // [rsp+129h] [rbp-A7h] BYREF void *v41; // [rsp+138h] [rbp-98h] char v42; // [rsp+140h] [rbp-90h] BYREF char v43[15]; // [rsp+141h] [rbp-8Fh] BYREF void *v44; // [rsp+150h] [rbp-80h] char v45; // [rsp+158h] [rbp-78h] BYREF _BYTE v46[23]; // [rsp+159h] [rbp-77h] BYREF __int128 v47; // [rsp+170h] [rbp-60h] BYREF void *v48; // [rsp+180h] [rbp-50h] unsigned __int64 v49; // [rsp+18Ch] [rbp-44h] BYREF bool v50; // [rsp+197h] [rbp-39h] double v51; // [rsp+198h] [rbp-38h] BYREF unsigned __int64 v52[6]; // [rsp+1A0h] [rbp-30h] BYREF double v53; // 0:xmm0_8.8 result = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1); if ( result ) { v50 = result; ((void (__fastcall *)(SetupAreaTintTriggerPopup *))a1->determineStartValues)(a1); strcpy((char *)v18, "\"Area Tint Trigger"); SetupTriggerPopup::addTitle((__int64)a1, (__int64)v18); if ( ((__int64)v18[0] & 1) != 0 ) operator delete(v18[2]); v19 = 4; strcpy(v20, "OK"); SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v19); if ( (v19 & 1) != 0 ) operator delete(v21); v22 = 8; strcpy(v23, "Help"); v26 = operator new(0x138u); *(_QWORD *)&v25 = 313; *((_QWORD *)&v25 + 1) = 310; strcpy( (char *)v26, "Tints objects using Target Group ID within an area around Center Group ID. The area can be specifi" "ed by the arrow buttons and Length (for size).\n" "You can specify how much the objects in the area tint depending on how close they are to the center.\n" "Check the other pages for more settings."); SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v22, &v25, (__m128)0x3F800000u); if ( (v25 & 1) != 0 ) operator delete(v26); if ( (v22 & 1) != 0 ) operator delete(v24); SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v38); sub_10028CBE0((float *)&v49, v38[0] * 0.5, (float)(0.5 * v38[1]) + 95.0); v39 = 12; strcpy(v40, "Length"); sub_10028CBE0((float *)v52, -75.0, 0.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 222, (__int64)&v39, (float *)&v51, 0, Int, 0.64999998, 0.0, 100.0, 6, 0, 0, 0, 1, 2, 0); if ( (v39 & 1) != 0 ) operator delete(v41); v27 = 4; strcpy(v28, "+-"); sub_10028CBE0((float *)v52, 75.0, 0.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 223, (__int64)&v27, (float *)&v51, 0, Int, 0.64999998, 0.0, 100.0, 6, 0, 0, 0, 1, 2, 0); if ( (v27 & 1) != 0 ) operator delete(v29); v42 = 12; strcpy(v43, "Offset"); sub_10028CBE0((float *)v52, -75.0, -25.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 220, (__int64)&v42, (float *)&v51, 0, Int, 0.64999998, -100.0, 100.0, 6, 0, 0, 0, 1, 2, 0); if ( (v42 & 1) != 0 ) operator delete(v44); v30 = 4; strcpy(v31, "+-"); sub_10028CBE0((float *)v52, 75.0, -25.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 221, (__int64)&v30, (float *)&v51, 0, Int, 0.64999998, -100.0, 100.0, 6, 0, 0, 0, 1, 2, 0); if ( (v30 & 1) != 0 ) operator delete(v32); v45 = 28; strcpy(v46, "Color Channel:"); sub_10028CBE0((float *)v52, -75.0, -75.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 260, (__int64)&v45, (float *)&v51, 1, Uint, 0.64999998, 0.0, 100.0, 6, 1, 0, 1, 0, 2, 0); if ( (v45 & 1) != 0 ) operator delete(*(void **)&v46[15]); v33 = 8; strcpy(v34, "Tint"); sub_10028CBE0((float *)v52, 75.0, -75.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 265, (__int64)&v33, (float *)&v51, 0, Float, 0.64999998, 0.0, 1.0, 6, 0, 0, 1, 1, 2, 0); if ( (v33 & 1) != 0 ) operator delete(v35); v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png"); v5 = CCMenuItemSpriteExtra::create( v4, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)SetupAreaTintTriggerPopup::onHSV); a1->m_hsvButton = v5; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v5); m_hsvButton = a1->m_hsvButton; m_buttonMenu = a1->m_buttonMenu; sub_10028CBE0((float *)&v15, 0.0, -75.0); sub_10028CCE0((double *)v52, &v49, &v15); *(cocos2d::CCPoint *)&v53 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v51, (const cocos2d::CCPoint *)m_buttonMenu); ((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))m_hsvButton->setPosition)(m_hsvButton, &v51, v53); SetupTriggerPopup::addObjectToGroup(a1, a1->m_hsvButton, 2); SetupTriggerPopup::addObjectToPage(a1, a1->m_hsvButton, 0); v8 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_hsvButton->getNormalImage)(a1->m_hsvButton); v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v10 = "GJ_hsv2Btn_001.png"; if ( a1->m_hsvValue.h == *(float *)&xmmword_1009A20E8 && a1->m_hsvValue.s == *((float *)&xmmword_1009A20E8 + 1) && a1->m_hsvValue.v == *((float *)&xmmword_1009A20E8 + 2) && a1->m_hsvValue.absoluteSaturation == BYTE12(xmmword_1009A20E8) ) { v10 = "GJ_hsv2Btn_001.png"; if ( a1->m_hsvValue.absoluteBrightness == BYTE13(xmmword_1009A20E8) ) v10 = "GJ_hsvBtn_001.png"; } v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v10); (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v8 + 1144LL))(v8, v11); LOBYTE(v36) = 18; strcpy((char *)&v36 + 1, "Main\nOnly"); sub_10028CBE0((float *)v52, -140.0, -125.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createToggleValueControl((int)a1, 65, &v36, 1.0, (__int64)&v51, 0, 0, 0); if ( (v36 & 1) != 0 ) operator delete(v37); LOBYTE(v47) = 28; strcpy((char *)&v47 + 1, "Secondary\nOnly"); sub_10028CBE0((float *)v52, -20.0, -125.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createToggleValueControl((int)a1, 66, &v47, 1.0, (__int64)&v51, 0, 0, 0); if ( (v47 & 1) != 0 ) operator delete(v48); LOBYTE(v16) = 6; *(_DWORD *)((char *)&v16 + 1) = 5657416; sub_10028CBE0((float *)v52, 100.0, -125.0); sub_10028CCE0(&v51, &v49, v52); SetupTriggerPopup::createToggleValueControl((int)a1, 278, &v16, 1.0, (__int64)&v51, 0, 0, 0); if ( (v16 & 1) != 0 ) operator delete(v17); SetupAreaMoveTriggerPopup::addAreaDefaultControls(a1, 3010); ((void (__fastcall *)(SetupAreaTintTriggerPopup *))a1->updateDefaultTriggerValues)(a1); m_width_low = (__m128)LODWORD(a1->m_width); SetupTriggerPopup::createPageButtons(a1, (float)(m_width_low.f32[0] * 0.5) + 15.0, 1); *(double *)m_width_low.i64 = ((double (__fastcall *)(SetupAreaTintTriggerPopup *, __int64))a1->getValue)(a1, 278); v13 = _mm_cmpeq_ss(m_width_low, (__m128)0LL); ((void (__fastcall *)(SetupAreaTintTriggerPopup *, __int64, _QWORD))a1->toggleGroup)( a1, 1, _mm_cvtsi128_si32((__m128i)v13) & 1); *(double *)v13.i64 = ((double (__fastcall *)(SetupAreaTintTriggerPopup *, __int64))a1->getValue)(a1, 278); v14.i32[0] = 0; ((void (__fastcall *)(SetupAreaTintTriggerPopup *, __int64, _QWORD))a1->toggleGroup)( a1, 2, _mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v13, v14)) & 1); SetupTriggerPopup::goToPage(a1, 0, 0); a1->m_disableTextDelegate = 0; return v50; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source