{"type": "func", "start": 4723704, "end": 4723970, "name": "GJBaseGameLayer::rotateGameplay", "pseudocode": "// \n// GJBaseGameLayer::rotateGameplay from 0x4813f8 to 0x481502 (266 bytes)\n// \n// 0 xrefs:\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  int m_groundDirection; // r6\n  bool v5; // r6\n  const cocos2d::CCPoint *v6; // r0\n  cocos2d::CCPoint v7; // [sp+14h] [bp-1Ch] BYREF\n  _BYTE v8[8]; // [sp+1Ch] [bp-14h] BYREF\n  _BYTE v9[8]; // [sp+24h] [bp-Ch] BYREF\n\n  if ( a2->m_changeChannel )\n  {\n    a1->m_gameState.m_currentChannel = a2->m_targetChannelID;\n    m_groundDirection = a2->m_groundDirection;\n    v5 = m_groundDirection == 3 || m_groundDirection == 2;\n    *(_BYTE *)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                &a1->m_gameState.m_spawnChannelRelated1._M_h._M_buckets,\n                (unsigned int *)&a1->m_gameState.m_currentChannel) = v5;\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    v6 = a1->m_player1->getPosition(a1->m_player1);\n    cocos2d::CCPoint::CCPoint(&v7, v6);\n    a2->getRealPosition((cocos2d::CCPoint *)v8, a2);\n    cocos2d::CCPoint::operator-(v9, &v7, v8);\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 0x4813f8 to 0x481502 (266 bytes)\n; \n; 0 xrefs:\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x481402)                ; +0x0, 0x4813f8\nPUSH.W          {R4-R8,LR}                                             ; +0x2, 0x4813fa\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x4813fe\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x481400\nSUB             SP, SP, #0x30                                          ; +0xa, 0x481402\nMOV             R5, R0                                                 ; +0xc, 0x481404\nLDR             R2, [R3]                                               ; +0xe, 0x481406\nMOV             R4, R1                                                 ; +0x10, 0x481408\nMOV             R7, R3                                                 ; +0x12, 0x48140a\nSTR             R2, [SP,#0x30+var_4]                                   ; +0x14, 0x48140c\nLDRB.W          R2, [R1,#0x678]                                        ; +0x16, 0x48140e\nCBZ             R2, loc_48143C                                         ; +0x1a, 0x481412\nLDR.W           R3, [R1,#0x67C]                                        ; +0x1c, 0x481414\nSTR.W           R3, [R0,#0x2DC]                                        ; +0x20, 0x481418\nLDR.W           R6, [R1,#0x668]                                        ; +0x24, 0x48141c\nCMP             R6, #3                                                 ; +0x28, 0x481420\nBEQ             loc_48142C                                             ; +0x2a, 0x481422\nSUBS            R3, R6, #2                                             ; +0x2c, 0x481424\nNEGS            R6, R3                                                 ; +0x2e, 0x481426\nADCS            R6, R3                                                 ; +0x30, 0x481428\nB               loc_48142E                                             ; +0x32, 0x48142a\nMOVS            R6, #1                                                 ; +0x34, 0x48142c\nADD.W           R0, R5, #0x300                                         ; +0x36, 0x48142e\nADD.W           R1, R5, #0x2DC                                         ; +0x3a, 0x481432\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&) ; +0x3e, 0x481436\nSTRB            R6, [R0]                                               ; +0x42, 0x48143a\nLDRB.W          R3, [R4,#0x679]                                        ; +0x44, 0x48143c\nCMP             R3, #0                                                 ; +0x48, 0x481440\nBNE             loc_4814DE                                             ; +0x4a, 0x481442\nADD.W           R8, R4, #0x670                                         ; +0x4c, 0x481444\nADDW            R6, R4, #0x674                                         ; +0x50, 0x481448\nLDRB.W          R3, [R4,#0x66C]; bool                                  ; +0x54, 0x48144c\nLDR.W           R2, [R8]                                               ; +0x58, 0x481450\nLDR.W           R0, [R5,#0x8B8]; this                                  ; +0x5c, 0x481454\nLDR.W           R1, [R4,#0x664]; int                                   ; +0x60, 0x481458\nSTR             R2, [SP,#0x30+var_30]; float                           ; +0x64, 0x48145c\nLDR             R2, [R6]                                               ; +0x66, 0x48145e\nSTR             R2, [SP,#0x30+var_2C]; float                           ; +0x68, 0x481460\nLDRB.W          R2, [R4,#0x66D]                                        ; +0x6a, 0x481462\nSTR             R2, [SP,#0x30+var_28]; bool                            ; +0x6e, 0x481466\nLDRB.W          R2, [R4,#0x681]                                        ; +0x70, 0x481468\nSTR             R2, [SP,#0x30+var_24]; bool                            ; +0x74, 0x48146c\nLDR.W           R2, [R4,#0x668]; int                                   ; +0x76, 0x48146e\nBL              _ZN12PlayerObject14rotateGameplayEiibffbb; PlayerObject::rotateGameplay(int,int,bool,float,float,bool,bool) ; +0x7a, 0x481472\nLDRB.W          R3, [R5,#0x372]                                        ; +0x7e, 0x481476\nCBZ             R3, loc_4814A6                                         ; +0x82, 0x48147a\nLDR.W           R2, [R8]                                               ; +0x84, 0x48147c\nLDRB.W          R3, [R4,#0x66C]; bool                                  ; +0x88, 0x481480\nLDR.W           R0, [R5,#0x8BC]; this                                  ; +0x8c, 0x481484\nSTR             R2, [SP,#0x30+var_30]; float                           ; +0x90, 0x481488\nLDR             R2, [R6]                                               ; +0x92, 0x48148a\nLDR.W           R1, [R4,#0x664]; int                                   ; +0x94, 0x48148c\nSTR             R2, [SP,#0x30+var_2C]; float                           ; +0x98, 0x481490\nLDRB.W          R2, [R4,#0x66D]                                        ; +0x9a, 0x481492\nSTR             R2, [SP,#0x30+var_28]; bool                            ; +0x9e, 0x481496\nLDRB.W          R2, [R4,#0x681]                                        ; +0xa0, 0x481498\nSTR             R2, [SP,#0x30+var_24]; bool                            ; +0xa4, 0x48149c\nLDR.W           R2, [R4,#0x668]; int                                   ; +0xa6, 0x48149e\nBL              _ZN12PlayerObject14rotateGameplayEiibffbb; PlayerObject::rotateGameplay(int,int,bool,float,float,bool,bool) ; +0xaa, 0x4814a2\nLDR.W           R0, [R5,#0x8B8]                                        ; +0xae, 0x4814a6\nADD.W           R8, SP, #0x30+var_1C                                   ; +0xb2, 0x4814aa\nADD             R6, SP, #0x30+var_14                                   ; +0xb6, 0x4814ae\nLDR             R3, [R0]                                               ; +0xb8, 0x4814b0\nLDR             R3, [R3,#0x60]                                         ; +0xba, 0x4814b2\nBLX             R3                                                     ; +0xbc, 0x4814b4\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0xbe, 0x4814b6\nMOV             R0, R8; this                                           ; +0xc0, 0x4814b8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xc2, 0x4814ba\nLDR             R3, [R4]                                               ; +0xc6, 0x4814be\nMOV             R0, R6                                                 ; +0xc8, 0x4814c0\nMOV             R1, R4                                                 ; +0xca, 0x4814c2\nLDR.W           R3, [R3,#0x2A0]                                        ; +0xcc, 0x4814c4\nBLX             R3                                                     ; +0xd0, 0x4814c8\nADD             R0, SP, #0x30+var_C                                    ; +0xd2, 0x4814ca\nMOV             R1, R8                                                 ; +0xd4, 0x4814cc\nMOV             R2, R6                                                 ; +0xd6, 0x4814ce\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xd8, 0x4814d0\nLDR             R3, [R5]                                               ; +0xdc, 0x4814d4\nMOV             R0, R5                                                 ; +0xde, 0x4814d6\nLDR.W           R3, [R3,#0x2C0]                                        ; +0xe0, 0x4814d8\nBLX             R3                                                     ; +0xe4, 0x4814dc\nLDRB.W          R3, [R4,#0x680]                                        ; +0xe6, 0x4814de\nCBZ             R3, loc_4814F0                                         ; +0xea, 0x4814e2\nMOV.W           R3, #0x3F800000                                        ; +0xec, 0x4814e4\nSTR.W           R3, [R5,#0x254]                                        ; +0xf0, 0x4814e8\nSTR.W           R3, [R5,#0x258]                                        ; +0xf4, 0x4814ec\nLDR             R2, [SP,#0x30+var_4]                                   ; +0xf8, 0x4814f0\nLDR             R3, [R7]                                               ; +0xfa, 0x4814f2\nCMP             R2, R3                                                 ; +0xfc, 0x4814f4\nBEQ             loc_4814FC                                             ; +0xfe, 0x4814f6\nBLX             __stack_chk_fail                                       ; +0x100, 0x4814f8\nADD             SP, SP, #0x30 ; '0'                                    ; +0x104, 0x4814fc\nPOP.W           {R4-R8,PC}                                             ; +0x106, 0x4814fe", "xrefs": [], "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"}