//
// cocos2d::CCTouchDispatcher::forceAddHandler from 0x5fa70a to 0x5fa76e (100 bytes)
//
// 3 xrefs:
// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x5fa78e
// > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x5fa800
// > cocos2d::CCTouchDispatcher::touches @ 0x5fac64
//
// 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::forceAddHandler(
cocos2d::CCTouchDispatcher *a1,
cocos2d::CCTouchHandler *a2,
cocos2d::CCArray *a3)
{
unsigned int data; // r3
cocos2d::CCObject *v6; // r4
cocos2d::CCTouchHandler **v7; // r5
cocos2d::CCTouchHandler **v8; // r9
cocos2d::CCTouchHandler *v9; // r7
cocos2d::CCTouchHandler *v10; // t1
int Priority; // r10
cocos2d::CCTouchDelegate *Delegate; // r7
if ( a3 )
{
data = (unsigned int)a3->data;
v6 = *(cocos2d::CCObject **)data;
if ( *(_DWORD *)data )
{
v7 = *(cocos2d::CCTouchHandler ***)(data + 12);
data = (unsigned int)&v6[20648881].m_nLuaID + 3;
v6 = nullptr;
v8 = &v7[data];
while ( v7 <= v8 )
{
v10 = *v7++;
v9 = v10;
if ( !v10 )
break;
Priority = cocos2d::CCTouchHandler::getPriority(v9);
if ( Priority < cocos2d::CCTouchHandler::getPriority(a2) )
v6 = (cocos2d::CCObject *)((char *)v6 + 1);
Delegate = cocos2d::CCTouchHandler::getDelegate(v9);
if ( Delegate == cocos2d::CCTouchHandler::getDelegate(a2) )
return;
}
}
}
else
{
v6 = nullptr;
}
cocos2d::CCArray::insertObject(a3, (cocos2d::_ccArray *)a2, v6, data);
}