{"type": "func", "start": 4648734, "end": 4648870, "name": "GJBaseGameLayer::switchToFlyMode", "pseudocode": "// \n// GJBaseGameLayer::switchToFlyMode from 0x46ef1e to 0x46efa6 (136 bytes)\n// \n// 4 xrefs:\n// > PlayerObject::loadFromCheckpoint @ 0x35098c\n// > GJBaseGameLayer::setupLevelStart @ 0x491a28\n// > GJBaseGameLayer::setupLevelStart @ 0x491a3e\n// > GJBaseGameLayer::collisionCheckObjects @ 0x492c5c\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::switchToFlyMode(GJBaseGameLayer *a1, PlayerObject *a2, GameObject *a3, bool a4, int a5)\n{\n  GameObject *v8; // r0\n  bool m_hasNoEffects; // r2\n  bool v10; // r2\n  bool v11; // r2\n  bool v12; // r2\n\n  PlayerObject::switchedToMode(a2, (GameObjectType)a5);\n  v8 = GJBaseGameLayer::processCameraObject(a1, a3, a2);\n  switch ( a5 )\n  {\n    case 5:\n      if ( v8 )\n        m_hasNoEffects = v8->m_hasNoEffects;\n      else\n        m_hasNoEffects = 0;\n      PlayerObject::toggleFlyMode(a2, 1, m_hasNoEffects);\n      break;\n    case 19:\n      if ( v8 )\n        v10 = v8->m_hasNoEffects;\n      else\n        v10 = 0;\n      PlayerObject::toggleBirdMode(a2, 1, v10);\n      break;\n    case 41:\n      if ( v8 )\n        v11 = v8->m_hasNoEffects;\n      else\n        v11 = 0;\n      PlayerObject::toggleSwingMode(a2, 1, v11);\n      break;\n    default:\n      if ( v8 )\n        v12 = v8->m_hasNoEffects;\n      else\n        v12 = 0;\n      PlayerObject::toggleDartMode(a2, 1, v12);\n      break;\n  }\n  a1->toggleGlitter(a1, 1);\n}", "assembly": "; \n; GJBaseGameLayer::switchToFlyMode from 0x46ef1e to 0x46efa6 (136 bytes)\n; \n; 4 xrefs:\n; > PlayerObject::loadFromCheckpoint @ 0x35098c\n; > GJBaseGameLayer::setupLevelStart @ 0x491a28\n; > GJBaseGameLayer::setupLevelStart @ 0x491a3e\n; > GJBaseGameLayer::collisionCheckObjects @ 0x492c5c\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.W          {R4-R8,LR}                                             ; +0x0, 0x46ef1e\nMOV             R7, R2                                                 ; +0x4, 0x46ef22\nLDR             R5, [SP,#arg_0]                                        ; +0x6, 0x46ef24\nMOV             R6, R0                                                 ; +0x8, 0x46ef26\nMOV             R4, R1                                                 ; +0xa, 0x46ef28\nMOV             R0, R1                                                 ; +0xc, 0x46ef2a\nMOV             R1, R5                                                 ; +0xe, 0x46ef2c\nBL              _ZN12PlayerObject14switchedToModeE14GameObjectType; PlayerObject::switchedToMode(GameObjectType) ; +0x10, 0x46ef2e\nMOV             R0, R6; this                                           ; +0x14, 0x46ef32\nMOV             R1, R7; GameObject *                                   ; +0x16, 0x46ef34\nMOV             R2, R4; PlayerObject *                                 ; +0x18, 0x46ef36\nBL              _ZN15GJBaseGameLayer19processCameraObjectEP10GameObjectP12PlayerObject; GJBaseGameLayer::processCameraObject(GameObject *,PlayerObject *) ; +0x1a, 0x46ef38\nCMP             R5, #5                                                 ; +0x1e, 0x46ef3c\nBNE             loc_46EF54                                             ; +0x20, 0x46ef3e\nCBZ             R0, loc_46EF48                                         ; +0x22, 0x46ef40\nLDRB.W          R2, [R0,#0x384]                                        ; +0x24, 0x46ef42\nB               loc_46EF4A                                             ; +0x28, 0x46ef46\nMOV             R2, R0; bool                                           ; +0x2a, 0x46ef48\nMOV             R0, R4; this                                           ; +0x2c, 0x46ef4a\nMOVS            R1, #1; bool                                           ; +0x2e, 0x46ef4c\nBL              _ZN12PlayerObject13toggleFlyModeEbb; PlayerObject::toggleFlyMode(bool,bool) ; +0x30, 0x46ef4e\nB               loc_46EF96                                             ; +0x34, 0x46ef52\nCMP             R5, #0x13                                              ; +0x36, 0x46ef54\nBNE             loc_46EF6C                                             ; +0x38, 0x46ef56\nCBZ             R0, loc_46EF60                                         ; +0x3a, 0x46ef58\nLDRB.W          R2, [R0,#0x384]                                        ; +0x3c, 0x46ef5a\nB               loc_46EF62                                             ; +0x40, 0x46ef5e\nMOV             R2, R0; bool                                           ; +0x42, 0x46ef60\nMOV             R0, R4; this                                           ; +0x44, 0x46ef62\nMOVS            R1, #1; bool                                           ; +0x46, 0x46ef64\nBL              _ZN12PlayerObject14toggleBirdModeEbb; PlayerObject::toggleBirdMode(bool,bool) ; +0x48, 0x46ef66\nB               loc_46EF96                                             ; +0x4c, 0x46ef6a\nCMP             R5, #0x29 ; ')'                                        ; +0x4e, 0x46ef6c\nBNE             loc_46EF84                                             ; +0x50, 0x46ef6e\nCBZ             R0, loc_46EF78                                         ; +0x52, 0x46ef70\nLDRB.W          R2, [R0,#0x384]                                        ; +0x54, 0x46ef72\nB               loc_46EF7A                                             ; +0x58, 0x46ef76\nMOV             R2, R0; bool                                           ; +0x5a, 0x46ef78\nMOV             R0, R4; this                                           ; +0x5c, 0x46ef7a\nMOVS            R1, #1; bool                                           ; +0x5e, 0x46ef7c\nBL              _ZN12PlayerObject15toggleSwingModeEbb; PlayerObject::toggleSwingMode(bool,bool) ; +0x60, 0x46ef7e\nB               loc_46EF96                                             ; +0x64, 0x46ef82\nCBZ             R0, loc_46EF8C                                         ; +0x66, 0x46ef84\nLDRB.W          R2, [R0,#0x384]                                        ; +0x68, 0x46ef86\nB               loc_46EF8E                                             ; +0x6c, 0x46ef8a\nMOV             R2, R0; bool                                           ; +0x6e, 0x46ef8c\nMOV             R0, R4; this                                           ; +0x70, 0x46ef8e\nMOVS            R1, #1; bool                                           ; +0x72, 0x46ef90\nBL              _ZN12PlayerObject14toggleDartModeEbb; PlayerObject::toggleDartMode(bool,bool) ; +0x74, 0x46ef92\nLDR             R3, [R6]                                               ; +0x78, 0x46ef96\nMOV             R0, R6                                                 ; +0x7a, 0x46ef98\nMOVS            R1, #1                                                 ; +0x7c, 0x46ef9a\nPOP.W           {R4-R8,LR}                                             ; +0x7e, 0x46ef9c\nLDR.W           R3, [R3,#0x27C]                                        ; +0x82, 0x46efa0\nBX              R3                                                     ; +0x86, 0x46efa4", "xrefs": ["PlayerObject::loadFromCheckpoint @ 0x35098c", "GJBaseGameLayer::setupLevelStart @ 0x491a28", "GJBaseGameLayer::setupLevelStart @ 0x491a3e", "GJBaseGameLayer::collisionCheckObjects @ 0x492c5c"], "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"}