{"type": "func", "start": 5372476976, "end": 5372477247, "name": "PlayerObject::switchedDirTo", "pseudocode": "// \n// PlayerObject::switchedDirTo from 0x140397e30 to 0x140397f3f (271 bytes)\n// \n// 4 xrefs:\n// > PlayerObject::pushButton @ 0x1403981b0\n// > <???> @ 0x140697f0c\n// > <???> @ 0x140697f1c\n// > <???> @ 0x1406d6488\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 PlayerObject::switchedDirTo(PlayerObject *a1, PlayerButton a2)\n{\n  bool m_isSliding; // al\n  bool v6; // cc\n  int v7; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( !a1->m_inputsLocked )\n  {\n    v7 = 3;\n    *(_BYTE *)sub_1400CDBF0((__int64 *)&a1->m_holdingButtons, &v7) = a2 == 3;\n    v7 = 2;\n    *(_BYTE *)sub_1400CDBF0((__int64 *)&a1->m_holdingButtons, &v7) = a2 == 2;\n  }\n  if ( a1->m_controlsDisabled )\n    return 0;\n  m_isSliding = a1->m_isSliding;\n  if ( a2 == 3 )\n  {\n    a1->m_holdingRight = 1;\n    a1->m_leftPressedFirst = 0;\n    if ( m_isSliding && a1->m_isSlidingRight )\n    {\n      a1->m_isSliding = 0;\n      a1->m_maybeSlopeForce = 0.0;\n    }\n    v6 = a1->m_platformerXVelocity >= 0.0;\n  }\n  else\n  {\n    *(_WORD *)&a1->m_holdingLeft = 257;\n    if ( m_isSliding && !a1->m_isSlidingRight )\n    {\n      a1->m_isSliding = 0;\n      a1->m_maybeSlopeForce = 0.0;\n    }\n    v6 = a1->m_platformerXVelocity <= 0.0;\n  }\n  if ( !v6 )\n    a1->m_isMoving = 0;\n  return 1;\n}", "assembly": "; \n; PlayerObject::switchedDirTo from 0x140397e30 to 0x140397f3f (271 bytes)\n; \n; 4 xrefs:\n; > PlayerObject::pushButton @ 0x1403981b0\n; > <???> @ 0x140697f0c\n; > <???> @ 0x140697f1c\n; > <???> @ 0x1406d6488\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     [rsp+arg_10], rsi                                              ; +0x0, 0x140397e30\npush    rdi                                                            ; +0x5, 0x140397e35\nsub     rsp, 20h                                                       ; +0x6, 0x140397e36\ncmp     byte ptr [rcx+0BC8h], 0                                        ; +0xa, 0x140397e3a\nmov     esi, edx                                                       ; +0x11, 0x140397e41\nmov     rdi, rcx                                                       ; +0x13, 0x140397e43\njnz     short loc_140397E96                                            ; +0x16, 0x140397e46\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x18, 0x140397e48\nmov     [rsp+28h+arg_8], rbx                                           ; +0x1d, 0x140397e4d\nadd     rcx, 0BB8h                                                     ; +0x22, 0x140397e52\nmov     [rsp+28h+arg_0], 3                                             ; +0x29, 0x140397e59\ncall    sub_1400CDBF0                                                  ; +0x31, 0x140397e61\ncmp     esi, 3                                                         ; +0x36, 0x140397e66\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x39, 0x140397e69\nlea     rcx, [rdi+0BB8h]                                               ; +0x3e, 0x140397e6e\nsetz    r8b                                                            ; +0x45, 0x140397e75\nmov     [rax], r8b                                                     ; +0x49, 0x140397e79\nmov     [rsp+28h+arg_0], 2                                             ; +0x4c, 0x140397e7c\ncall    sub_1400CDBF0                                                  ; +0x54, 0x140397e84\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x59, 0x140397e89\ncmp     esi, 2                                                         ; +0x5e, 0x140397e8e\nsetz    cl                                                             ; +0x61, 0x140397e91\nmov     [rax], cl                                                      ; +0x64, 0x140397e94\ncmp     byte ptr [rdi+0A2Bh], 0                                        ; +0x66, 0x140397e96\njz      short loc_140397EAC                                            ; +0x6d, 0x140397e9d\nxor     al, al                                                         ; +0x6f, 0x140397e9f\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x71, 0x140397ea1\nadd     rsp, 20h                                                       ; +0x76, 0x140397ea6\npop     rdi                                                            ; +0x7a, 0x140397eaa\nretn                                                                   ; +0x7b, 0x140397eab\nmovzx   eax, byte ptr [rdi+0B19h]                                      ; +0x7c, 0x140397eac\ncmp     esi, 3                                                         ; +0x83, 0x140397eb3\njnz     short loc_140397EF2                                            ; +0x86, 0x140397eb6\nmov     byte ptr [rdi+0B00h], 1                                        ; +0x88, 0x140397eb8\nmov     byte ptr [rdi+0B02h], 0                                        ; +0x8f, 0x140397ebf\ntest    al, al                                                         ; +0x96, 0x140397ec6\njz      short loc_140397EE5                                            ; +0x98, 0x140397ec8\ncmp     byte ptr [rdi+0B5Bh], 0                                        ; +0x9a, 0x140397eca\njz      short loc_140397EE5                                            ; +0xa1, 0x140397ed1\nmov     byte ptr [rdi+0B19h], 0                                        ; +0xa3, 0x140397ed3\nmov     qword ptr [rdi+0B20h], 0                                       ; +0xaa, 0x140397eda\nxorps   xmm0, xmm0                                                     ; +0xb5, 0x140397ee5\ncomisd  xmm0, qword ptr [rdi+0AF8h]                                    ; +0xb8, 0x140397ee8\njmp     short loc_140397F29                                            ; +0xc0, 0x140397ef0\nmov     word ptr [rdi+0B01h], 101h                                     ; +0xc2, 0x140397ef2\ntest    al, al                                                         ; +0xcb, 0x140397efb\njz      short loc_140397F1A                                            ; +0xcd, 0x140397efd\ncmp     byte ptr [rdi+0B5Bh], 0                                        ; +0xcf, 0x140397eff\njnz     short loc_140397F1A                                            ; +0xd6, 0x140397f06\nmov     byte ptr [rdi+0B19h], 0                                        ; +0xd8, 0x140397f08\nmov     qword ptr [rdi+0B20h], 0                                       ; +0xdf, 0x140397f0f\nmovsd   xmm1, qword ptr [rdi+0AF8h]                                    ; +0xea, 0x140397f1a\nxorps   xmm0, xmm0                                                     ; +0xf2, 0x140397f22\ncomisd  xmm1, xmm0                                                     ; +0xf5, 0x140397f25\njbe     short loc_140397F32                                            ; +0xf9, 0x140397f29\nmov     byte ptr [rdi+0B58h], 0                                        ; +0xfb, 0x140397f2b\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x102, 0x140397f32\nmov     al, 1                                                          ; +0x107, 0x140397f37\nadd     rsp, 20h                                                       ; +0x109, 0x140397f39\npop     rdi                                                            ; +0x10d, 0x140397f3d\nretn                                                                   ; +0x10e, 0x140397f3e", "xrefs": ["PlayerObject::pushButton @ 0x1403981b0", "<???> @ 0x140697f0c", "<???> @ 0x140697f1c", "<???> @ 0x1406d6488"], "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"}