//
// cocos2d::CCTouchDispatcher::removeDelegate from 0xdb1d70 to 0xdb1de8 (120 bytes)
//
// 4 xrefs:
// > cocos2d::CCScrollLayer::~CCScrollLayer @ 0x694104
// > cocos2d::CCLayer::setTouchEnabled @ 0xd5c604
// > cocos2d::CCLayer::onExit @ 0xd5e2dc
// > ??> @ 0xee2d0
//
// This function is hookable on this platform (idp: arm, 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 13:08:39 +0000
//
__int64 __fastcall cocos2d::CCTouchDispatcher::removeDelegate(__int64 this, cocos2d::CCTouchDelegate *a2)
{
__int64 v3; // x19
cocos2d::CCObject *Handler; // x1
if ( a2 )
{
if ( *(_BYTE *)(this + 80) )
{
v3 = this;
Handler = cocos2d::CCTouchDispatcher::findHandler(
(cocos2d::CCTouchDispatcher *)this,
*(cocos2d::CCArray **)(this + 88),
a2);
if ( Handler )
{
return cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(v3 + 88), Handler);
}
else
{
cocos2d::ccCArrayAppendValue(*(_QWORD *)(v3 + 96), (__int64)a2);
*(_BYTE *)(v3 + 82) = 1;
return 1;
}
}
else
{
return cocos2d::CCTouchDispatcher::forceRemoveDelegate((cocos2d::CCTouchDispatcher *)this, a2);
}
}
return this;
}