//
// cocos2d::CCMouseDispatcher::forceRemoveDelegate from 0x1002fe1a8 to 0x1002fe23c (148 bytes)
//
// 1 xrefs:
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0x1002fe1a4
//
// 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 __fastcall cocos2d::CCMouseDispatcher::forceRemoveDelegate(
cocos2d::CCMouseDispatcher *a1,
cocos2d::CCMouseDelegate *a2)
{
cocos2d::CCArray *m_pMouseHandlers; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCMouseHandler **arr; // x22
unsigned __int64 v8; // x23
m_pMouseHandlers = a1->m_pMouseHandlers;
if ( m_pMouseHandlers )
{
data = m_pMouseHandlers->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (cocos2d::CCMouseHandler **)data->arr;
v8 = (unsigned __int64)&arr[num - 1];
while ( *arr )
{
if ( cocos2d::CCMouseHandler::getDelegate(*arr) == a2 )
{
sub_10024A444((__int64)a1->m_pMouseHandlers);
return;
}
if ( (unsigned __int64)++arr > v8 )
return;
}
}
}
}