//
// cocos2d::CCMouseDispatcher::forceRemoveDelegate from 0x180046580 to 0x18004660e (142 bytes)
//
// 10 xrefs:
// > cocos2d::CCKeyboardDispatcher::flushPendingDelegates @ 0x1800464dd
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0x180047168
// > cocos2d::CCMouseDispatcher::dispatchRightClick @ 0x180062ffe
// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x18006316e
// > cocos2d::CCMouseDispatcher::flushPendingDelegates @ 0x18006321d
// > cocos2d::CCKeypadDispatcher::dispatchKeypadMSG @ 0x1800b824d
// > ??> @ 0x180140254
// > ??> @ 0x180140288
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb92c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:21:41 +0000
//
// Alternative name is '?forceRemoveDelegate@CCKeyboardDispatcher@cocos2d@@QEAAXPEAVCCKeyboardDelegate@2@@Z'
// Alternative name is '?forceRemoveDelegate@CCKeypadDispatcher@cocos2d@@QEAAXPEAVCCKeypadDelegate@2@@Z'
void __fastcall cocos2d::CCMouseDispatcher::forceRemoveDelegate(
cocos2d::CCMouseDispatcher *this,
struct cocos2d::CCMouseDelegate *a2)
{
__int64 v2; // rbx
unsigned int *v5; // rbx
__int64 v6; // rax
cocos2d::CCNotificationObserver **v7; // rbx
cocos2d::CCNotificationObserver **i; // rsi
struct cocos2d::CCObject *v9; // rdi
v2 = *((_QWORD *)this + 7);
if ( v2 )
{
v5 = *(unsigned int **)(v2 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((cocos2d::CCNotificationObserver ***)v5 + 2);
for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )
{
v9 = *v7;
if ( !*v7 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v7) == a2 )
{
cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)this + 7), v9);
return;
}
}
}
}
}