// // SetupSFXEditPopup::init from 0x140449530 to 0x14044a1a4 (3188 bytes) // // 2 xrefs: // > SetupSFXEditPopup::create @ 0x1404494ec // > @ 0x1406da6e8 // // 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 // // Hidden C++ exception states: #wind=4 bool SetupSFXEditPopup::init(SetupSFXEditPopup *a1, SFXTriggerGameObject *a2, cocos2d::CCArray *a3, bool a4) { bool result; // al const char *v7; // rdx size_t v8; // rbx size_t v9; // r8 _BYTE *v10; // r9 _BYTE *v11; // rcx const char *v12; // rdx __int64 v13; // r8 _BYTE *v14; // rcx const char *v15; // rdx __int64 v16; // rax double v17; // xmm0_8 __int64 v18; // rcx cocos2d::CCDirector *v19; // rax double v20; // xmm0_8 __int64 *p_m_shouldLimitValues; // rbx double ValueControlAdvanced; // xmm0_8 int v23; // r8d void *v24; // rcx __int64 v25; // [rsp+80h] [rbp-88h] __int64 v26; // [rsp+80h] [rbp-88h] __int64 v27; // [rsp+80h] [rbp-88h] __int64 v28; // [rsp+80h] [rbp-88h] __int64 v29; // [rsp+80h] [rbp-88h] __int128 *v30; // [rsp+88h] [rbp-80h] BYREF __int128 v31; // [rsp+90h] [rbp-78h] BYREF __int64 v32; // [rsp+A0h] [rbp-68h] __int64 v33; // [rsp+A8h] [rbp-60h] __int128 *v34; // [rsp+B0h] [rbp-58h] __int128 *v35; // [rsp+B8h] [rbp-50h] _BYTE v36[8]; // [rsp+C0h] [rbp-48h] BYREF float v37; // [rsp+C8h] [rbp-40h] _BYTE v38[8]; // [rsp+D0h] [rbp-38h] BYREF __int128 v39; // [rsp+D8h] [rbp-30h] BYREF __int64 v40; // [rsp+E8h] [rbp-20h] __int64 v41; // [rsp+F0h] [rbp-18h] void *Block[2]; // [rsp+F8h] [rbp-10h] __int64 v43; // [rsp+108h] [rbp+0h] unsigned __int64 v44; // [rsp+110h] [rbp+8h] result = SetupTriggerPopup::init(a1, a2, a3, 380.0, 280.0, 1); if ( result ) { a1->m_disableTextDelegate = 1; a1->determineStartValues(a1); v7 = "Edit SFX Trigger"; if ( a4 ) v7 = "Edit Song Trigger"; v31 = 0; v32 = 0; v33 = 0; v8 = -1; v9 = -1; do ++v9; while ( v7[v9] ); sub_14003A930(&v31, v7, v9); SetupTriggerPopup::addTitle(a1, &v31); v31 = 0; v32 = 2; v33 = 15; strcpy((char *)&v31, "OK"); SetupTriggerPopup::addCloseButton(a1, &v31); *(_OWORD *)Block = 0; v43 = 0; v44 = 15; LOBYTE(Block[0]) = 0; if ( a4 ) { v10 = sub_14003AA10(0x1C0u); v43 = 438; v44 = 447; v11 = v10; v12 = "Lets you edit the properties of a song in a specified Channel.\n" "Page 2 lets you change the volume depending on proximity.\n" "Group ID 1 is the target that volume is calculated around. Use the arrow buttons to define which dir" "ection it works in.\n" "By default, the player changes the volume depending on how close they are to this group. You can also use Group ID 2 on an object to make this object control volume."; v13 = 3; do { *(_OWORD *)v11 = *(_OWORD *)v12; *((_OWORD *)v11 + 1) = *((_OWORD *)v12 + 1); *((_OWORD *)v11 + 2) = *((_OWORD *)v12 + 2); *((_OWORD *)v11 + 3) = *((_OWORD *)v12 + 3); *((_OWORD *)v11 + 4) = *((_OWORD *)v12 + 4); *((_OWORD *)v11 + 5) = *((_OWORD *)v12 + 5); *((_OWORD *)v11 + 6) = *((_OWORD *)v12 + 6); v11 += 128; *((_OWORD *)v11 - 1) = *((_OWORD *)v12 + 7); v12 += 128; --v13; } while ( v13 ); *(_OWORD *)v11 = *(_OWORD *)v12; *((_OWORD *)v11 + 1) = *((_OWORD *)v12 + 1); *((_OWORD *)v11 + 2) = *((_OWORD *)v12 + 2); *((_DWORD *)v11 + 12) = *((_DWORD *)v12 + 12); *((_WORD *)v11 + 26) = *((_WORD *)v12 + 26); v10[438] = 0; } else { v10 = sub_14003AA10(0x200u); v43 = 505; v44 = 511; v14 = v10; v15 = "Lets you edit the properties of a sound effect. Use Group ID, SFXGroup, or Uniqu" "e ID to refer to the correct one.\n" "Page 2 lets you change the volume depending on proximity.\n" "Group ID 1 is the target that volume is calculated around. Use the arrow buttons to define which dir" "ection it works in.\n" "By default, the player changes the volume depending on how close they are to this group. You can also use Group ID 2 on an object to make this object control volume."; v16 = 3; do { *(_OWORD *)v14 = *(_OWORD *)v15; *((_OWORD *)v14 + 1) = *((_OWORD *)v15 + 1); *((_OWORD *)v14 + 2) = *((_OWORD *)v15 + 2); *((_OWORD *)v14 + 3) = *((_OWORD *)v15 + 3); *((_OWORD *)v14 + 4) = *((_OWORD *)v15 + 4); *((_OWORD *)v14 + 5) = *((_OWORD *)v15 + 5); *((_OWORD *)v14 + 6) = *((_OWORD *)v15 + 6); v14 += 128; *((_OWORD *)v14 - 1) = *((_OWORD *)v15 + 7); v15 += 128; --v16; } while ( v16 ); *(_OWORD *)v14 = *(_OWORD *)v15; *((_OWORD *)v14 + 1) = *((_OWORD *)v15 + 1); *((_OWORD *)v14 + 2) = *((_OWORD *)v15 + 2); *((_OWORD *)v14 + 3) = *((_OWORD *)v15 + 3); *((_OWORD *)v14 + 4) = *((_OWORD *)v15 + 4); *((_OWORD *)v14 + 5) = *((_OWORD *)v15 + 5); *((_OWORD *)v14 + 6) = *((_OWORD *)v15 + 6); *((_QWORD *)v14 + 14) = *((_QWORD *)v15 + 14); v14[120] = v15[120]; v10[505] = 0; } Block[0] = v10; v30 = &v39; v39 = 0; v40 = 0; v41 = 0; do ++v8; while ( v10[v8] ); sub_14003A930(&v39, v10, v8); v31 = 0; v32 = 4; v33 = 15; strcpy((char *)&v31, "Help"); v17 = SetupTriggerPopup::addHelpButton(a1, &v31, &v39); SetupTriggerPopup::createMultiTriggerItemsDefault(a1); a1->m_disableSliderDelegate = 1; v19 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v18); cocos2d::CCDirector::getWinSize(v19); v20 = cocos2d::CCPoint::CCPoint(*(float *)&v17, v37 * 0.5); cocos2d::CCPoint::CCPoint(*(float *)&v20, v37 * 0.5); v33 = 15; v31 = 0; if ( a4 ) { v35 = &v31; v32 = 8; strcpy((char *)&v31, "Channel:"); cocos2d::CCPoint::CCPoint(0.0, 0.0); cocos2d::CCPoint::operator+(v38, &v30); SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 432, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 1, 3, 10, 1, 0, 1082130432, 0, 0, 0, 2, 0, v30); LODWORD(v30) = 432; p_m_shouldLimitValues = (__int64 *)&a1->m_shouldLimitValues; *(_BYTE *)sub_1400CDBF0((__int64 *)&a1->m_shouldLimitValues, (int *)&v30) = 1; } else { v34 = &v31; v32 = 9; strcpy((char *)&v31, "Group ID:"); cocos2d::CCPoint::CCPoint(3.0353437e32, -110.0); cocos2d::CCPoint::operator+(v38, &v30); SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 457, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 1, 2, 10, 1, -1027080192, 1120403456, 0, 0, 0, 0, 0, v30); v35 = &v31; *((_QWORD *)&v31 + 1) = 58; v32 = 9; v33 = 15; *(_QWORD *)&v31 = 0x70756F7247584653LL; cocos2d::CCPoint::CCPoint(55366.324, 0.0); cocos2d::CCPoint::operator+(v38, &v30); LOBYTE(v25) = 0; SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 455, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 1, 2, 10, 1, -1027080192, 1120403456, 0, 0, 0, 0, v25); v35 = &v31; *((_QWORD *)&v31 + 1) = 14916; v32 = 10; v33 = 15; *(_QWORD *)&v31 = 0x4920657571696E55LL; cocos2d::CCPoint::CCPoint(1.1558942e30, 110.0); cocos2d::CCPoint::operator+(v38, &v30); LOBYTE(v26) = 0; SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 416, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 1, 3, 10, 1, 0, 1120403456, 0, 0, 0, 0, v26); p_m_shouldLimitValues = (__int64 *)&a1->m_shouldLimitValues; } v35 = &v31; *((_QWORD *)&v31 + 1) = 58; v32 = 9; v33 = 15; *(_QWORD *)&v31 = 0x6E6F697461727544LL; cocos2d::CCPoint::CCPoint(2.7953512e20, -84.5); cocos2d::CCPoint::operator+(v36, &v30); LOBYTE(v27) = 0; SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 10, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 0, 1, 6, 0, 0, 0x40000000, 0, 0, 1, 2, v27); v35 = &v31; v31 = 0; v32 = 6; v33 = 15; strcpy((char *)&v31, "Speed:"); cocos2d::CCPoint::CCPoint(0.0, -84.5); cocos2d::CCPoint::operator+(v36, &v30); LOBYTE(v28) = 0; ValueControlAdvanced = SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 404, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 0, 2, 6, 0, -1052770304, 1094713344, 0, 0, 1, 2, v28); v35 = &v31; v32 = 7; v33 = 15; v31 = 0x3A656D756C6F56uLL; cocos2d::CCPoint::CCPoint(*(float *)&ValueControlAdvanced, -84.5); cocos2d::CCPoint::operator+(v36, &v30); LOBYTE(v29) = 0; SetupTriggerPopup::createValueControlAdvanced( (_DWORD)a1, 406, (unsigned int)&v31, (unsigned int)&v30, 1059481190, 0, 1, 6, 0, 0, 0x40000000, 0, 0, 1, 2, v29); v35 = &v31; v31 = 0; v32 = 4; v33 = 15; strcpy((char *)&v31, "Stop"); cocos2d::CCPoint::CCPoint(0.0, 34.5); cocos2d::CCPoint::operator+(v36, &v30); SetupTriggerPopup::createToggleValueControl( (_DWORD)a1, 417, (unsigned int)&v31, (unsigned int)&v30, 0, 0, 0, 1065353216); v35 = &v31; *((_QWORD *)&v31 + 1) = 112; v32 = 9; v33 = 15; *(_QWORD *)&v31 = 0x6F6F4C0A706F7453LL; cocos2d::CCPoint::CCPoint(2.9643018e29, 114.5); cocos2d::CCPoint::operator+(v36, &v30); SetupTriggerPopup::createToggleValueControl( (_DWORD)a1, 414, (unsigned int)&v31, (unsigned int)&v30, 0, 0, 0, 1065353216); v35 = &v31; v32 = 12; v33 = 15; strcpy((char *)&v31, "Change Speed"); BYTE13(v31) = 0; HIWORD(v31) = 0; cocos2d::CCPoint::CCPoint(1.7440043e28, 34.5); cocos2d::CCPoint::operator+(v36, &v30); SetupTriggerPopup::createToggleValueControl( (_DWORD)a1, 419, (unsigned int)&v31, (unsigned int)&v30, 0, 0, 0, 1065353216); v35 = &v31; v32 = 13; v33 = 15; strcpy((char *)&v31, "Change Volume"); HIWORD(v31) = 0; cocos2d::CCPoint::CCPoint(1.7440043e28, 34.5); cocos2d::CCPoint::operator+(v36, &v30); SetupTriggerPopup::createToggleValueControl( (_DWORD)a1, 418, (unsigned int)&v31, (unsigned int)&v30, 0, 0, 0, 1065353216); LODWORD(v30) = 404; *(_BYTE *)sub_1400CDBF0(p_m_shouldLimitValues, (int *)&v30) = 1; LODWORD(v30) = 406; *(_BYTE *)sub_1400CDBF0(p_m_shouldLimitValues, (int *)&v30) = 1; SetupAudioTriggerPopup::addProxVolControls(a1, 1); SetupTriggerPopup::createPageButtons(a1, (float)(a1->m_width * 0.5) + 15.0, v23); SetupTriggerPopup::goToPage(a1, 0, 0); a1->updateDefaultTriggerValues(a1); a1->m_disableTextDelegate = 0; if ( v44 > 0xF ) { v24 = Block[0]; if ( v44 + 1 >= 0x1000 ) { v24 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v24 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v24); } return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source