// // EditorUI::valueFromXPos from 0x381698 to 0x38171e (134 bytes) // // 1 xrefs: // > EditorUI::updateSlider @ 0x381740 // // 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 // float EditorUI::valueFromXPos(EditorUI *a1, float a2) { float XMin; // s17 int SectionCount; // r4 float v6; // r0 float v7; // s15 XMin = EditorUI::getXMin(a1, 0); SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer); v6 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer)); if ( SectionCount < 100 ) SectionCount = 100; v7 = (float)-(float)(a2 - XMin) / (float)((float)((float)SectionCount * 100.0) * v6); if ( v7 <= 0.0 ) return 0.0; if ( v7 >= 1.0 ) return 1.0; return v7; }
GD Web Decomp Icon

GD Web Decomp

Raw Source