//
// cocos2d::CCTouchDispatcher::removeDelegate from 0x8081a4 to 0x8081e2 (62 bytes)
//
// 3 xrefs:
// > cocos2d::CCScrollLayer::~CCScrollLayer @ 0x3c7e82
// > cocos2d::CCLayer::setTouchEnabled @ 0x7d748a
// > cocos2d::CCLayer::onExit @ 0x7d852e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:26 +0000
//
cocos2d::CCTouchDelegate *__fastcall cocos2d::CCTouchDispatcher::removeDelegate(
cocos2d::CCTouchDelegate *this,
cocos2d::CCTouchDelegate *a2)
{
cocos2d::CCTouchDelegate *v2; // r4
cocos2d::CCObject *Handler; // r1
v2 = this;
if ( a2 )
{
if ( *((_BYTE *)this + 64) )
{
Handler = cocos2d::CCTouchDispatcher::findHandler(this, *((cocos2d::CCArray **)this + 17), a2);
if ( Handler )
{
return (cocos2d::CCTouchDelegate *)cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)v2 + 17), Handler, 1);
}
else
{
this = (cocos2d::CCTouchDelegate *)cocos2d::ccCArrayAppendValue(*((_DWORD *)v2 + 18), (int)a2);
*((_BYTE *)v2 + 66) = 1;
}
}
else
{
return cocos2d::CCTouchDispatcher::forceRemoveDelegate(this, a2);
}
}
return this;
}