//
// cocos2d::CCMouseDispatcher::dispatchScrollMSG from 0x5fc14a to 0x5fc1fa (176 bytes)
//
// 0 xrefs:
//
// 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
//
bool cocos2d::CCMouseDispatcher::dispatchScrollMSG(cocos2d::CCMouseDispatcher *a1, float a2, float a3)
{
_BOOL4 m_bToRemove; // r3
unsigned int v7; // r5
unsigned int v8; // r5
int i; // r6
cocos2d::CCArray *m_pMouseHandlers; // r7
unsigned int v11; // r0
cocos2d::CCMouseHandler *v12; // r0
cocos2d::CCMouseDelegate *Delegate; // r0
cocos2d::ccCArray *m_pHandlersToRemove; // r0
cocos2d::CCMouseDelegate *v15; // r1
unsigned int v16; // r5
cocos2d::ccCArray *m_pHandlersToAdd; // r0
cocos2d::CCMouseDelegate *v18; // r1
a1->m_bLocked = 1;
if ( cocos2d::CCArray::count(a1->m_pMouseHandlers) )
{
v8 = 0;
for ( i = 0; v8 < cocos2d::CCArray::count(a1->m_pMouseHandlers); i = 1 )
{
m_pMouseHandlers = a1->m_pMouseHandlers;
v11 = cocos2d::CCArray::count(m_pMouseHandlers);
v12 = (cocos2d::CCMouseHandler *)cocos2d::CCArray::objectAtIndex(m_pMouseHandlers, ~v8 + v11);
if ( !v12 || i )
break;
Delegate = cocos2d::CCMouseHandler::getDelegate(v12);
++v8;
((void (__fastcall *)(cocos2d::CCMouseDelegate *, _DWORD, _DWORD))Delegate->scrollWheel)(
Delegate,
LODWORD(a2),
LODWORD(a3));
}
}
m_bToRemove = a1->m_bToRemove;
v7 = 0;
a1->m_bLocked = 0;
if ( m_bToRemove )
{
a1->m_bToRemove = 0;
while ( 1 )
{
m_pHandlersToRemove = a1->m_pHandlersToRemove;
if ( v7 >= m_pHandlersToRemove->num )
break;
v15 = (cocos2d::CCMouseDelegate *)m_pHandlersToRemove->arr[v7++];
cocos2d::CCMouseDispatcher::forceRemoveDelegate(a1, v15);
}
cocos2d::ccCArrayRemoveAllValues(m_pHandlersToRemove);
}
if ( a1->m_bToAdd )
{
v16 = 0;
a1->m_bToAdd = 0;
while ( 1 )
{
m_pHandlersToAdd = a1->m_pHandlersToAdd;
if ( v16 >= m_pHandlersToAdd->num )
break;
v18 = (cocos2d::CCMouseDelegate *)m_pHandlersToAdd->arr[v16++];
cocos2d::CCMouseDispatcher::forceAddDelegate(a1, v18);
}
cocos2d::ccCArrayRemoveAllValues(m_pHandlersToAdd);
}
return 1;
}