// // ForceBlockGameObject::calculateForceToTarget from 0x1404c1ec0 to 0x1404c21f4 (820 bytes) // // 2 xrefs: // > GJBaseGameLayer::collisionCheckObjects @ 0x140215b4e // > @ 0x1406dcf44 // // 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 // cocos2d::CCPoint ForceBlockGameObject::calculateForceToTarget(ForceBlockGameObject *a1, GameObject *a2) { __int64 v2; // r8 __int64 v3; // rsi const struct cocos2d::CCRect *v6; // rax float v7; // xmm6_4 float v8; // xmm9_4 __int64 v9; // rbx __int64 v10; // rax double v11; // xmm6_8 const struct cocos2d::CCPoint *v12; // rbx cocos2d *v13; // rax const struct cocos2d::CCPoint *v14; // r8 cocos2d *v15; // rcx float v16; // xmm0_4 __int64 v17; // rbx __int64 v18; // rax struct cocos2d::CCPoint v19; // rax _BYTE v21[8]; // [rsp+20h] [rbp-98h] BYREF cocos2d::CCRect v22; // [rsp+28h] [rbp-90h] BYREF float X; // [rsp+C0h] [rbp+8h] BYREF float Y; // [rsp+C4h] [rbp+Ch] int v25; // [rsp+C8h] [rbp+10h] BYREF char v26; // [rsp+D8h] [rbp+20h] BYREF v3 = v2; v6 = a1->getObjectRect_0(a1); cocos2d::CCRect::CCRect(&v22, v6); if ( a1->m_relativeForce ) { v9 = (*(__int64 (__fastcall **)(__int64, int *))(*(_QWORD *)v3 + 1192LL))(v3, &v25); v10 = ((__int64 (__fastcall *)(ForceBlockGameObject *, char *))a1->getRealPosition)(a1, &v26); cocos2d::CCPoint::operator-(v10, &X, v9); if ( a1->isFlipY(a1) ) v11 = 0.0; else v11 = 3.141592653589793; v8 = atan2f(Y, X) + v11; } else { v7 = 90.0 - a1->getRotationX(a1); v8 = (float)((float)(a1->isFlipY(a1) ? 0xB4 : 0) + v7) * 0.017453292; } if ( a1->m_forceRange ) { if ( a1->m_relativeForce ) { v12 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v3 + 1192LL))( v3, &X); v13 = (cocos2d *)((__int64 (__fastcall *)(ForceBlockGameObject *, int *))a1->getRealPosition)(a1, &v25); cocos2d::ccpDistance(v13, v12, v14); } else { sinf(v8); v16 = cosf(v8); cocos2d::CCPoint::CCPoint(v16, v16); v17 = (*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)v3 + 1192LL))(v3, &v26); v18 = ((__int64 (__fastcall *)(ForceBlockGameObject *, _BYTE *))a1->getRealPosition)(a1, v21); cocos2d::CCPoint::operator-(v18, &X, v17); } cocos2d::clampf(v15, 0.0, 1.0); } v19 = cocos2d::ccpForAngle((cocos2d *)&X, v8); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator*)(v19, a2); return (cocos2d::CCPoint)a2; }