//
// cocos2d::CCTouchDispatcher::addStandardDelegate from 0x807ee4 to 0x807f2e (74 bytes)
//
// 1 xrefs:
// > cocos2d::CCLayer::registerWithTouchDispatcher @ 0x7d6f2c
//
// 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
//
unsigned int *__fastcall cocos2d::CCTouchDispatcher::addStandardDelegate(
cocos2d::CCTouchDispatcher *this,
cocos2d::CCTouchDelegate *a2,
cocos2d::CCTouchDelegate *a3)
{
cocos2d::CCTouchHandler *v5; // r6
unsigned int *result; // r0
v5 = (cocos2d::CCTouchHandler *)cocos2d::CCStandardTouchHandler::handlerWithDelegate(a2, a3, (int)a3);
if ( !*((_BYTE *)this + 64) )
return (unsigned int *)cocos2d::CCTouchDispatcher::forceAddHandler(this, v5, *((cocos2d::CCArray **)this + 15));
if ( cocos2d::ccCArrayContainsValue(*((_DWORD **)this + 18), (int)a2) )
return cocos2d::ccCArrayRemoveValue(*((unsigned int **)this + 18), (int)a2);
result = (unsigned int *)cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 17), v5);
*((_BYTE *)this + 65) = 1;
return result;
}