{"type": "func", "start": 4295017168, "end": 4295017743, "name": "EditorUI::onPlayback", "pseudocode": "// \n// EditorUI::onPlayback from 0x10000c2d0 to 0x10000c50f (575 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onStopPlaytest @ 0x10000c754\n// > EditorUI::keyDown @ 0x100050db1\n// > EditorUI::init @ 0x100009fe9\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::onPlayback(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *m_editorLayer; // rdi\n  LevelEditorLayer *v4; // rdi\n  bool m_isPlayingMusic; // r14\n  LevelEditorLayer *v6; // rdi\n  LevelEditorLayer *v7; // rsi\n  int SelectedEditorOrder; // r14d\n  char SelectedOrderChannel; // r15\n  DrawGridLayer *m_drawGridLayer; // r12\n  cocos2d::CCPoint v11; // xmm0_8\n  DrawGridLayer *v12; // r12\n  cocos2d::CCPoint v13; // xmm0_8\n  FMODAudioEngine *v14; // rax\n  int v15; // [rsp-44h] [rbp-44h] BYREF\n  float v16[2]; // [rsp-3Ch] [rbp-3Ch] BYREF\n  bool v17; // [rsp-31h] [rbp-31h]\n  __int64 v18; // [rsp-8h] [rbp-8h] BYREF\n\n  if ( !a1->m_isPaused )\n  {\n    m_editorLayer = a1->m_editorLayer;\n    if ( m_editorLayer->m_playbackMode == Not )\n    {\n      GJBaseGameLayer::preResumeGame(m_editorLayer);\n      v4 = a1->m_editorLayer;\n      v4->m_gameState.m_unkBool30 = 0;\n      m_isPlayingMusic = a1->m_isPlayingMusic;\n      if ( !m_isPlayingMusic )\n      {\n        GJBaseGameLayer::pauseAudio(v4);\n        v4 = a1->m_editorLayer;\n      }\n      LevelEditorLayer::resetPlayback(v4);\n      v6 = a1->m_editorLayer;\n      if ( a1->m_isPlayingMusic )\n      {\n        LevelEditorLayer::stopPlayback(v6);\n        a1->m_editorLayer->m_spawnOrderObjectsChanged = 1;\n      }\n      else\n      {\n        DrawGridLayer::updateTimeMarkers(v6->m_drawGridLayer);\n        cocos2d::CCNode::convertToNodeSpace(\n          (cocos2d::CCNode *)v16,\n          (const cocos2d::CCPoint *)a1->m_editorLayer->m_objectLayer);\n        if ( (float)(v16[0] + 30.0) < 50.0 )\n          v16[0] = 0.0;\n        v17 = m_isPlayingMusic;\n        v7 = a1->m_editorLayer;\n        if ( v7->m_playbackObject )\n        {\n          LevelEditorLayer::getSelectedEffectPos((LevelEditorLayer *)&v15);\n          sub_10028CC90(v16, &v15);\n          SelectedEditorOrder = LevelEditorLayer::getSelectedEditorOrder(a1->m_editorLayer);\n          SelectedOrderChannel = LevelEditorLayer::getSelectedOrderChannel(a1->m_editorLayer);\n          v7 = a1->m_editorLayer;\n          v7->m_playbackOrder = SelectedEditorOrder;\n        }\n        else\n        {\n          SelectedEditorOrder = 0;\n          SelectedOrderChannel = 0;\n        }\n        m_drawGridLayer = v7->m_drawGridLayer;\n        *(double *)&v11 = sub_10028CC60(&v15, v16);\n        a1->m_playbackStartWarp = DrawGridLayer::timeForPos(\n                                    m_drawGridLayer,\n                                    v11,\n                                    (unsigned int)&v18 - 60,\n                                    SelectedEditorOrder,\n                                    SelectedOrderChannel,\n                                    0,\n                                    1,\n                                    0);\n        v12 = a1->m_editorLayer->m_drawGridLayer;\n        *(double *)&v13 = sub_10028CC60(&v15, v16);\n        a1->m_playbackStartTime = DrawGridLayer::timeForPos(\n                                    v12,\n                                    v13,\n                                    (unsigned int)&v18 - 60,\n                                    SelectedEditorOrder,\n                                    SelectedOrderChannel,\n                                    0,\n                                    0,\n                                    0);\n        DrawGridLayer::updateMusicGuideTime(a1->m_editorLayer->m_drawGridLayer, a1->m_playbackStartWarp);\n        m_isPlayingMusic = v17;\n      }\n      a1->m_isPlayingMusic ^= 1u;\n      EditorUI::updatePlaybackBtn(a1);\n      if ( a1->m_isPlayingMusic )\n      {\n        v14 = FMODAudioEngine::sharedEngine();\n        FMODAudioEngine::updateReverb(v14, Generic, 0);\n        LevelEditorLayer::updateGameObjects(a1->m_editorLayer);\n        GJBaseGameLayer::processQueuedAudioTriggers(a1->m_editorLayer);\n      }\n      if ( !m_isPlayingMusic )\n        a1->m_editorLayer->m_audioPaused = 1;\n    }\n  }\n}", "assembly": "; \n; EditorUI::onPlayback from 0x10000c2d0 to 0x10000c50f (575 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onStopPlaytest @ 0x10000c754\n; > EditorUI::keyDown @ 0x100050db1\n; > EditorUI::init @ 0x100009fe9\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, 0x10000c2d0\njnz     locret_10000C50E                                               ; +0x7, 0x10000c2d7\npush    rbp                                                            ; +0xd, 0x10000c2dd\nmov     rbp, rsp                                                       ; +0xe, 0x10000c2de\npush    r15                                                            ; +0x11, 0x10000c2e1\npush    r14                                                            ; +0x13, 0x10000c2e3\npush    r13                                                            ; +0x15, 0x10000c2e5\npush    r12                                                            ; +0x17, 0x10000c2e7\npush    rbx                                                            ; +0x19, 0x10000c2e9\nsub     rsp, 18h                                                       ; +0x1a, 0x10000c2ea\nmov     rbx, rdi                                                       ; +0x1e, 0x10000c2ee\nmov     rdi, [rdi+4E8h]                                                ; +0x21, 0x10000c2f1\ncmp     dword ptr [rdi+798h], 0                                        ; +0x28, 0x10000c2f8\njnz     loc_10000C500                                                  ; +0x2f, 0x10000c2ff\ncall    GJBaseGameLayer__preResumeGame                                 ; +0x35, 0x10000c305\nmov     rdi, [rbx+4E8h]                                                ; +0x3a, 0x10000c30a\nmov     byte ptr [rdi+768h], 0                                         ; +0x41, 0x10000c311\nmovzx   r14d, byte ptr [rbx+240h]                                      ; +0x48, 0x10000c318\ntest    r14b, r14b                                                     ; +0x50, 0x10000c320\njnz     short loc_10000C331                                            ; +0x53, 0x10000c323\ncall    GJBaseGameLayer__pauseAudio                                    ; +0x55, 0x10000c325\nmov     rdi, [rbx+4E8h]                                                ; +0x5a, 0x10000c32a\ncall    LevelEditorLayer__resetPlayback                                ; +0x61, 0x10000c331\nmov     rdi, [rbx+4E8h]                                                ; +0x66, 0x10000c336\ncmp     byte ptr [rbx+240h], 1                                         ; +0x6d, 0x10000c33d\njnz     short loc_10000C35E                                            ; +0x74, 0x10000c344\ncall    LevelEditorLayer__stopPlayback                                 ; +0x76, 0x10000c346\nmov     rax, [rbx+4E8h]                                                ; +0x7b, 0x10000c34b\nmov     byte ptr [rax+3630h], 1                                        ; +0x82, 0x10000c352\njmp     loc_10000C4AC                                                  ; +0x89, 0x10000c359\nmov     rdi, [rdi+3698h]                                               ; +0x8e, 0x10000c35e\ncall    DrawGridLayer__updateTimeMarkers                               ; +0x95, 0x10000c365\nmov     rax, [rbx+4E8h]                                                ; +0x9a, 0x10000c36a\nmov     rsi, [rax+0EB8h]                                               ; +0xa1, 0x10000c371\nlea     rdx, qword_10099EC08                                           ; +0xa8, 0x10000c378\nlea     rdi, [rbp-34h]                                                 ; +0xaf, 0x10000c37f\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0xb3, 0x10000c383\nmovss   xmm0, dword ptr [rbp-34h]                                      ; +0xb8, 0x10000c388\naddss   xmm0, cs:dword_100814FD0                                       ; +0xbd, 0x10000c38d\nmovss   xmm1, cs:dword_100814FDC                                       ; +0xc5, 0x10000c395\nucomiss xmm1, xmm0                                                     ; +0xcd, 0x10000c39d\njbe     short loc_10000C3A9                                            ; +0xd0, 0x10000c3a0\nmov     dword ptr [rbp-34h], 0                                         ; +0xd2, 0x10000c3a2\nmov     [rbp-29h], r14b                                                ; +0xd9, 0x10000c3a9\nmov     rsi, [rbx+4E8h]                                                ; +0xdd, 0x10000c3ad\ncmp     qword ptr [rsi+3830h], 0                                       ; +0xe4, 0x10000c3b4\njz      short loc_10000C404                                            ; +0xec, 0x10000c3bc\nlea     r14, [rbp-3Ch]                                                 ; +0xee, 0x10000c3be\nmov     rdi, r14                                                       ; +0xf2, 0x10000c3c2\ncall    LevelEditorLayer__getSelectedEffectPos                         ; +0xf5, 0x10000c3c5\nlea     rdi, [rbp-34h]                                                 ; +0xfa, 0x10000c3ca\nmov     rsi, r14                                                       ; +0xfe, 0x10000c3ce\ncall    sub_10028CC90                                                  ; +0x101, 0x10000c3d1\nmov     rdi, [rbx+4E8h]                                                ; +0x106, 0x10000c3d6\ncall    LevelEditorLayer__getSelectedEditorOrder                       ; +0x10d, 0x10000c3dd\nmov     r14d, eax                                                      ; +0x112, 0x10000c3e2\nmov     rdi, [rbx+4E8h]                                                ; +0x115, 0x10000c3e5\ncall    LevelEditorLayer__getSelectedOrderChannel                      ; +0x11c, 0x10000c3ec\nmov     r15d, eax                                                      ; +0x121, 0x10000c3f1\nmov     rsi, [rbx+4E8h]                                                ; +0x124, 0x10000c3f4\nmov     [rsi+3848h], r14d                                              ; +0x12b, 0x10000c3fb\njmp     short loc_10000C40A                                            ; +0x132, 0x10000c402\nxor     r14d, r14d                                                     ; +0x134, 0x10000c404\nxor     r15d, r15d                                                     ; +0x137, 0x10000c407\nmov     r12, [rsi+3698h]                                               ; +0x13a, 0x10000c40a\nlea     r13, [rbp-3Ch]                                                 ; +0x141, 0x10000c411\nlea     rsi, [rbp-34h]                                                 ; +0x145, 0x10000c415\nmov     rdi, r13                                                       ; +0x149, 0x10000c419\ncall    sub_10028CC60                                                  ; +0x14c, 0x10000c41c\nmov     rdi, r12                                                       ; +0x151, 0x10000c421\nmov     rsi, r13                                                       ; +0x154, 0x10000c424\nmov     edx, r14d                                                      ; +0x157, 0x10000c427\nmov     ecx, r15d                                                      ; +0x15a, 0x10000c42a\nxor     r8d, r8d                                                       ; +0x15d, 0x10000c42d\nmov     r9d, 1                                                         ; +0x160, 0x10000c430\npush    0                                                              ; +0x166, 0x10000c436\npush    0                                                              ; +0x168, 0x10000c438\ncall    DrawGridLayer__timeForPos                                      ; +0x16a, 0x10000c43a\nadd     rsp, 10h                                                       ; +0x16f, 0x10000c43f\nmovss   dword ptr [rbx+270h], xmm0                                     ; +0x173, 0x10000c443\nmov     rax, [rbx+4E8h]                                                ; +0x17b, 0x10000c44b\nmov     r12, [rax+3698h]                                               ; +0x182, 0x10000c452\nmov     rdi, r13                                                       ; +0x189, 0x10000c459\nlea     rsi, [rbp-34h]                                                 ; +0x18c, 0x10000c45c\ncall    sub_10028CC60                                                  ; +0x190, 0x10000c460\nmov     rdi, r12                                                       ; +0x195, 0x10000c465\nmov     rsi, r13                                                       ; +0x198, 0x10000c468\nmov     edx, r14d                                                      ; +0x19b, 0x10000c46b\nmov     ecx, r15d                                                      ; +0x19e, 0x10000c46e\nxor     r8d, r8d                                                       ; +0x1a1, 0x10000c471\nxor     r9d, r9d                                                       ; +0x1a4, 0x10000c474\npush    0                                                              ; +0x1a7, 0x10000c477\npush    0                                                              ; +0x1a9, 0x10000c479\ncall    DrawGridLayer__timeForPos                                      ; +0x1ab, 0x10000c47b\nadd     rsp, 10h                                                       ; +0x1b0, 0x10000c480\nmovss   dword ptr [rbx+274h], xmm0                                     ; +0x1b4, 0x10000c484\nmov     rax, [rbx+4E8h]                                                ; +0x1bc, 0x10000c48c\nmov     rdi, [rax+3698h]                                               ; +0x1c3, 0x10000c493\nmovss   xmm0, dword ptr [rbx+270h]                                     ; +0x1ca, 0x10000c49a\ncall    DrawGridLayer__updateMusicGuideTime                            ; +0x1d2, 0x10000c4a2\nmovzx   r14d, byte ptr [rbp-29h]                                       ; +0x1d7, 0x10000c4a7\nxor     byte ptr [rbx+240h], 1                                         ; +0x1dc, 0x10000c4ac\nmov     rdi, rbx                                                       ; +0x1e3, 0x10000c4b3\ncall    EditorUI__updatePlaybackBtn                                    ; +0x1e6, 0x10000c4b6\ncmp     byte ptr [rbx+240h], 1                                         ; +0x1eb, 0x10000c4bb\njnz     short loc_10000C4ED                                            ; +0x1f2, 0x10000c4c2\ncall    FMODAudioEngine__sharedEngine                                  ; +0x1f4, 0x10000c4c4\nmov     rdi, rax                                                       ; +0x1f9, 0x10000c4c9\nxor     esi, esi                                                       ; +0x1fc, 0x10000c4cc\nxor     edx, edx                                                       ; +0x1fe, 0x10000c4ce\ncall    FMODAudioEngine__updateReverb                                  ; +0x200, 0x10000c4d0\nmov     rdi, [rbx+4E8h]                                                ; +0x205, 0x10000c4d5\ncall    LevelEditorLayer__updateGameObjects                            ; +0x20c, 0x10000c4dc\nmov     rdi, [rbx+4E8h]                                                ; +0x211, 0x10000c4e1\ncall    GJBaseGameLayer__processQueuedAudioTriggers                    ; +0x218, 0x10000c4e8\ntest    r14b, r14b                                                     ; +0x21d, 0x10000c4ed\njnz     short loc_10000C500                                            ; +0x220, 0x10000c4f0\nmov     rax, [rbx+4E8h]                                                ; +0x222, 0x10000c4f2\nmov     byte ptr [rax+3536h], 1                                        ; +0x229, 0x10000c4f9\nadd     rsp, 18h                                                       ; +0x230, 0x10000c500\npop     rbx                                                            ; +0x234, 0x10000c504\npop     r12                                                            ; +0x235, 0x10000c505\npop     r13                                                            ; +0x237, 0x10000c507\npop     r14                                                            ; +0x239, 0x10000c509\npop     r15                                                            ; +0x23b, 0x10000c50b\npop     rbp                                                            ; +0x23d, 0x10000c50d\nretn                                                                   ; +0x23e, 0x10000c50e", "xrefs": ["EditorUI::onStopPlaytest @ 0x10000c754", "EditorUI::keyDown @ 0x100050db1", "EditorUI::init @ 0x100009fe9"], "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"}