//
// LevelEditorLayer::toggleLockActiveLayer from 0x10035dd34 to 0x10035dd84 (80 bytes)
//
// 1 xrefs:
// > EditorUI::onLockLayer @ 0x1003e5958
//
// 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 LevelEditorLayer::toggleLockActiveLayer(LevelEditorLayer *a1)
{
unsigned __int64 m_currentLayer; // x8
std::__vector_base::pointer begin; // x9
__int64 v3; // x10
__int64 v4; // x8
__int64 v5; // x11
__int64 v6; // x8
m_currentLayer = (unsigned __int16)a1->m_currentLayer;
if ( (unsigned int)m_currentLayer >> 4 <= 0x270 && a1->m_layerLockingEnabled )
{
begin = a1->m_lockedLayers.__begin_;
v3 = (m_currentLayer >> 3) & 0x1FF8;
v4 = 1LL << m_currentLayer;
v5 = *(_QWORD *)&begin[v3];
if ( (v5 & v4) != 0 )
v6 = v5 & ~v4;
else
v6 = v5 | v4;
*(_QWORD *)&begin[v3] = v6;
}
}