//
// cocos2d::CCTouchDispatcher::forceAddHandler from 0x1800b67b0 to 0x1800b6865 (181 bytes)
//
// 5 xrefs:
// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b64d2
// > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1800b6600
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b730b
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c291c
//
// This function is hookable on this platform (idp: pc, 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 11:22:21 +0000
//
void __fastcall cocos2d::CCTouchDispatcher::forceAddHandler(
cocos2d::CCTouchDispatcher *this,
struct cocos2d::CCTouchHandler *a2,
struct cocos2d::CCArray *a3)
{
int v3; // esi
unsigned int *v6; // rbx
__int64 v7; // rax
cocos2d::CCNotificationCenter **v8; // rbx
cocos2d::CCNotificationCenter **i; // r15
cocos2d::CCNotificationObserver *v10; // rbp
int v11; // r14d
int ScriptHandler; // edi
struct cocos2d::CCObject *Target; // rdi
v3 = 0;
if ( a3 )
{
v6 = *((unsigned int **)a3 + 7);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((cocos2d::CCNotificationCenter ***)v6 + 2);
for ( i = &v8[v7 - 1]; v8 <= i; ++v8 )
{
v10 = *v8;
v11 = v3;
if ( !*v8 )
break;
ScriptHandler = cocos2d::CCNotificationCenter::getScriptHandler(*v8);
++v3;
if ( ScriptHandler >= (int)cocos2d::CCNotificationCenter::getScriptHandler(a2) )
v3 = v11;
Target = cocos2d::CCNotificationObserver::getTarget(v10);
if ( Target == cocos2d::CCNotificationObserver::getTarget(a2) )
return;
}
}
}
cocos2d::CCArray::insertObject(a3, a2);
}