{"type": "func", "start": 4295017744, "end": 4295018274, "name": "EditorUI::onPlaytest", "pseudocode": "// \n// EditorUI::onPlaytest from 0x10000c510 to 0x10000c722 (530 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onPlaytest @ 0x10000c6fa\n// > EditorUI::keyDown @ 0x100050de2\n// > EditorUI::init @ 0x10000a06d\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; // rdi\n  PlaybackMode m_playbackMode; // r13d\n  bool v5; // zf\n  int v6; // eax\n  unsigned int v7; // eax\n  const char *v8; // r15\n  __int64 v9; // rdi\n  __int64 v10; // r12\n  cocos2d::CCSpriteFrameCache *v11; // rax\n  cocos2d::CCSpriteFrame *v12; // rax\n  LevelEditorLayer *v13; // rdi\n  PlaybackMode v14; // eax\n  GameManager *v15; // rax\n  bool GameVariable; // r15\n  __int64 v17; // r12\n  PlaybackMode v18; // r14d\n  cocos2d::CCSpriteFrameCache *v19; // rax\n  const char *v20; // rsi\n  cocos2d::CCSpriteFrame *v21; // rax\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    v5 = a1->m_editorLayer->m_playbackMode == Playing;\n    a1->m_isPlayingMusic = 0;\n    if ( !v5 )\n    {\n      v6 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_editModeBtn->getTag)(a1->m_editModeBtn);\n      if ( a1->m_selectedMode != v6 )\n      {\n        a1->m_selectedMode = v6;\n        EditorUI::resetUI(a1);\n        v7 = a1->m_selectedMode - 1;\n        if ( v7 <= 2 )\n        {\n          v8 = off_1008B1FA8[v7];\n          v9 = *((_QWORD *)&a1->m_deleteModeBtn + v7);\n          v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1056LL))(v9);\n          v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n          v12 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, v8);\n          (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v10 + 1144LL))(v10, v12);\n        }\n      }\n    }\n  }\n  EditorUI::deselectAll(a1);\n  v13 = a1->m_editorLayer;\n  v14 = v13->m_playbackMode;\n  if ( v14 )\n  {\n    if ( v14 == Paused )\n    {\n      LevelEditorLayer::onResumePlaytest(v13);\n    }\n    else if ( v14 == Playing )\n    {\n      LevelEditorLayer::onPausePlaytest(v13);\n    }\n    goto LABEL_15;\n  }\n  a1->m_editorZoom = ((float (__fastcall *)(cocos2d::CCLayer *))v13->m_objectLayer->getScale)(v13->m_objectLayer);\n  LevelEditorLayer::onPlaytest(a1->m_editorLayer);\n  if ( !a1->m_editorLayer->m_startPosObject )\n  {\nLABEL_15:\n    GameVariable = 0;\n    goto LABEL_16;\n  }\n  v15 = GameManager::sharedState();\n  GameVariable = GameManager::getGameVariable(v15, \"0150\");\nLABEL_16:\n  EditorUI::showUI(a1, a1->m_editorLayer->m_playbackMode != Playing);\n  v17 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_playtestBtn->getNormalImage)(a1->m_playtestBtn);\n  v18 = a1->m_editorLayer->m_playbackMode;\n  v19 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  v20 = \"GJ_playEditorBtn_001.png\";\n  if ( v18 == Playing )\n    v20 = \"GJ_pauseEditorBtn_001.png\";\n  v21 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v20);\n  (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v17 + 1144LL))(v17, v21);\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 0x10000c510 to 0x10000c722 (530 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onPlaytest @ 0x10000c6fa\n; > EditorUI::keyDown @ 0x100050de2\n; > EditorUI::init @ 0x10000a06d\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\ncmp     byte ptr [rdi+588h], 0                                         ; +0x0, 0x10000c510\njnz     locret_10000C721                                               ; +0x7, 0x10000c517\npush    rbp                                                            ; +0xd, 0x10000c51d\nmov     rbp, rsp                                                       ; +0xe, 0x10000c51e\npush    r15                                                            ; +0x11, 0x10000c521\npush    r14                                                            ; +0x13, 0x10000c523\npush    r13                                                            ; +0x15, 0x10000c525\npush    r12                                                            ; +0x17, 0x10000c527\npush    rbx                                                            ; +0x19, 0x10000c529\npush    rax                                                            ; +0x1a, 0x10000c52a\nmov     rbx, rdi                                                       ; +0x1b, 0x10000c52b\nmov     rdi, [rdi+4E8h]                                                ; +0x1e, 0x10000c52e\nmov     r13d, [rdi+798h]                                               ; +0x25, 0x10000c535\ncmp     r13d, 1                                                        ; +0x2c, 0x10000c53c\nmov     [rbp-30h], rsi                                                 ; +0x30, 0x10000c540\njnz     short loc_10000C552                                            ; +0x34, 0x10000c544\nmov     byte ptr [rbx+240h], 0                                         ; +0x36, 0x10000c546\njmp     loc_10000C5DF                                                  ; +0x3d, 0x10000c54d\ncall    GJBaseGameLayer__pauseAudio                                    ; +0x42, 0x10000c552\nmov     rax, [rbx+4E8h]                                                ; +0x47, 0x10000c557\ncmp     dword ptr [rax+798h], 1                                        ; +0x4e, 0x10000c55e\nmov     byte ptr [rbx+240h], 0                                         ; +0x55, 0x10000c565\njz      short loc_10000C5DF                                            ; +0x5c, 0x10000c56c\nmov     rdi, [rbx+350h]                                                ; +0x5e, 0x10000c56e\nmov     rax, [rdi]                                                     ; +0x65, 0x10000c575\ncall    qword ptr [rax+40h]                                            ; +0x68, 0x10000c578\ncmp     [rbx+4E0h], eax                                                ; +0x6b, 0x10000c57b\njz      short loc_10000C5DF                                            ; +0x71, 0x10000c581\nmov     [rbx+4E0h], eax                                                ; +0x73, 0x10000c583\nmov     rdi, rbx                                                       ; +0x79, 0x10000c589\ncall    EditorUI__resetUI                                              ; +0x7c, 0x10000c58c\nmov     eax, [rbx+4E0h]                                                ; +0x81, 0x10000c591\ndec     eax                                                            ; +0x87, 0x10000c597\ncmp     eax, 2                                                         ; +0x89, 0x10000c599\nja      short loc_10000C5DF                                            ; +0x8c, 0x10000c59c\nmov     eax, eax                                                       ; +0x8e, 0x10000c59e\nlea     rcx, off_1008B1FA8; \"edit_deleteSBtn_001.png\"                  ; +0x90, 0x10000c5a0\nmov     r15, [rcx+rax*8]                                               ; +0x97, 0x10000c5a7\nmov     rdi, [rbx+rax*8+340h]                                          ; +0x9b, 0x10000c5ab\nmov     rax, [rdi]                                                     ; +0xa3, 0x10000c5b3\ncall    qword ptr [rax+420h]                                           ; +0xa6, 0x10000c5b6\nmov     r12, rax                                                       ; +0xac, 0x10000c5bc\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0xaf, 0x10000c5bf\nmov     rdi, rax                                                       ; +0xb4, 0x10000c5c4\nmov     rsi, r15                                                       ; +0xb7, 0x10000c5c7\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0xba, 0x10000c5ca\nmov     rcx, [r12]                                                     ; +0xbf, 0x10000c5cf\nmov     rdi, r12                                                       ; +0xc3, 0x10000c5d3\nmov     rsi, rax                                                       ; +0xc6, 0x10000c5d6\ncall    qword ptr [rcx+478h]                                           ; +0xc9, 0x10000c5d9\nmov     rdi, rbx                                                       ; +0xcf, 0x10000c5df\ncall    EditorUI__deselectAll                                          ; +0xd2, 0x10000c5e2\nmov     rdi, [rbx+4E8h]                                                ; +0xd7, 0x10000c5e7\nmov     eax, [rdi+798h]                                                ; +0xde, 0x10000c5ee\ntest    eax, eax                                                       ; +0xe4, 0x10000c5f4\njz      short loc_10000C610                                            ; +0xe6, 0x10000c5f6\ncmp     eax, 2                                                         ; +0xe8, 0x10000c5f8\njz      short loc_10000C609                                            ; +0xeb, 0x10000c5fb\ncmp     eax, 1                                                         ; +0xed, 0x10000c5fd\njnz     short loc_10000C65E                                            ; +0xf0, 0x10000c600\ncall    LevelEditorLayer__onPausePlaytest                              ; +0xf2, 0x10000c602\njmp     short loc_10000C65E                                            ; +0xf7, 0x10000c607\ncall    LevelEditorLayer__onResumePlaytest                             ; +0xf9, 0x10000c609\njmp     short loc_10000C65E                                            ; +0xfe, 0x10000c60e\nmov     rdi, [rdi+0EB8h]                                               ; +0x100, 0x10000c610\nmov     rax, [rdi]                                                     ; +0x107, 0x10000c617\ncall    qword ptr [rax+0A8h]                                           ; +0x10a, 0x10000c61a\nmovss   dword ptr [rbx+584h], xmm0                                     ; +0x110, 0x10000c620\nmov     rdi, [rbx+4E8h]                                                ; +0x118, 0x10000c628\ncall    LevelEditorLayer__onPlaytest                                   ; +0x11f, 0x10000c62f\nmov     rax, [rbx+4E8h]                                                ; +0x124, 0x10000c634\ncmp     qword ptr [rax+2FF0h], 0                                       ; +0x12b, 0x10000c63b\njz      short loc_10000C65E                                            ; +0x133, 0x10000c643\ncall    GameManager__sharedState                                       ; +0x135, 0x10000c645\nlea     rsi, a0150; \"0150\"                                             ; +0x13a, 0x10000c64a\nmov     rdi, rax                                                       ; +0x141, 0x10000c651\ncall    GameManager__getGameVariable                                   ; +0x144, 0x10000c654\nmov     r15d, eax                                                      ; +0x149, 0x10000c659\njmp     short loc_10000C661                                            ; +0x14c, 0x10000c65c\nxor     r15d, r15d                                                     ; +0x14e, 0x10000c65e\nmov     rax, [rbx+4E8h]                                                ; +0x151, 0x10000c661\nxor     esi, esi                                                       ; +0x158, 0x10000c668\ncmp     dword ptr [rax+798h], 1                                        ; +0x15a, 0x10000c66a\nsetnz   sil                                                            ; +0x161, 0x10000c671\nmov     rdi, rbx                                                       ; +0x165, 0x10000c675\ncall    EditorUI__showUI                                               ; +0x168, 0x10000c678\nmov     rdi, [rbx+388h]                                                ; +0x16d, 0x10000c67d\nmov     rax, [rdi]                                                     ; +0x174, 0x10000c684\ncall    qword ptr [rax+420h]                                           ; +0x177, 0x10000c687\nmov     r12, rax                                                       ; +0x17d, 0x10000c68d\nmov     rax, [rbx+4E8h]                                                ; +0x180, 0x10000c690\nmov     r14d, [rax+798h]                                               ; +0x187, 0x10000c697\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x18e, 0x10000c69e\ncmp     r14d, 1                                                        ; +0x193, 0x10000c6a3\nlea     rcx, aGjPauseeditorb; \"GJ_pauseEditorBtn_001.png\"              ; +0x197, 0x10000c6a7\nlea     rsi, aGjPlayeditorbt; \"GJ_playEditorBtn_001.png\"               ; +0x19e, 0x10000c6ae\ncmovz   rsi, rcx                                                       ; +0x1a5, 0x10000c6b5\nmov     rdi, rax                                                       ; +0x1a9, 0x10000c6b9\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x1ac, 0x10000c6bc\nmov     rcx, [r12]                                                     ; +0x1b1, 0x10000c6c1\nmov     rdi, r12                                                       ; +0x1b5, 0x10000c6c5\nmov     rsi, rax                                                       ; +0x1b8, 0x10000c6c8\ncall    qword ptr [rcx+478h]                                           ; +0x1bb, 0x10000c6cb\nmov     rdi, [rbx+390h]                                                ; +0x1c1, 0x10000c6d1\nmov     rax, [rdi]                                                     ; +0x1c8, 0x10000c6d8\nmov     esi, 1                                                         ; +0x1cb, 0x10000c6db\ncall    qword ptr [rax+148h]                                           ; +0x1d0, 0x10000c6e0\nmov     rdi, rbx                                                       ; +0x1d6, 0x10000c6e6\ncall    EditorUI__updatePlaybackBtn                                    ; +0x1d9, 0x10000c6e9\ntest    r15b, r15b                                                     ; +0x1de, 0x10000c6ee\njz      short loc_10000C6FF                                            ; +0x1e1, 0x10000c6f1\nmov     rdi, rbx                                                       ; +0x1e3, 0x10000c6f3\nmov     rsi, [rbp-30h]                                                 ; +0x1e6, 0x10000c6f6\ncall    EditorUI__onPlaytest                                           ; +0x1ea, 0x10000c6fa\ncmp     r13d, 1                                                        ; +0x1ef, 0x10000c6ff\njz      short loc_10000C713                                            ; +0x1f3, 0x10000c703\nmov     rax, [rbx+4E8h]                                                ; +0x1f5, 0x10000c705\nmov     byte ptr [rax+3536h], 1                                        ; +0x1fc, 0x10000c70c\nadd     rsp, 8                                                         ; +0x203, 0x10000c713\npop     rbx                                                            ; +0x207, 0x10000c717\npop     r12                                                            ; +0x208, 0x10000c718\npop     r13                                                            ; +0x20a, 0x10000c71a\npop     r14                                                            ; +0x20c, 0x10000c71c\npop     r15                                                            ; +0x20e, 0x10000c71e\npop     rbp                                                            ; +0x210, 0x10000c720\nretn                                                                   ; +0x211, 0x10000c721", "xrefs": ["EditorUI::onPlaytest @ 0x10000c6fa", "EditorUI::keyDown @ 0x100050de2", "EditorUI::init @ 0x10000a06d"], "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"}