//
// SelectFontLayer::onChangeFont from 0x8c6af0 to 0x8c6bb0 (192 bytes)
//
// 4 xrefs:
// > ??> @ 0x6e7a8
// > SelectFontLayer::init @ 0x8c6fbc
// > SelectFontLayer::init @ 0x8c7098
// > ??> @ 0x122ba08
//
// 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 SelectFontLayer::onChangeFont(SelectFontLayer *a1, cocos2d::CCObject *a2)
{
int m_fontIndex; // w19
int v4; // w0
int v5; // w1
cocos2d::CCLabelBMFont *m_fontLabel; // x0
int v7; // w0
int v8; // [xsp+28h] [xbp+28h]
m_fontIndex = a1->m_editorLayer->m_levelSettings->m_fontIndex;
if ( a2->getTag(a2) == 1 )
{
v7 = m_fontIndex + 1;
if ( m_fontIndex + 1 < 0 )
v7 = 0;
if ( v7 > 59 )
v5 = 59;
else
v5 = v7;
if ( a1->m_font != v5 )
goto LABEL_8;
}
else
{
v4 = m_fontIndex - 1;
if ( m_fontIndex - 1 < 0 )
v4 = 0;
if ( v4 > 59 )
v5 = 59;
else
v5 = v4;
if ( a1->m_font != v5 )
{
LABEL_8:
m_fontLabel = a1->m_fontLabel;
if ( m_fontLabel )
{
v8 = v5;
m_fontLabel->removeFromParent(m_fontLabel);
a1->m_fontLabel = nullptr;
v5 = v8;
}
LevelEditorLayer::updateLevelFont(a1->m_editorLayer, v5);
SelectFontLayer::updateFontLabel(a1);
}
}
}