// // GJBaseGameLayer::volumeForProximityEffect from 0x9aa700 to 0x9aaa54 (852 bytes) // // 4 xrefs: // > GJBaseGameLayer::updateProximityVolumeEffects @ 0x9aaab8 // > GJBaseGameLayer::addProximityVolumeEffect @ 0x9c1cd8 // > GJBaseGameLayer::activateSFXTrigger @ 0x9dfcc4 // > @ 0xbf0e0 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:58:12 +0000 // __int64 __fastcall GJBaseGameLayer::volumeForProximityEffect(__int64 a1, __int64 a2) { cocos2d::CCDirector *v4; // x0 float v5; // s0 unsigned int v6; // s3 unsigned int v7; // s2 float v8; // s0 __int64 v9; // x19 cocos2d::CCObject *Group; // x26 __int64 v11; // x1 int v12; // w24 int v13; // w25 __int64 v14; // x0 int v15; // w25 float v16; // s8 float v17; // s0 float v18; // s10 __int64 v20; // x0 __int64 MainObject; // x0 const cocos2d::CCPoint *v22; // x0 float v23; // s0 const cocos2d::CCPoint *v24; // x0 unsigned __int64 v25; // [xsp+80h] [xbp+80h] BYREF __int64 v26; // [xsp+88h] [xbp+88h] BYREF _BYTE v27[8]; // [xsp+90h] [xbp+90h] BYREF float v28; // [xsp+98h] [xbp+98h] BYREF __int64 v29; // [xsp+A0h] [xbp+A0h] BYREF v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard); cocos2d::CCDirector::getWinSize(&v25, v4); v5 = *(float *)(a1 + 424); *(float *)&v6 = *(float *)&v25 / v5; *(float *)&v7 = *((float *)&v25 + 1) / v5; v8 = (float)(*(float *)&v25 / v5) * 0.5; v25 = __PAIR64__(v7, v6); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, v8, *(float *)&v7 * 0.5); cocos2d::CCPoint::operator+(&v26, a1 + 992); v9 = *(_QWORD *)(a2 + 16); Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)a1, *(_DWORD *)a2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27); if ( *(_BYTE *)(v9 + 1944) ) { v12 = 0; v13 = 1; cocos2d::CCPoint::operator=(v27, &v26); if ( !Group ) return _stack_chk_guard; goto LABEL_8; } if ( *(_BYTE *)(v9 + 1684) ) { v20 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3256) + 192LL))(*(_QWORD *)(a1 + 3256)); cocos2d::CCPoint::operator=(v27, v20); if ( *(_BYTE *)(v9 + 1685) ) v12 = *(unsigned __int8 *)(a1 + 1010); else v12 = 0; v13 = 1; } else if ( *(_BYTE *)(v9 + 1685) ) { if ( *(_BYTE *)(a1 + 1010) ) v11 = *(_QWORD *)(a1 + 3264); else v11 = *(_QWORD *)(a1 + 3256); v12 = 0; v13 = 1; v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11); cocos2d::CCPoint::operator=(v27, v14); } else { MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)a1, *(_DWORD *)(a2 + 4)); v12 = 0; if ( MainObject ) { v13 = 1; (*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)MainObject + 1360LL))(&v29); cocos2d::CCPoint::operator=(v27, &v29); } else { v13 = 0; } } if ( Group ) { LABEL_8: if ( (unsigned int)cocos2d::CCArray::count(Group) ) { if ( v13 ) { v15 = *(_DWORD *)(v9 + 1940); v16 = (float)(3 * *(_DWORD *)(v9 + 1928)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, (const cocos2d::CCPoint *)v27); GJBaseGameLayer::getMinDistance(v16, a1, (float *)&v29, (__int64)Group, v15); v18 = v17; if ( v16 < v17 ) { if ( v12 ) { v22 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3264) + 192LL))(*(_QWORD *)(a1 + 3264)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28, v22); GJBaseGameLayer::getMinDistance(v16, a1, &v28, (__int64)Group, v15); if ( v18 > v23 ) { v24 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3264) + 192LL))(*(_QWORD *)(a1 + 3264)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, v24); GJBaseGameLayer::getMinDistance(v16, a1, (float *)&v29, (__int64)Group, v15); } } } } } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source