//
// cocos2d::CCTouchDispatcher::forceAddHandler from 0x1800b2d50 to 0x1800b2e05 (181 bytes)
//
// 5 xrefs:
// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1800b2ac2
// > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1800b2ba6
// > cocos2d::CCTouchDispatcher::touches @ 0x1800b3689
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b8658
//
// 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 __fastcall cocos2d::CCTouchDispatcher::forceAddHandler(
cocos2d::CCTouchDispatcher *this,
cocos2d::CCNotificationCenter *a2,
struct cocos2d::CCArray *a3)
{
int v3; // esi
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCNotificationCenter **arr; // rbx
cocos2d::CCNotificationCenter **i; // r15
cocos2d::CCNotificationCenter *v10; // rbp
int v11; // r14d
int ScriptHandler; // edi
struct cocos2d::CCObject *Target; // rdi
v3 = 0;
if ( a3 )
{
data = a3->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (cocos2d::CCNotificationCenter **)data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v10 = *arr;
v11 = v3;
if ( !*arr )
break;
ScriptHandler = cocos2d::CCNotificationCenter::getScriptHandler(*arr);
++v3;
if ( ScriptHandler >= (int)cocos2d::CCNotificationCenter::getScriptHandler(a2) )
v3 = v11;
Target = cocos2d::CCNotificationObserver::getTarget((cocos2d::CCNotificationObserver *)v10);
if ( Target == cocos2d::CCNotificationObserver::getTarget((cocos2d::CCNotificationObserver *)a2) )
return;
}
}
}
cocos2d::CCArray::insertObject(a3, a2);
}