//
// SetGroupIDLayer::onArrow from 0x50baa4 to 0x50bba2 (254 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::onArrowLeft @ 0x50bbba
// > SetGroupIDLayer::onArrowRight @ 0x50bbd4
//
// 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 SetGroupIDLayer::onArrow(SetGroupIDLayer *a1, int a2, int a3)
{
int m_zOrderValue; // r3
int v5; // r3
int v6; // r3
switch ( a2 )
{
case 1:
a1->m_groupIDValue = (a3 + a1->m_groupIDValue) & ~((a3 + a1->m_groupIDValue) >> 31);
SetGroupIDLayer::updateGroupIDLabel(a1);
return;
case 3:
a1->m_orderValue = (a3 + a1->m_orderValue) & ~((a3 + a1->m_orderValue) >> 31);
SetGroupIDLayer::updateEditorOrder(a1);
SetGroupIDLayer::updateEditorOrderLabel(a1);
return;
case 4:
a1->m_channelValue = (a3 + a1->m_channelValue) & ~((a3 + a1->m_channelValue) >> 31);
SetGroupIDLayer::updateOrderChannel(a1);
SetGroupIDLayer::updateOrderChannelLabel(a1);
return;
case 5:
a1->m_editorLayerValue = (a3 + a1->m_editorLayerValue) & ~((a3 + a1->m_editorLayerValue) >> 31);
SetGroupIDLayer::updateEditorLabel(a1);
SetGroupIDLayer::updateEditorLayerID(a1);
return;
case 6:
a1->m_editorLayer2Value = (a3 + a1->m_editorLayer2Value) & ~((a3 + a1->m_editorLayer2Value) >> 31);
SetGroupIDLayer::updateEditorLabel2(a1);
SetGroupIDLayer::updateEditorLayerID2(a1);
return;
case 7:
m_zOrderValue = a1->m_zOrderValue;
if ( m_zOrderValue != -1000 )
{
if ( a3 == 1 )
{
v5 = m_zOrderValue + 1;
if ( !v5 )
v5 = 1;
goto LABEL_16;
}
LABEL_14:
v5 = a1->m_zOrderValue - 1;
if ( a1->m_zOrderValue == 1 )
v5 = -1;
LABEL_16:
a1->m_zOrderValue = v5;
goto LABEL_17;
}
if ( a3 != 1 )
{
a1->m_zOrderValue = 0;
goto LABEL_14;
}
a1->m_zOrderValue = 1;
LABEL_17:
v6 = -100;
if ( a1->m_zOrderValue > -100 )
v6 = a1->m_zOrderValue;
if ( v6 >= 100 )
v6 = 100;
a1->m_zOrderValue = v6;
SetGroupIDLayer::updateZOrderLabel(a1);
SetGroupIDLayer::updateZOrder(a1);
return;
default:
return;
}
}