{"type": "func", "start": 5370879472, "end": 5370880161, "name": "GJBaseGameLayer::playerCircleCollision", "pseudocode": "// \n// GJBaseGameLayer::playerCircleCollision from 0x140211df0 to 0x1402120a1 (689 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::checkCollisions @ 0x140214804\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214afa\n// > <???> @ 0x14067f0c4\n// > <???> @ 0x14067f0d4\n// > <???> @ 0x1406ccf90\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nbool GJBaseGameLayer::playerCircleCollision(GJBaseGameLayer *a1, PlayerObject *a2, GameObject *a3)\n{\n  const struct cocos2d::CCPoint *v5; // rbx\n  cocos2d *v6; // rax\n  const struct cocos2d::CCPoint *v7; // r8\n  float v8; // xmm0_4\n  float m_scaleX; // xmm6_4\n  float m_objectRadius; // xmm6_4\n  bool result; // al\n  const struct cocos2d::CCRect *v12; // rax\n  float v13; // xmm6_4\n  float v14; // xmm6_4\n  float MaxX; // xmm8_4\n  float MinX; // xmm9_4\n  float MinY; // xmm0_4\n  cocos2d *v18; // rax\n  const struct cocos2d::CCPoint *v19; // r8\n  float v20; // xmm0_4\n  cocos2d *v21; // rax\n  const struct cocos2d::CCPoint *v22; // r8\n  float v23; // xmm0_4\n  cocos2d *v24; // rax\n  const struct cocos2d::CCPoint *v25; // r8\n  float v26; // xmm0_4\n  cocos2d *v27; // rax\n  const struct cocos2d::CCPoint *v28; // r8\n  cocos2d::CCRect v29; // [rsp+38h] [rbp-90h] BYREF\n  struct cocos2d::CCPoint v30; // [rsp+D0h] [rbp+8h] BYREF\n\n  if ( a1->m_levelSettings->m_fixRadiusCollision )\n  {\n    v5 = (const struct cocos2d::CCPoint *)((__int64 (__fastcall *)(GameObject *, struct cocos2d::CCPoint *))a3->getRealPosition)(\n                                            a3,\n                                            &v30);\n    v6 = (cocos2d *)a2->getPosition_0(a2);\n    v8 = cocos2d::ccpDistance(v6, v5, v7);\n    m_scaleX = a3->m_scaleX;\n    if ( m_scaleX == 1.0 && a3->m_scaleY == 1.0 )\n      m_objectRadius = a3->m_objectRadius;\n    else\n      m_objectRadius = fmaxf(m_scaleX, a3->m_scaleY) * a3->m_objectRadius;\n    return (float)((float)(a2->getObjectRect_0(a2)->size.width * 0.5) + m_objectRadius) >= v8;\n  }\n  else\n  {\n    v12 = a2->getObjectRect_0(a2);\n    cocos2d::CCRect::CCRect(&v29, v12);\n    v13 = a3->m_scaleX;\n    if ( v13 == 1.0 && a3->m_scaleY == 1.0 )\n      v14 = a3->m_objectRadius;\n    else\n      v14 = fmaxf(v13, a3->m_scaleY) * a3->m_objectRadius;\n    ((void (__fastcall *)(GameObject *, struct cocos2d::CCPoint *))a3->getRealPosition)(a3, &v30);\n    MaxX = cocos2d::CCRect::getMaxX(&v29);\n    MinX = cocos2d::CCRect::getMinX(&v29);\n    cocos2d::CCRect::getMaxY(&v29);\n    MinY = cocos2d::CCRect::getMinY(&v29);\n    result = true;\n    if ( !cocos2d::CCRect::containsPoint(&v29, &v30) )\n    {\n      cocos2d::CCPoint::CCPoint(MinY, MaxX);\n      v20 = fabs(cocos2d::ccpDistance(v18, &v30, v19));\n      if ( v14 <= v20 )\n      {\n        cocos2d::CCPoint::CCPoint(v20, MaxX);\n        v23 = fabs(cocos2d::ccpDistance(v21, &v30, v22));\n        if ( v14 <= v23 )\n        {\n          cocos2d::CCPoint::CCPoint(v23, MinX);\n          v26 = fabs(cocos2d::ccpDistance(v24, &v30, v25));\n          if ( v14 <= v26 )\n          {\n            cocos2d::CCPoint::CCPoint(v26, MinX);\n            if ( v14 <= fabs(cocos2d::ccpDistance(v27, &v30, v28)) )\n              return false;\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::playerCircleCollision from 0x140211df0 to 0x1402120a1 (689 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::checkCollisions @ 0x140214804\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214afa\n; > <???> @ 0x14067f0c4\n; > <???> @ 0x14067f0d4\n; > <???> @ 0x1406ccf90\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     r11, rsp                                                       ; +0x0, 0x140211df0\npush    rsi                                                            ; +0x3, 0x140211df3\npush    rdi                                                            ; +0x4, 0x140211df4\npush    r14                                                            ; +0x5, 0x140211df5\nsub     rsp, 0B0h                                                      ; +0x7, 0x140211df7\nmov     rax, [rcx+0DB0h]                                               ; +0xe, 0x140211dfe\nmov     rsi, r8                                                        ; +0x15, 0x140211e05\nmovaps  xmmword ptr [r11-28h], xmm6                                    ; +0x18, 0x140211e08\nmov     r14, rdx                                                       ; +0x1d, 0x140211e0d\nmovaps  xmmword ptr [r11-38h], xmm7                                    ; +0x20, 0x140211e10\ncmp     byte ptr [rax+1CFh], 0                                         ; +0x25, 0x140211e15\njz      loc_140211EC5                                                  ; +0x2c, 0x140211e1c\nmov     rax, [r8]                                                      ; +0x32, 0x140211e22\nlea     rdx, [r11+8]                                                   ; +0x35, 0x140211e25\nmov     rcx, r8                                                        ; +0x39, 0x140211e29\nmov     [r11+10h], rbx                                                 ; +0x3c, 0x140211e2c\ncall    qword ptr [rax+4A8h]                                           ; +0x40, 0x140211e30\nmov     r8, [r14]                                                      ; +0x46, 0x140211e36\nmov     rcx, r14                                                       ; +0x49, 0x140211e39\nmov     rbx, rax                                                       ; +0x4c, 0x140211e3c\ncall    qword ptr [r8+0C8h]                                            ; +0x4f, 0x140211e3f\nmov     rcx, rax                                                       ; +0x56, 0x140211e46\nmov     rdx, rbx                                                       ; +0x59, 0x140211e49\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x5c, 0x140211e4c\nmovss   xmm2, cs:flt_140622C24                                         ; +0x62, 0x140211e52\nmovaps  xmm7, xmm0                                                     ; +0x6a, 0x140211e5a\nmovss   xmm6, dword ptr [rsi+488h]                                     ; +0x6d, 0x140211e5d\nucomiss xmm6, xmm2                                                     ; +0x75, 0x140211e65\nmov     rbx, [rsp+0C8h+arg_8]                                          ; +0x78, 0x140211e68\njp      short loc_140211E8D                                            ; +0x80, 0x140211e70\njnz     short loc_140211E8D                                            ; +0x82, 0x140211e72\nmovss   xmm1, dword ptr [rsi+48Ch]                                     ; +0x84, 0x140211e74\nucomiss xmm1, xmm2                                                     ; +0x8c, 0x140211e7c\njp      short loc_140211E8D                                            ; +0x8f, 0x140211e7f\njnz     short loc_140211E8D                                            ; +0x91, 0x140211e81\nmovss   xmm6, dword ptr [rsi+38Ch]                                     ; +0x93, 0x140211e83\njmp     short loc_140211E9D                                            ; +0x9b, 0x140211e8b\nmaxss   xmm6, dword ptr [rsi+48Ch]                                     ; +0x9d, 0x140211e8d\nmulss   xmm6, dword ptr [rsi+38Ch]                                     ; +0xa5, 0x140211e95\nmov     rax, [r14]                                                     ; +0xad, 0x140211e9d\nmov     rcx, r14                                                       ; +0xb0, 0x140211ea0\ncall    qword ptr [rax+490h]                                           ; +0xb3, 0x140211ea3\nmovss   xmm0, dword ptr [rax+8]                                        ; +0xb9, 0x140211ea9\nmulss   xmm0, cs:dword_140622B08                                       ; +0xbe, 0x140211eae\naddss   xmm0, xmm6                                                     ; +0xc6, 0x140211eb6\ncomiss  xmm0, xmm7                                                     ; +0xca, 0x140211eba\nsetnb   al                                                             ; +0xcd, 0x140211ebd\njmp     loc_140212085                                                  ; +0xd0, 0x140211ec0\nmov     rax, [rdx]                                                     ; +0xd5, 0x140211ec5\nmov     rcx, r14                                                       ; +0xd8, 0x140211ec8\nmovaps  [rsp+0C8h+var_48], xmm8                                        ; +0xdb, 0x140211ecb\nmovaps  [rsp+0C8h+var_58], xmm9                                        ; +0xe4, 0x140211ed4\nmovaps  [rsp+0C8h+var_68], xmm10                                       ; +0xea, 0x140211eda\nmovaps  [rsp+0C8h+var_78], xmm11                                       ; +0xf0, 0x140211ee0\ncall    qword ptr [rax+490h]                                           ; +0xf6, 0x140211ee6\nmov     rdx, rax                                                       ; +0xfc, 0x140211eec\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0xff, 0x140211eef\ncall    cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x104, 0x140211ef4\nmovss   xmm1, cs:flt_140622C24                                         ; +0x10a, 0x140211efa\nmovss   xmm6, dword ptr [rsi+488h]                                     ; +0x112, 0x140211f02\nucomiss xmm6, xmm1                                                     ; +0x11a, 0x140211f0a\njp      short loc_140211F2A                                            ; +0x11d, 0x140211f0d\njnz     short loc_140211F2A                                            ; +0x11f, 0x140211f0f\nmovss   xmm0, dword ptr [rsi+48Ch]                                     ; +0x121, 0x140211f11\nucomiss xmm0, xmm1                                                     ; +0x129, 0x140211f19\njp      short loc_140211F2A                                            ; +0x12c, 0x140211f1c\njnz     short loc_140211F2A                                            ; +0x12e, 0x140211f1e\nmovss   xmm6, dword ptr [rsi+38Ch]                                     ; +0x130, 0x140211f20\njmp     short loc_140211F3A                                            ; +0x138, 0x140211f28\nmaxss   xmm6, dword ptr [rsi+48Ch]                                     ; +0x13a, 0x140211f2a\nmulss   xmm6, dword ptr [rsi+38Ch]                                     ; +0x142, 0x140211f32\nmov     rax, [rsi]                                                     ; +0x14a, 0x140211f3a\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x14d, 0x140211f3d\nmov     rcx, rsi                                                       ; +0x155, 0x140211f45\ncall    qword ptr [rax+4A8h]                                           ; +0x158, 0x140211f48\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0x15e, 0x140211f4e\ncall    cs:?getMaxX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxX(void) ; +0x163, 0x140211f53\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0x169, 0x140211f59\nmovaps  xmm8, xmm0                                                     ; +0x16e, 0x140211f5e\ncall    cs:?getMinX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinX(void) ; +0x172, 0x140211f62\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0x178, 0x140211f68\nmovaps  xmm9, xmm0                                                     ; +0x17d, 0x140211f6d\ncall    cs:?getMaxY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxY(void) ; +0x181, 0x140211f71\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0x187, 0x140211f77\nmovaps  xmm11, xmm0                                                    ; +0x18c, 0x140211f7c\ncall    cs:?getMinY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinY(void) ; +0x190, 0x140211f80\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x196, 0x140211f86\nmovaps  xmm10, xmm0                                                    ; +0x19e, 0x140211f8e\nlea     rcx, [rsp+0C8h+var_90]                                         ; +0x1a2, 0x140211f92\ncall    cs:?containsPoint@CCRect@cocos2d@@QEBA_NAEBVCCPoint@2@@Z; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const &) ; +0x1a7, 0x140211f97\ntest    al, al                                                         ; +0x1ad, 0x140211f9d\njnz     loc_140212068                                                  ; +0x1af, 0x140211f9f\nmovaps  xmm2, xmm11                                                    ; +0x1b5, 0x140211fa5\nlea     rcx, [rsp+0C8h+arg_18]                                         ; +0x1b9, 0x140211fa9\nmovaps  xmm1, xmm8                                                     ; +0x1c1, 0x140211fb1\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1c5, 0x140211fb5\nmov     rcx, rax                                                       ; +0x1cb, 0x140211fbb\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x1ce, 0x140211fbe\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x1d6, 0x140211fc6\nmovss   xmm7, dword ptr cs:xmmword_1406243C0                           ; +0x1dc, 0x140211fcc\nandps   xmm0, xmm7                                                     ; +0x1e4, 0x140211fd4\ncomiss  xmm6, xmm0                                                     ; +0x1e7, 0x140211fd7\nja      loc_140212068                                                  ; +0x1ea, 0x140211fda\nmovaps  xmm2, xmm10                                                    ; +0x1f0, 0x140211fe0\nlea     rcx, [rsp+0C8h+var_A8]                                         ; +0x1f4, 0x140211fe4\nmovaps  xmm1, xmm8                                                     ; +0x1f9, 0x140211fe9\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1fd, 0x140211fed\nmov     rcx, rax                                                       ; +0x203, 0x140211ff3\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x206, 0x140211ff6\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x20e, 0x140211ffe\nandps   xmm0, xmm7                                                     ; +0x214, 0x140212004\ncomiss  xmm6, xmm0                                                     ; +0x217, 0x140212007\nja      short loc_140212068                                            ; +0x21a, 0x14021200a\nmovaps  xmm2, xmm10                                                    ; +0x21c, 0x14021200c\nlea     rcx, [rsp+0C8h+var_A0]                                         ; +0x220, 0x140212010\nmovaps  xmm1, xmm9                                                     ; +0x225, 0x140212015\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x229, 0x140212019\nmov     rcx, rax                                                       ; +0x22f, 0x14021201f\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x232, 0x140212022\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x23a, 0x14021202a\nandps   xmm0, xmm7                                                     ; +0x240, 0x140212030\ncomiss  xmm6, xmm0                                                     ; +0x243, 0x140212033\nja      short loc_140212068                                            ; +0x246, 0x140212036\nmovaps  xmm2, xmm11                                                    ; +0x248, 0x140212038\nlea     rcx, [rsp+0C8h+var_98]                                         ; +0x24c, 0x14021203c\nmovaps  xmm1, xmm9                                                     ; +0x251, 0x140212041\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x255, 0x140212045\nmov     rcx, rax                                                       ; +0x25b, 0x14021204b\nlea     rdx, [rsp+0C8h+arg_0]                                          ; +0x25e, 0x14021204e\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x266, 0x140212056\nandps   xmm0, xmm7                                                     ; +0x26c, 0x14021205c\ncomiss  xmm6, xmm0                                                     ; +0x26f, 0x14021205f\nja      short loc_140212068                                            ; +0x272, 0x140212062\nxor     al, al                                                         ; +0x274, 0x140212064\njmp     short loc_14021206A                                            ; +0x276, 0x140212066\nmov     al, 1                                                          ; +0x278, 0x140212068\nmovaps  xmm11, [rsp+0C8h+var_78]                                       ; +0x27a, 0x14021206a\nmovaps  xmm10, [rsp+0C8h+var_68]                                       ; +0x280, 0x140212070\nmovaps  xmm9, [rsp+0C8h+var_58]                                        ; +0x286, 0x140212076\nmovaps  xmm8, [rsp+0C8h+var_48]                                        ; +0x28c, 0x14021207c\nmovaps  xmm6, [rsp+0C8h+var_28]                                        ; +0x295, 0x140212085\nmovaps  xmm7, [rsp+0C8h+var_38]                                        ; +0x29d, 0x14021208d\nadd     rsp, 0B0h                                                      ; +0x2a5, 0x140212095\npop     r14                                                            ; +0x2ac, 0x14021209c\npop     rdi                                                            ; +0x2ae, 0x14021209e\npop     rsi                                                            ; +0x2af, 0x14021209f\nretn                                                                   ; +0x2b0, 0x1402120a0", "xrefs": ["GJBaseGameLayer::checkCollisions @ 0x140214804", "GJBaseGameLayer::collisionCheckObjects @ 0x140214afa", "<???> @ 0x14067f0c4", "<???> @ 0x14067f0d4", "<???> @ 0x1406ccf90"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}