// // EditorUI::scrollWheel from 0x1000516c0 to 0x1000518da (538 bytes) // // 2 xrefs: // > sub_1000518E0 @ 0x1000518ec // > @ 0x1008b0618 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall EditorUI::scrollWheel(EditorUI *a1, float a2, float a3) { double v3; // xmm0_8 cocos2d::CCDirector *v4; // rax float v5; // xmm0_4 cocos2d::CCLayer *m_objectLayer; // r15 __int64 v7; // rax int SectionCount; // eax int v9; // ecx float v10; // xmm0_4 _BYTE v11[8]; // [rsp+8h] [rbp-48h] BYREF timeb v12; // [rsp+10h] [rbp-40h] BYREF float v13; // [rsp+24h] [rbp-2Ch] float v14; // [rsp+28h] [rbp-28h] float XMin; // [rsp+2Ch] [rbp-24h] if ( a1->m_editorLayer->m_playbackMode != Playing ) { v14 = a2; XMin = a3; ftime(&v12); v3 = (double)(v12.millitm + 1000 * (v12.time & 0xFFFFF)) / 1000.0; a1->m_keyTime = v3; v4 = cocos2d::CCDirector::sharedDirector(); if ( *(_BYTE *)(((__int64 (__fastcall *)(cocos2d::CCDirector *))v4->getKeyboardDispatcher)(v4) + 89) == 1 ) { ((void (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer); if ( v14 > 0.0 || XMin > 0.0 ) v5 = fmaxf(0.1, fminf(4.0, *(float *)&v3 + -0.1)); else v5 = fmaxf(0.1, fminf(4.0, *(float *)&v3 + 0.1)); EditorUI::updateZoom(a1, v5); } else { sub_10028CBE0(v11, XMin, v14); m_objectLayer = a1->m_editorLayer->m_objectLayer; v7 = ((__int64 (__fastcall *)(cocos2d::CCLayer *))m_objectLayer->getPosition)(m_objectLayer); sub_10028CCE0(&v12, v7); ((void (__fastcall *)(cocos2d::CCLayer *, timeb *))m_objectLayer->setPosition)(m_objectLayer, &v12); EditorUI::constrainGameLayerPosition(a1, -100.0, -100.0); v14 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getPosition)(a1->m_editorLayer->m_objectLayer); XMin = EditorUI::getXMin(a1, 0); SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer); v9 = 100; if ( SectionCount >= 101 ) v9 = SectionCount; v13 = (float)v9 * -100.0; v10 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer); Slider::setValue(a1->m_positionSlider, fminf(fmaxf((float)(v14 - XMin) / (float)(v10 * v13), 0.0), 1.0)); } } }