//
// cocos2d::CCTouchDispatcher::addStandardDelegate from 0x1800b2a80 to 0x1800b2b12 (146 bytes)
//
// 3 xrefs:
// > cocos2d::CCLayer::registerWithTouchDispatcher @ 0x18005096b
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b8628
//
// 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::addStandardDelegate(
cocos2d::CCTouchDispatcher *this,
struct cocos2d::CCTouchDelegate *a2,
int a3)
{
struct cocos2d::CCStandardTouchHandler *v5; // rax
struct cocos2d::CCObject *v6; // rsi
v5 = cocos2d::CCStandardTouchHandler::handlerWithDelegate(a2, a3);
v6 = v5;
if ( this->m_bLocked )
{
if ( sub_18009E1B0((__int64)this->m_pHandlersToRemove, (__int64)a2) )
{
sub_18009E300((__int64)this->m_pHandlersToRemove, (__int64)a2);
}
else
{
cocos2d::CCArray::addObject(this->m_pHandlersToAdd, v6);
this->m_bToAdd = 1;
}
}
else
{
cocos2d::CCTouchDispatcher::forceAddHandler(this, v5, this->m_pStandardHandlers);
}
}