//
// cocos2d::CCMouseDispatcher::flushPendingDelegates from 0x809e6e to 0x809ec8 (90 bytes)
//
// 2 xrefs:
// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x809f28
// > cocos2d::CCMouseDispatcher::dispatchRightClick @ 0x809f92
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:01:28 +0000
//
cocos2d::CCMouseDelegate *__fastcall cocos2d::CCMouseDispatcher::flushPendingDelegates(cocos2d::CCMouseDelegate *this)
{
cocos2d::CCMouseDelegate *v1; // r4
unsigned int v2; // r5
unsigned int *v3; // r0
cocos2d::CCMouseDelegate *v4; // r1
unsigned int v5; // r5
unsigned int *v6; // r0
cocos2d::CCMouseDelegate *v7; // r1
v1 = this;
if ( *((_BYTE *)this + 58) )
{
v2 = 0;
*((_BYTE *)this + 58) = 0;
while ( 1 )
{
v3 = *((unsigned int **)v1 + 16);
if ( v2 >= *v3 )
break;
v4 = *(cocos2d::CCMouseDelegate **)(v3[3] + 4 * v2++);
cocos2d::CCMouseDispatcher::forceRemoveDelegate(v1, v4);
}
this = (cocos2d::CCMouseDelegate *)cocos2d::ccCArrayRemoveAllValues(v3);
}
if ( *((_BYTE *)v1 + 57) )
{
v5 = 0;
*((_BYTE *)v1 + 57) = 0;
while ( 1 )
{
v6 = *((unsigned int **)v1 + 15);
if ( v5 >= *v6 )
break;
v7 = *(cocos2d::CCMouseDelegate **)(v6[3] + 4 * v5++);
cocos2d::CCMouseDispatcher::forceAddDelegate((cocos2d::CCArray **)v1, v7);
}
return (cocos2d::CCMouseDelegate *)cocos2d::ccCArrayRemoveAllValues(v6);
}
return this;
}