{"type": "func", "start": 4296969768, "end": 4296970124, "name": "GJBaseGameLayer::toggleFlipped", "pseudocode": "// \n// GJBaseGameLayer::toggleFlipped from 0x1001e8e28 to 0x1001e8f8c (356 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e856c\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e89e4\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 __fastcall GJBaseGameLayer::toggleFlipped(GJBaseGameLayer *a1, bool a2, bool a3)\n{\n  _BOOL4 v4; // w20\n  float v6; // s0\n  PlayerObject *m_player1; // x0\n  float m_levelFlipping; // s0\n  float v9; // s8\n  float v11; // w8\n\n  if ( a1->m_gameState.m_unkBool10 == a2 )\n    return;\n  v4 = a2;\n  a1->m_gameState.m_unkBool10 = a2;\n  PlayerObject::deactivateStreak(a1->m_player1, 1);\n  if ( a3 )\n  {\n    v6 = 0.0;\n    if ( v4 )\n      v6 = 1.0;\n    a1->m_gameState.m_unkBool11 = 0;\n    a1->m_gameState.m_levelFlipping = v6;\n    return;\n  }\n  m_player1 = a1->m_player1;\n  if ( !v4 )\n  {\n    PlayerObject::spawnPortalCircle(m_player1, (cocos2d::ccColor3B)-256, 50.0);\n    a1->m_gameState.m_unkBool11 = 0;\n    m_levelFlipping = a1->m_gameState.m_levelFlipping;\n    v9 = 0.0;\n    if ( m_levelFlipping != 0.0 && m_levelFlipping != 1.0 )\n      goto LABEL_20;\n    v11 = 0.99999;\nLABEL_19:\n    a1->m_gameState.m_levelFlipping = v11;\n    goto LABEL_25;\n  }\n  PlayerObject::spawnPortalCircle(m_player1, (cocos2d::ccColor3B)38655, 50.0);\n  a1->m_gameState.m_unkBool11 = 0;\n  m_levelFlipping = a1->m_gameState.m_levelFlipping;\n  v9 = 1.0;\n  if ( m_levelFlipping == 0.0 || m_levelFlipping == 1.0 )\n  {\n    v11 = 0.00001;\n    goto LABEL_19;\n  }\nLABEL_20:\n  if ( a1->m_gameState.m_unkBool10 )\n  {\n    if ( m_levelFlipping >= 0.5 )\n      goto LABEL_25;\n    goto LABEL_24;\n  }\n  if ( m_levelFlipping > 0.5 )\nLABEL_24:\n    a1->m_gameState.m_unkBool11 = 1;\nLABEL_25:\n  PlayerObject::levelWillFlip(a1->m_player1);\n  if ( a1->m_gameState.m_isDualMode )\n    PlayerObject::levelWillFlip(a1->m_player2);\n  GJGameState::tweenValue(&a1->m_gameState, a1->m_gameState.m_levelFlipping, v9, 7, 0.4, 1, 1.2, -1, -1);\n  a1->m_gameState.m_unkBool12 = 1;\n}", "assembly": "; \n; GJBaseGameLayer::toggleFlipped from 0x1001e8e28 to 0x1001e8f8c (356 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1001e856c\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1001e89e4\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\nLDRB            W8, [X0,#0x3E8]                                        ; +0x0, 0x1001e8e28\nCMP             W8, W1                                                 ; +0x4, 0x1001e8e2c\nB.EQ            locret_1001E8F88                                       ; +0x8, 0x1001e8e30\nSTP             D9, D8, [SP,#var_40]!                                  ; +0xc, 0x1001e8e34\nSTP             X22, X21, [SP,#0x40+var_30]                            ; +0x10, 0x1001e8e38\nSTP             X20, X19, [SP,#0x40+var_20]                            ; +0x14, 0x1001e8e3c\nSTP             X29, X30, [SP,#0x40+var_10]                            ; +0x18, 0x1001e8e40\nADD             X29, SP, #0x40+var_10                                  ; +0x1c, 0x1001e8e44\nMOV             X21, X2                                                ; +0x20, 0x1001e8e48\nMOV             X20, X1                                                ; +0x24, 0x1001e8e4c\nMOV             X19, X0                                                ; +0x28, 0x1001e8e50\nSTRB            W1, [X0,#0x3E8]                                        ; +0x2c, 0x1001e8e54\nLDR             X0, [X0,#0xCC8]                                        ; +0x30, 0x1001e8e58\nMOV             W1, #1                                                 ; +0x34, 0x1001e8e5c\nBL              PlayerObject__deactivateStreak                         ; +0x38, 0x1001e8e60\nTBZ             W21, #0, loc_1001E8E84                                 ; +0x3c, 0x1001e8e64\nCMP             W20, #0                                                ; +0x40, 0x1001e8e68\nFMOV            S0, WZR                                                ; +0x44, 0x1001e8e6c\nFMOV            S1, #1.0                                               ; +0x48, 0x1001e8e70\nFCSEL           S0, S1, S0, NE                                         ; +0x4c, 0x1001e8e74\nSTRB            WZR, [X19,#0x3F0]                                      ; +0x50, 0x1001e8e78\nSTR             S0, [X19,#0x3EC]                                       ; +0x54, 0x1001e8e7c\nB               loc_1001E8F78                                          ; +0x58, 0x1001e8e80\nLDR             X0, [X19,#0xCC8]                                       ; +0x5c, 0x1001e8e84\nMOV             W8, #0x42480000                                        ; +0x60, 0x1001e8e88\nFMOV            S0, W8                                                 ; +0x64, 0x1001e8e8c\nTBZ             W20, #0, loc_1001E8EC4                                 ; +0x68, 0x1001e8e90\nMOV             W1, #0x96FF                                            ; +0x6c, 0x1001e8e94\nBL              PlayerObject__spawnPortalCircle                        ; +0x70, 0x1001e8e98\nSTRB            WZR, [X19,#0x3F0]                                      ; +0x74, 0x1001e8e9c\nLDR             S0, [X19,#0x3EC]                                       ; +0x78, 0x1001e8ea0\nFMOV            S8, #1.0                                               ; +0x7c, 0x1001e8ea4\nFCMP            S0, #0.0                                               ; +0x80, 0x1001e8ea8\nFMOV            S1, #1.0                                               ; +0x84, 0x1001e8eac\nFCCMP           S0, S1, #4, NE                                         ; +0x88, 0x1001e8eb0\nB.NE            loc_1001E8EF8                                          ; +0x8c, 0x1001e8eb4\nMOV             W8, #0x3727C5AC                                        ; +0x90, 0x1001e8eb8\nB               loc_1001E8EF0                                          ; +0x98, 0x1001e8ec0\nMOV             W1, #0xFFFF00                                          ; +0x9c, 0x1001e8ec4\nBL              PlayerObject__spawnPortalCircle                        ; +0xa0, 0x1001e8ec8\nSTRB            WZR, [X19,#0x3F0]                                      ; +0xa4, 0x1001e8ecc\nLDR             S0, [X19,#0x3EC]                                       ; +0xa8, 0x1001e8ed0\nFMOV            S8, WZR                                                ; +0xac, 0x1001e8ed4\nFCMP            S0, #0.0                                               ; +0xb0, 0x1001e8ed8\nFMOV            S1, #1.0                                               ; +0xb4, 0x1001e8edc\nFCCMP           S0, S1, #4, NE                                         ; +0xb8, 0x1001e8ee0\nB.NE            loc_1001E8EF8                                          ; +0xbc, 0x1001e8ee4\nMOV             W8, #0x3F7FFF58                                        ; +0xc0, 0x1001e8ee8\nSTR             W8, [X19,#0x3EC]                                       ; +0xc8, 0x1001e8ef0\nB               loc_1001E8F24                                          ; +0xcc, 0x1001e8ef4\nLDRB            W8, [X19,#0x3E8]                                       ; +0xd0, 0x1001e8ef8\nTBZ             W8, #0, loc_1001E8F10                                  ; +0xd4, 0x1001e8efc\nFMOV            S1, #0.5                                               ; +0xd8, 0x1001e8f00\nFCMP            S0, S1                                                 ; +0xdc, 0x1001e8f04\nB.MI            loc_1001E8F1C                                          ; +0xe0, 0x1001e8f08\nB               loc_1001E8F24                                          ; +0xe4, 0x1001e8f0c\nFMOV            S1, #0.5                                               ; +0xe8, 0x1001e8f10\nFCMP            S0, S1                                                 ; +0xec, 0x1001e8f14\nB.LE            loc_1001E8F24                                          ; +0xf0, 0x1001e8f18\nMOV             W8, #1                                                 ; +0xf4, 0x1001e8f1c\nSTRB            W8, [X19,#0x3F0]                                       ; +0xf8, 0x1001e8f20\nLDR             X0, [X19,#0xCC8]                                       ; +0xfc, 0x1001e8f24\nBL              PlayerObject__levelWillFlip                            ; +0x100, 0x1001e8f28\nLDRB            W8, [X19,#0x3F2]                                       ; +0x104, 0x1001e8f2c\nCMP             W8, #1                                                 ; +0x108, 0x1001e8f30\nB.NE            loc_1001E8F40                                          ; +0x10c, 0x1001e8f34\nLDR             X0, [X19,#0xCD0]                                       ; +0x110, 0x1001e8f38\nBL              PlayerObject__levelWillFlip                            ; +0x114, 0x1001e8f3c\nLDR             S0, [X19,#0x3EC]                                       ; +0x118, 0x1001e8f40\nADRP            X8, #dword_10063537C@PAGE                              ; +0x11c, 0x1001e8f44\nLDR             S2, [X8,#dword_10063537C@PAGEOFF]                      ; +0x120, 0x1001e8f48\nADRP            X8, #dword_100635350@PAGE                              ; +0x124, 0x1001e8f4c\nMOV             W20, #1                                                ; +0x128, 0x1001e8f50\nADD             X0, X19, #0x1A8                                        ; +0x12c, 0x1001e8f54\nLDR             S3, [X8,#dword_100635350@PAGEOFF]                      ; +0x130, 0x1001e8f58\nFMOV            S1, S8                                                 ; +0x134, 0x1001e8f5c\nMOV             W1, #7                                                 ; +0x138, 0x1001e8f60\nMOV             W2, #1                                                 ; +0x13c, 0x1001e8f64\nMOV             W3, #0xFFFFFFFF                                        ; +0x140, 0x1001e8f68\nMOV             W4, #0xFFFFFFFF                                        ; +0x144, 0x1001e8f6c\nBL              GJGameState__tweenValue                                ; +0x148, 0x1001e8f70\nSTRB            W20, [X19,#0x3F1]                                      ; +0x14c, 0x1001e8f74\nLDP             X29, X30, [SP,#0x40+var_10]                            ; +0x150, 0x1001e8f78\nLDP             X20, X19, [SP,#0x40+var_20]                            ; +0x154, 0x1001e8f7c\nLDP             X22, X21, [SP,#0x40+var_30]                            ; +0x158, 0x1001e8f80\nLDP             D9, D8, [SP+0x40+var_40],#0x40                         ; +0x15c, 0x1001e8f84\nRET                                                                    ; +0x160, 0x1001e8f88", "xrefs": ["GJBaseGameLayer::collisionCheckObjects @ 0x1001e856c", "GJBaseGameLayer::collisionCheckObjects @ 0x1001e89e4"], "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"}