//
// cocos2d::CCTouchDispatcher::removeDelegate from 0xb3efc4 to 0xb3f03c (120 bytes)
//
// 4 xrefs:
// > cocos2d::CCScrollLayer::~CCScrollLayer @ 0x578c30
// > cocos2d::CCLayer::setTouchEnabled @ 0xaea8a4
// > cocos2d::CCLayer::onExit @ 0xaec57c
// > ??> @ 0xb6520
//
// 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::CCTouchDispatcher::removeDelegate(cocos2d::CCTouchDispatcher *a1, cocos2d::CCTouchDelegate *a2)
{
cocos2d::CCTouchHandler *Handler; // x1
bool v5; // w3
if ( a2 )
{
if ( a1->m_bLocked )
{
Handler = cocos2d::CCTouchDispatcher::findHandler(a1, (cocos2d::CCTouchDelegate *)a1->m_pHandlersToAdd);
if ( Handler )
{
cocos2d::CCArray::removeObject(
a1->m_pHandlersToAdd,
(cocos2d::_ccArray *)Handler,
(cocos2d::CCObject *)((char *)&dword_0 + 1),
v5);
}
else
{
cocos2d::ccCArrayAppendValue(&a1->m_pHandlersToRemove->num, (cocos2d::_ccCArray *)a2);
a1->m_bToRemove = 1;
}
}
else
{
cocos2d::CCTouchDispatcher::forceRemoveDelegate(a1, a2);
}
}
}