//
// cocos2d::CCMouseDispatcher::forceRemoveDelegate from 0xb40c08 to 0xb40cb0 (168 bytes)
//
// 3 xrefs:
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0xb40cf0
// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0xb40db8
// > ??> @ 0xa1dd8
//
// 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 cocos2d::CCMouseDispatcher::forceRemoveDelegate(cocos2d::CCMouseDispatcher *a1, cocos2d::CCMouseDelegate *a2)
{
cocos2d::CCArray *m_pMouseHandlers; // x2
cocos2d::ccArray *data; // x2
cocos2d::CCMouseHandler **arr; // x19
cocos2d::CCMouseHandler **v5; // x21
cocos2d::CCMouseHandler *v6; // x20
bool v9; // w3
m_pMouseHandlers = a1->m_pMouseHandlers;
if ( m_pMouseHandlers )
{
data = m_pMouseHandlers->data;
if ( data->num )
{
arr = (cocos2d::CCMouseHandler **)data->arr;
v5 = &arr[data->num - 1];
if ( arr <= v5 )
{
v6 = *arr;
if ( *arr )
{
while ( 1 )
{
++arr;
if ( a2 == cocos2d::CCMouseHandler::getDelegate(v6) )
break;
if ( v5 >= arr )
{
v6 = *arr;
if ( *arr )
continue;
}
return;
}
cocos2d::CCArray::removeObject(
a1->m_pMouseHandlers,
(cocos2d::_ccArray *)v6,
(cocos2d::CCObject *)((char *)&dword_0 + 1),
v9);
}
}
}
}
}