//
// cocos2d::CCTouchDispatcher::forceRemoveDelegate from 0x1800b2e30 to 0x1800b2f11 (225 bytes)
//
// 5 xrefs:
// > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1800b3119
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b360d
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b8664
// > ??> @ 0x1801b8670
//
// 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::CCTouchDispatcher::forceRemoveDelegate(
cocos2d::CCTouchDispatcher *this,
struct cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_pStandardHandlers; // rax
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCNotificationObserver **arr; // rbx
cocos2d::CCNotificationObserver **i; // rsi
cocos2d::CCNotificationObserver *v9; // rdi
cocos2d::CCArray *m_pTargetedHandlers; // rax
cocos2d::ccArray *v11; // rbx
__int64 v12; // rax
cocos2d::CCNotificationObserver **v13; // rbx
cocos2d::CCNotificationObserver **j; // rsi
cocos2d::CCNotificationObserver *v15; // rdi
m_pStandardHandlers = this->m_pStandardHandlers;
if ( m_pStandardHandlers )
{
data = m_pStandardHandlers->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (cocos2d::CCNotificationObserver **)data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v9 = *arr;
if ( !*arr )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*arr) == a2 )
{
cocos2d::CCArray::removeObject(this->m_pStandardHandlers, v9);
break;
}
}
}
}
m_pTargetedHandlers = this->m_pTargetedHandlers;
if ( m_pTargetedHandlers )
{
v11 = m_pTargetedHandlers->data;
v12 = v11->num;
if ( (_DWORD)v12 )
{
v13 = (cocos2d::CCNotificationObserver **)v11->arr;
for ( j = &v13[v12 - 1]; v13 <= j; ++v13 )
{
v15 = *v13;
if ( !*v13 )
break;
if ( cocos2d::CCNotificationObserver::getTarget(*v13) == a2 )
{
cocos2d::CCArray::removeObject(this->m_pTargetedHandlers, v15);
return;
}
}
}
}
}