{"type": "func", "start": 5370418096, "end": 5370418401, "name": "GameObject::slopeYPos", "pseudocode": "// \n// GameObject::slopeYPos from 0x1401a13b0 to 0x1401a14e1 (305 bytes)\n// \n// 4 xrefs:\n// > PlayerObject::collidedWithSlopeInternal @ 0x14038fd4b\n// > PlayerObject::collidedWithObjectInternal @ 0x1403921f1\n// > PlayerObject::spiderTestJumpInternal @ 0x140394b41\n// > <???> @ 0x1406cbf4c\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\ndouble GameObject::slopeYPos(GameObject *a1, float a2)\n{\n  const struct cocos2d::CCRect *v3; // rax\n  double MinX; // xmm8_8\n  double MaxX; // xmm9_8\n  double MinY; // xmm7_8\n  float MaxY; // xmm0_4\n  bool m_slopeUphill; // al\n  double v9; // xmm2_8\n  double v10; // xmm0_8\n  double v11; // xmm3_8\n  double v12; // xmm8_8\n  double v13; // xmm7_8\n  double v14; // xmm0_8\n  unsigned int m_slopeDirection; // eax\n  int v16; // ecx\n  cocos2d::CCRect v18; // [rsp+20h] [rbp-58h] BYREF\n\n  v3 = a1->getObjectRect_0(a1);\n  cocos2d::CCRect::CCRect(&v18, v3);\n  MinX = cocos2d::CCRect::getMinX(&v18);\n  MaxX = cocos2d::CCRect::getMaxX(&v18);\n  MinY = cocos2d::CCRect::getMinY(&v18);\n  MaxY = cocos2d::CCRect::getMaxY(&v18);\n  m_slopeUphill = a1->m_slopeUphill;\n  v9 = MaxY;\n  v10 = a2;\n  v11 = (float)(v18.size.height / v18.size.width);\n  if ( MinX < a2 )\n  {\n    v14 = (v10 - MaxX) * v11;\n    if ( m_slopeUphill )\n      v13 = v14 + v9;\n    else\n      v13 = MinY - v14;\n  }\n  else\n  {\n    v12 = (MinX - v10) * v11;\n    if ( m_slopeUphill )\n      v13 = MinY - v12;\n    else\n      v13 = v12 + v9;\n  }\n  if ( a1->m_slopeIsHazard )\n  {\n    m_slopeDirection = a1->m_slopeDirection;\n    if ( m_slopeDirection <= 6 && (v16 = 106, _bittest(&v16, m_slopeDirection)) )\n      return v13 + -4.0;\n    else\n      return v13 + 4.0;\n  }\n  return v13;\n}", "assembly": "; \n; GameObject::slopeYPos from 0x1401a13b0 to 0x1401a14e1 (305 bytes)\n; \n; 4 xrefs:\n; > PlayerObject::collidedWithSlopeInternal @ 0x14038fd4b\n; > PlayerObject::collidedWithObjectInternal @ 0x1403921f1\n; > PlayerObject::spiderTestJumpInternal @ 0x140394b41\n; > <???> @ 0x1406cbf4c\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\npush    rbx                                                            ; +0x0, 0x1401a13b0\nsub     rsp, 70h                                                       ; +0x2, 0x1401a13b2\nmov     rax, [rcx]                                                     ; +0x6, 0x1401a13b6\nmov     rbx, rcx                                                       ; +0x9, 0x1401a13b9\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0xc, 0x1401a13bc\nmovaps  xmm6, xmm1                                                     ; +0x11, 0x1401a13c1\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0x14, 0x1401a13c4\nmovaps  [rsp+78h+var_38], xmm8                                         ; +0x19, 0x1401a13c9\nmovaps  [rsp+78h+var_48], xmm9                                         ; +0x1f, 0x1401a13cf\ncall    qword ptr [rax+490h]                                           ; +0x25, 0x1401a13d5\nmov     rdx, rax                                                       ; +0x2b, 0x1401a13db\nlea     rcx, [rsp+78h+var_58]                                          ; +0x2e, 0x1401a13de\ncall    cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x33, 0x1401a13e3\nlea     rcx, [rsp+78h+var_58]                                          ; +0x39, 0x1401a13e9\ncall    cs:?getMinX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinX(void) ; +0x3e, 0x1401a13ee\nxorps   xmm8, xmm8                                                     ; +0x44, 0x1401a13f4\nlea     rcx, [rsp+78h+var_58]                                          ; +0x48, 0x1401a13f8\ncvtss2sd xmm8, xmm0                                                    ; +0x4d, 0x1401a13fd\ncall    cs:?getMaxX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxX(void) ; +0x52, 0x1401a1402\nxorps   xmm9, xmm9                                                     ; +0x58, 0x1401a1408\nlea     rcx, [rsp+78h+var_58]                                          ; +0x5c, 0x1401a140c\ncvtss2sd xmm9, xmm0                                                    ; +0x61, 0x1401a1411\ncall    cs:?getMinY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinY(void) ; +0x66, 0x1401a1416\nxorps   xmm7, xmm7                                                     ; +0x6c, 0x1401a141c\nlea     rcx, [rsp+78h+var_58]                                          ; +0x6f, 0x1401a141f\ncvtss2sd xmm7, xmm0                                                    ; +0x74, 0x1401a1424\ncall    cs:?getMaxY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxY(void) ; +0x78, 0x1401a1428\nmovss   xmm1, [rsp+78h+var_4C]                                         ; +0x7e, 0x1401a142e\nxorps   xmm2, xmm2                                                     ; +0x84, 0x1401a1434\ndivss   xmm1, [rsp+78h+var_50]                                         ; +0x87, 0x1401a1437\nmovzx   eax, byte ptr [rbx+440h]                                       ; +0x8d, 0x1401a143d\ncvtss2sd xmm2, xmm0                                                    ; +0x94, 0x1401a1444\nxorps   xmm0, xmm0                                                     ; +0x98, 0x1401a1448\ncvtss2sd xmm0, xmm6                                                    ; +0x9b, 0x1401a144b\ncvtps2pd xmm3, xmm1                                                    ; +0x9f, 0x1401a144f\ncomisd  xmm8, xmm0                                                     ; +0xa2, 0x1401a1452\njb      short loc_1401A1478                                            ; +0xa7, 0x1401a1457\nsubsd   xmm8, xmm0                                                     ; +0xa9, 0x1401a1459\nmulsd   xmm8, xmm3                                                     ; +0xae, 0x1401a145e\ntest    al, al                                                         ; +0xb3, 0x1401a1463\njz      short loc_1401A146E                                            ; +0xb5, 0x1401a1465\nsubsd   xmm7, xmm8                                                     ; +0xb7, 0x1401a1467\njmp     short loc_1401A1492                                            ; +0xbc, 0x1401a146c\nmovaps  xmm7, xmm8                                                     ; +0xbe, 0x1401a146e\naddsd   xmm7, xmm2                                                     ; +0xc2, 0x1401a1472\njmp     short loc_1401A1492                                            ; +0xc6, 0x1401a1476\nsubsd   xmm0, xmm9                                                     ; +0xc8, 0x1401a1478\nmulsd   xmm0, xmm3                                                     ; +0xcd, 0x1401a147d\ntest    al, al                                                         ; +0xd1, 0x1401a1481\njz      short loc_1401A148E                                            ; +0xd3, 0x1401a1483\nmovaps  xmm7, xmm0                                                     ; +0xd5, 0x1401a1485\naddsd   xmm7, xmm2                                                     ; +0xd8, 0x1401a1488\njmp     short loc_1401A1492                                            ; +0xdc, 0x1401a148c\nsubsd   xmm7, xmm0                                                     ; +0xde, 0x1401a148e\ncmp     byte ptr [rbx+448h], 0                                         ; +0xe2, 0x1401a1492\njz      short loc_1401A14C2                                            ; +0xe9, 0x1401a1499\nmov     eax, [rbx+444h]                                                ; +0xeb, 0x1401a149b\ncmp     eax, 6                                                         ; +0xf1, 0x1401a14a1\nja      short loc_1401A14BA                                            ; +0xf4, 0x1401a14a4\nmov     ecx, 6Ah ; 'j'                                                 ; +0xf6, 0x1401a14a6\nbt      ecx, eax                                                       ; +0xfb, 0x1401a14ab\njnb     short loc_1401A14BA                                            ; +0xfe, 0x1401a14ae\naddsd   xmm7, cs:qword_140623748                                       ; +0x100, 0x1401a14b0\njmp     short loc_1401A14C2                                            ; +0x108, 0x1401a14b8\naddsd   xmm7, cs:qword_140622E90                                       ; +0x10a, 0x1401a14ba\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x112, 0x1401a14c2\nmovaps  xmm0, xmm7                                                     ; +0x117, 0x1401a14c7\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x11a, 0x1401a14ca\nmovaps  xmm8, [rsp+78h+var_38]                                         ; +0x11f, 0x1401a14cf\nmovaps  xmm9, [rsp+78h+var_48]                                         ; +0x125, 0x1401a14d5\nadd     rsp, 70h                                                       ; +0x12b, 0x1401a14db\npop     rbx                                                            ; +0x12f, 0x1401a14df\nretn                                                                   ; +0x130, 0x1401a14e0", "xrefs": ["PlayerObject::collidedWithSlopeInternal @ 0x14038fd4b", "PlayerObject::collidedWithObjectInternal @ 0x1403921f1", "PlayerObject::spiderTestJumpInternal @ 0x140394b41", "<???> @ 0x1406cbf4c"], "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"}