//
// EditorUI::convertToBaseKey from 0x100077cfc to 0x100077dd8 (220 bytes)
//
// 2 xrefs:
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100077e04
// > EditorUI::processSmartObjectsFromType @ 0x1003f29d0
//
// 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
//
int __fastcall EditorUI::convertToBaseKey(EditorUI *a1, int a2)
{
int result; // w0
result = a2;
if ( a2 <= 2822 )
{
if ( (unsigned int)(a2 - 2808) < 0xF )
return 2703;
if ( (unsigned int)(a2 - 867) < 6 || (unsigned int)(a2 - 1266) < 2 )
return 869;
return result;
}
if ( a2 > 2841 )
{
if ( a2 > 2845 )
{
if ( a2 <= 2847 )
{
if ( a2 != 2846 )
return 2839;
return 2838;
}
if ( a2 != 2848 )
{
if ( a2 != 2849 )
return result;
return 2841;
}
}
else
{
if ( a2 <= 2843 )
{
if ( a2 != 2842 )
return 2839;
return 2838;
}
if ( a2 != 2844 )
return 2841;
}
return 2840;
}
if ( (unsigned int)(a2 - 2823) < 0xF )
return 2704;
return result;
}