{"type": "func", "start": 8878688, "end": 8879036, "name": "GJBaseGameLayer::rotateGameplay", "pseudocode": "// \n// GJBaseGameLayer::rotateGameplay from 0x877a60 to 0x877bbc (348 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x365e8\n// > <???> @ 0x1148a98\n// > <???> @ 0x1155308\n// > <???> @ 0x1190788\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\nvoid GJBaseGameLayer::rotateGameplay(GJBaseGameLayer *a1, RotateGameplayGameObject *a2)\n{\n  char v4; // w22\n  const cocos2d::CCPoint *v5; // x0\n  cocos2d::CCPoint v6; // [xsp+50h] [xbp+50h] BYREF\n  __int64 v7; // [xsp+58h] [xbp+58h] BYREF\n  __int64 v8; // [xsp+60h] [xbp+60h] BYREF\n\n  if ( a2->m_changeChannel )\n  {\n    a1->m_gameState.m_currentChannel = a2->m_targetChannelID;\n    v4 = (unsigned int)(a2->m_groundDirection - 2) <= 1;\n    *std::__detail::_Map_base<int,std::pair<int const,bool>,std::allocator<std::pair<int const,bool>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](\n       (__int64)&a1->m_gameState.m_spawnChannelRelated1,\n       &a1->m_gameState.m_currentChannel) = v4;\n  }\n  if ( !a2->m_channelOnly )\n  {\n    PlayerObject::rotateGameplay(\n      a1->m_player1,\n      a2->m_moveDirection,\n      a2->m_groundDirection,\n      a2->m_editVelocity,\n      a2->m_velocityModX,\n      a2->m_velocityModY,\n      a2->m_overrideVelocity,\n      a2->m_dontSlide);\n    if ( a1->m_gameState.m_isDualMode )\n      PlayerObject::rotateGameplay(\n        a1->m_player2,\n        a2->m_moveDirection,\n        a2->m_groundDirection,\n        a2->m_editVelocity,\n        a2->m_velocityModX,\n        a2->m_velocityModY,\n        a2->m_overrideVelocity,\n        a2->m_dontSlide);\n    v5 = a1->m_player1->getPosition(a1->m_player1);\n    cocos2d::CCPoint::CCPoint(&v6, v5);\n    ((void (__fastcall *)(__int64 *__return_ptr, RotateGameplayGameObject *))a2->getRealPosition)(&v7, a2);\n    cocos2d::CCPoint::operator-(&v8, &v6, &v7);\n    a1->didRotateGameplay(a1);\n  }\n  if ( a2->m_instantOffset )\n  {\n    a1->m_gameState.m_unkPoint30.x = 1.0;\n    a1->m_gameState.m_unkPoint30.y = 1.0;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::rotateGameplay from 0x877a60 to 0x877bbc (348 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x365e8\n; > <???> @ 0x1148a98\n; > <???> @ 0x1155308\n; > <???> @ 0x1190788\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\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x877a60\nMOV             X29, SP                                                ; +0x4, 0x877a64\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x8, 0x877a68\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x877a6c\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x10, 0x877a70\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x14, 0x877a74\nMOV             X19, X1                                                ; +0x18, 0x877a78\nMOV             X20, X0                                                ; +0x1c, 0x877a7c\nLDR             X1, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x877a80\nLDRB            W0, [X19,#0x730]                                       ; +0x24, 0x877a84\nLDR             X1, [X1]                                               ; +0x28, 0x877a88\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x2c, 0x877a8c\nCBZ             W0, loc_877ABC                                         ; +0x30, 0x877a90\nLDR             W1, [X19,#0x734]                                       ; +0x34, 0x877a94\nADD             X0, X20, #0x380                                        ; +0x38, 0x877a98\nSTR             W1, [X20,#0x33C]                                       ; +0x3c, 0x877a9c\nADD             X1, X20, #0x33C                                        ; +0x40, 0x877aa0\nLDR             W2, [X19,#0x720]                                       ; +0x44, 0x877aa4\nSUB             W2, W2, #2                                             ; +0x48, 0x877aa8\nCMP             W2, #1                                                 ; +0x4c, 0x877aac\nCSET            W22, LS                                                ; +0x50, 0x877ab0\nBL              _ZNSt8__detail9_Map_baseIiSt4pairIKibESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,bool>,std::allocator<std::pair<int const,bool>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&) ; +0x54, 0x877ab4\nSTRB            W22, [X0]                                              ; +0x58, 0x877ab8\nLDRB            W0, [X19,#0x731]                                       ; +0x5c, 0x877abc\nCBZ             W0, loc_877B00                                         ; +0x60, 0x877ac0\nLDRB            W0, [X19,#0x738]                                       ; +0x64, 0x877ac4\nCBZ             W0, loc_877AD8                                         ; +0x68, 0x877ac8\nFMOV            S0, #1.0                                               ; +0x6c, 0x877acc\nSTR             S0, [X20,#0x2B4]                                       ; +0x70, 0x877ad0\nSTR             S0, [X20,#0x2B8]                                       ; +0x74, 0x877ad4\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x78, 0x877ad8\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x7c, 0x877adc\nLDR             X0, [X21]                                              ; +0x80, 0x877ae0\nCMP             X1, X0                                                 ; +0x84, 0x877ae4\nB.NE            loc_877BB8                                             ; +0x88, 0x877ae8\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x8c, 0x877aec\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x90, 0x877af0\nLDR             X23, [SP,#0x70+var_40]                                 ; +0x94, 0x877af4\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x98, 0x877af8\nRET                                                                    ; +0x9c, 0x877afc\nLDR             S0, [X19,#0x728]; float                                ; +0xa0, 0x877b00\nLDR             X0, [X20,#0xDF8]; this                                 ; +0xa4, 0x877b04\nLDR             S1, [X19,#0x72C]; float                                ; +0xa8, 0x877b08\nLDR             W1, [X19,#0x71C]; int                                  ; +0xac, 0x877b0c\nLDR             W2, [X19,#0x720]; int                                  ; +0xb0, 0x877b10\nLDRB            W3, [X19,#0x724]; bool                                 ; +0xb4, 0x877b14\nLDRB            W4, [X19,#0x725]; bool                                 ; +0xb8, 0x877b18\nLDRB            W5, [X19,#0x739]; bool                                 ; +0xbc, 0x877b1c\nBL              _ZN12PlayerObject14rotateGameplayEiibffbb; PlayerObject::rotateGameplay(int,int,bool,float,float,bool,bool) ; +0xc0, 0x877b20\nLDRB            W0, [X20,#0x412]                                       ; +0xc4, 0x877b24\nCBNZ            W0, loc_877B90                                         ; +0xc8, 0x877b28\nLDR             X1, [X20,#0xDF8]                                       ; +0xcc, 0x877b2c\nADD             X23, X29, #0x70+var_20                                 ; +0xd0, 0x877b30\nADD             X22, X29, #0x70+var_18                                 ; +0xd4, 0x877b34\nMOV             X0, X1                                                 ; +0xd8, 0x877b38\nLDR             X1, [X1]                                               ; +0xdc, 0x877b3c\nLDR             X1, [X1,#0xC0]                                         ; +0xe0, 0x877b40\nBLR             X1                                                     ; +0xe4, 0x877b44\nMOV             X1, X0; cocos2d::CCPoint *                             ; +0xe8, 0x877b48\nMOV             X0, X23; this                                          ; +0xec, 0x877b4c\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xf0, 0x877b50\nSTR             X22, [X29,#0x70+var_28]                                ; +0xf4, 0x877b54\nLDR             X2, [X19]                                              ; +0xf8, 0x877b58\nMOV             X8, X22                                                ; +0xfc, 0x877b5c\nMOV             X0, X19                                                ; +0x100, 0x877b60\nLDR             X2, [X2,#0x540]                                        ; +0x104, 0x877b64\nBLR             X2                                                     ; +0x108, 0x877b68\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x10c, 0x877b6c\nMOV             X0, X23                                                ; +0x110, 0x877b70\nADD             X8, X29, #0x70+var_10                                  ; +0x114, 0x877b74\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x118, 0x877b78\nLDR             X1, [X20]                                              ; +0x11c, 0x877b7c\nMOV             X0, X20                                                ; +0x120, 0x877b80\nLDR             X1, [X1,#0x580]                                        ; +0x124, 0x877b84\nBLR             X1                                                     ; +0x128, 0x877b88\nB               loc_877AC4                                             ; +0x12c, 0x877b8c\nLDR             S0, [X19,#0x728]; float                                ; +0x130, 0x877b90\nLDR             X0, [X20,#0xE00]; this                                 ; +0x134, 0x877b94\nLDR             S1, [X19,#0x72C]; float                                ; +0x138, 0x877b98\nLDR             W1, [X19,#0x71C]; int                                  ; +0x13c, 0x877b9c\nLDR             W2, [X19,#0x720]; int                                  ; +0x140, 0x877ba0\nLDRB            W3, [X19,#0x724]; bool                                 ; +0x144, 0x877ba4\nLDRB            W4, [X19,#0x725]; bool                                 ; +0x148, 0x877ba8\nLDRB            W5, [X19,#0x739]; bool                                 ; +0x14c, 0x877bac\nBL              _ZN12PlayerObject14rotateGameplayEiibffbb; PlayerObject::rotateGameplay(int,int,bool,float,float,bool,bool) ; +0x150, 0x877bb0\nB               loc_877B2C                                             ; +0x154, 0x877bb4\nBL              .__stack_chk_fail                                      ; +0x158, 0x877bb8", "xrefs": ["<???> @ 0x365e8", "<???> @ 0x1148a98", "<???> @ 0x1155308", "<???> @ 0x1190788"], "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"}