//
// SFXBrowser::onPage from 0x1404808a0 to 0x140480966 (198 bytes)
//
// 6 xrefs:
// > SFXBrowser::init @ 0x14047ed7e
// > SFXBrowser::init @ 0x14047ee46
// > ??> @ 0x1406a60a8
// > ??> @ 0x1406a60bc
// > ??> @ 0x1406a60cc
// > ??> @ 0x1406dba44
//
// 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 SFXBrowser::onPage(SFXBrowser *a1, cocos2d::CCObject *a2)
{
SFXSearchResult *m_searchResult; // rcx
unsigned int v5; // eax
int v6; // ebp
int m_startIndex; // ebx
int v8; // eax
int v9; // ecx
int v10; // ecx
m_searchResult = a1->m_searchResult;
if ( m_searchResult )
{
v5 = cocos2d::CCArray::count(m_searchResult->m_filterObjects);
v6 = (int)ceilf((float)(int)(v5 / a1->m_cellAmount));
m_startIndex = a1->m_searchResult->m_startIndex;
v8 = a2->getTag(a2);
v9 = 1;
if ( v8 != 1 )
v9 = -1;
v10 = m_startIndex + v9;
if ( v10 < 0 )
{
if ( v10 == -1 )
SFXBrowser::onExitFolder(a1, a2);
}
else if ( v10 <= v6 )
{
a1->m_searchResult->m_startIndex = v10;
SFXBrowser::setupList(a1, a1->m_searchResult);
}
}
}