{"type": "func", "start": 4298930304, "end": 4298930712, "name": "EditorUI::onPlaytest", "pseudocode": "// \n// EditorUI::onPlaytest from 0x1003c7880 to 0x1003c7a18 (408 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onPlaytest @ 0x1003c79e8\n// > EditorUI::keyDown @ 0x1003fa184\n// > EditorUI::init @ 0x1003c5a48\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 EditorUI::onPlaytest(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *m_editorLayer; // x0\n  PlaybackMode m_playbackMode; // w23\n  PlaybackMode v6; // w8\n  LevelEditorLayer *v7; // x0\n  PlaybackMode v8; // w8\n  GameManager *v9; // x0\n  _BOOL4 GameVariable; // w21\n  __int64 v11; // x22\n  PlaybackMode v12; // w24\n  cocos2d::CCSpriteFrameCache *v13; // x0\n  const char *v14; // x1\n  cocos2d::CCSpriteFrame *v15; // x0\n\n  if ( a1->m_isPaused )\n    return;\n  m_editorLayer = a1->m_editorLayer;\n  m_playbackMode = m_editorLayer->m_playbackMode;\n  if ( m_playbackMode == Playing )\n  {\n    a1->m_isPlayingMusic = 0;\n  }\n  else\n  {\n    GJBaseGameLayer::pauseAudio(m_editorLayer);\n    v6 = a1->m_editorLayer->m_playbackMode;\n    a1->m_isPlayingMusic = 0;\n    if ( v6 != Playing )\n      EditorUI::toggleMode(a1, a1->m_editModeBtn);\n  }\n  EditorUI::deselectAll(a1);\n  v7 = a1->m_editorLayer;\n  v8 = v7->m_playbackMode;\n  if ( v8 )\n  {\n    if ( v8 == Paused )\n    {\n      LevelEditorLayer::onResumePlaytest(v7);\n    }\n    else if ( v8 == Playing )\n    {\n      LevelEditorLayer::onPausePlaytest(v7);\n    }\n    goto LABEL_13;\n  }\n  a1->m_editorZoom = ((float (__fastcall *)(cocos2d::CCLayer *))v7->m_objectLayer->getScale)(v7->m_objectLayer);\n  LevelEditorLayer::onPlaytest(a1->m_editorLayer);\n  if ( !a1->m_editorLayer->m_startPosObject )\n  {\nLABEL_13:\n    GameVariable = 0;\n    goto LABEL_14;\n  }\n  v9 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v9, \"0150\");\nLABEL_14:\n  EditorUI::showUI(a1, a1->m_editorLayer->m_playbackMode != Playing);\n  v11 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_playtestBtn->getNormalImage)(a1->m_playtestBtn);\n  v12 = a1->m_editorLayer->m_playbackMode;\n  v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  if ( v12 == Playing )\n    v14 = \"GJ_pauseEditorBtn_001.png\";\n  else\n    v14 = \"GJ_playEditorBtn_001.png\";\n  v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, v14);\n  (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v11 + 1144LL))(v11, v15);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_playtestStopBtn->setVisible)(a1->m_playtestStopBtn, 1);\n  EditorUI::updatePlaybackBtn(a1);\n  if ( GameVariable )\n    EditorUI::onPlaytest(a1, a2);\n  if ( m_playbackMode != Playing )\n    a1->m_editorLayer->m_audioPaused = 1;\n}", "assembly": "; \n; EditorUI::onPlaytest from 0x1003c7880 to 0x1003c7a18 (408 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onPlaytest @ 0x1003c79e8\n; > EditorUI::keyDown @ 0x1003fa184\n; > EditorUI::init @ 0x1003c5a48\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,#0x588]                                        ; +0x0, 0x1003c7880\nTBNZ            W8, #0, locret_1003C7A14                               ; +0x4, 0x1003c7884\nSTP             X24, X23, [SP,#-0x10+var_30]!                          ; +0x8, 0x1003c7888\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0xc, 0x1003c788c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x10, 0x1003c7890\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x14, 0x1003c7894\nADD             X29, SP, #0x30                                         ; +0x18, 0x1003c7898\nMOV             X20, X1                                                ; +0x1c, 0x1003c789c\nMOV             X19, X0                                                ; +0x20, 0x1003c78a0\nLDR             X0, [X0,#0x4E8]                                        ; +0x24, 0x1003c78a4\nLDR             W23, [X0,#0x798]                                       ; +0x28, 0x1003c78a8\nCMP             W23, #1                                                ; +0x2c, 0x1003c78ac\nB.NE            loc_1003C78BC                                          ; +0x30, 0x1003c78b0\nSTRB            WZR, [X19,#0x240]                                      ; +0x34, 0x1003c78b4\nB               loc_1003C78E0                                          ; +0x38, 0x1003c78b8\nBL              GJBaseGameLayer__pauseAudio                            ; +0x3c, 0x1003c78bc\nLDR             X8, [X19,#0x4E8]                                       ; +0x40, 0x1003c78c0\nLDR             W8, [X8,#0x798]                                        ; +0x44, 0x1003c78c4\nSTRB            WZR, [X19,#0x240]                                      ; +0x48, 0x1003c78c8\nCMP             W8, #1                                                 ; +0x4c, 0x1003c78cc\nB.EQ            loc_1003C78E0                                          ; +0x50, 0x1003c78d0\nLDR             X1, [X19,#0x350]                                       ; +0x54, 0x1003c78d4\nMOV             X0, X19                                                ; +0x58, 0x1003c78d8\nBL              EditorUI__toggleMode                                   ; +0x5c, 0x1003c78dc\nMOV             X0, X19                                                ; +0x60, 0x1003c78e0\nBL              EditorUI__deselectAll                                  ; +0x64, 0x1003c78e4\nLDR             X0, [X19,#0x4E8]                                       ; +0x68, 0x1003c78e8\nLDR             W8, [X0,#0x798]                                        ; +0x6c, 0x1003c78ec\nCBZ             W8, loc_1003C7914                                      ; +0x70, 0x1003c78f0\nCMP             W8, #2                                                 ; +0x74, 0x1003c78f4\nB.EQ            loc_1003C790C                                          ; +0x78, 0x1003c78f8\nCMP             W8, #1                                                 ; +0x7c, 0x1003c78fc\nB.NE            loc_1003C7954                                          ; +0x80, 0x1003c7900\nBL              LevelEditorLayer__onPausePlaytest                      ; +0x84, 0x1003c7904\nB               loc_1003C7954                                          ; +0x88, 0x1003c7908\nBL              LevelEditorLayer__onResumePlaytest                     ; +0x8c, 0x1003c790c\nB               loc_1003C7954                                          ; +0x90, 0x1003c7910\nLDR             X0, [X0,#0xEE0]                                        ; +0x94, 0x1003c7914\nLDR             X8, [X0]                                               ; +0x98, 0x1003c7918\nLDR             X8, [X8,#0xA8]                                         ; +0x9c, 0x1003c791c\nBLR             X8                                                     ; +0xa0, 0x1003c7920\nSTR             S0, [X19,#0x584]                                       ; +0xa4, 0x1003c7924\nLDR             X0, [X19,#0x4E8]                                       ; +0xa8, 0x1003c7928\nBL              LevelEditorLayer__onPlaytest                           ; +0xac, 0x1003c792c\nLDR             X8, [X19,#0x4E8]                                       ; +0xb0, 0x1003c7930\nLDR             X8, [X8,#0x3018]                                       ; +0xb4, 0x1003c7934\nCBZ             X8, loc_1003C7954                                      ; +0xb8, 0x1003c7938\nBL              GameManager__sharedState                               ; +0xbc, 0x1003c793c\nADRL            X1, a0150; \"0150\"                                      ; +0xc0, 0x1003c7940\nBL              GameManager__getGameVariable                           ; +0xc8, 0x1003c7948\nMOV             X21, X0                                                ; +0xcc, 0x1003c794c\nB               loc_1003C7958                                          ; +0xd0, 0x1003c7950\nMOV             W21, #0                                                ; +0xd4, 0x1003c7954\nLDR             X8, [X19,#0x4E8]                                       ; +0xd8, 0x1003c7958\nLDR             W8, [X8,#0x798]                                        ; +0xdc, 0x1003c795c\nCMP             W8, #1                                                 ; +0xe0, 0x1003c7960\nCSET            W1, NE                                                 ; +0xe4, 0x1003c7964\nMOV             X0, X19                                                ; +0xe8, 0x1003c7968\nBL              EditorUI__showUI                                       ; +0xec, 0x1003c796c\nLDR             X0, [X19,#0x388]                                       ; +0xf0, 0x1003c7970\nLDR             X8, [X0]                                               ; +0xf4, 0x1003c7974\nLDR             X8, [X8,#0x420]                                        ; +0xf8, 0x1003c7978\nBLR             X8                                                     ; +0xfc, 0x1003c797c\nMOV             X22, X0                                                ; +0x100, 0x1003c7980\nLDR             X8, [X19,#0x4E8]                                       ; +0x104, 0x1003c7984\nLDR             W24, [X8,#0x798]                                       ; +0x108, 0x1003c7988\nBL              cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache    ; +0x10c, 0x1003c798c\nADRL            X8, aGjPlayeditorbt; \"GJ_playEditorBtn_001.png\"        ; +0x110, 0x1003c7990\nADRL            X9, aGjPauseeditorb; \"GJ_pauseEditorBtn_001.png\"       ; +0x118, 0x1003c7998\nCMP             W24, #1                                                ; +0x120, 0x1003c79a0\nCSEL            X1, X9, X8, EQ                                         ; +0x124, 0x1003c79a4\nBL              cocos2d__CCSpriteFrameCache__spriteFrameByName         ; +0x128, 0x1003c79a8\nMOV             X1, X0                                                 ; +0x12c, 0x1003c79ac\nLDR             X8, [X22]                                              ; +0x130, 0x1003c79b0\nLDR             X8, [X8,#0x478]                                        ; +0x134, 0x1003c79b4\nMOV             X0, X22                                                ; +0x138, 0x1003c79b8\nBLR             X8                                                     ; +0x13c, 0x1003c79bc\nLDR             X0, [X19,#0x390]                                       ; +0x140, 0x1003c79c0\nLDR             X8, [X0]                                               ; +0x144, 0x1003c79c4\nLDR             X8, [X8,#0x148]                                        ; +0x148, 0x1003c79c8\nMOV             W1, #1                                                 ; +0x14c, 0x1003c79cc\nBLR             X8                                                     ; +0x150, 0x1003c79d0\nMOV             X0, X19                                                ; +0x154, 0x1003c79d4\nBL              EditorUI__updatePlaybackBtn                            ; +0x158, 0x1003c79d8\nCBZ             W21, loc_1003C79EC                                     ; +0x15c, 0x1003c79dc\nMOV             X0, X19                                                ; +0x160, 0x1003c79e0\nMOV             X1, X20                                                ; +0x164, 0x1003c79e4\nBL              EditorUI__onPlaytest                                   ; +0x168, 0x1003c79e8\nCMP             W23, #1                                                ; +0x16c, 0x1003c79ec\nB.EQ            loc_1003C7A04                                          ; +0x170, 0x1003c79f0\nLDR             X8, [X19,#0x4E8]                                       ; +0x174, 0x1003c79f4\nMOV             W9, #0x3566                                            ; +0x178, 0x1003c79f8\nMOV             W10, #1                                                ; +0x17c, 0x1003c79fc\nSTRB            W10, [X8,X9]                                           ; +0x180, 0x1003c7a00\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x184, 0x1003c7a04\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x188, 0x1003c7a08\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x18c, 0x1003c7a0c\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0x190, 0x1003c7a10\nRET                                                                    ; +0x194, 0x1003c7a14", "xrefs": ["EditorUI::onPlaytest @ 0x1003c79e8", "EditorUI::keyDown @ 0x1003fa184", "EditorUI::init @ 0x1003c5a48"], "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"}