//
// cocos2d::CCLayer::registerWithTouchDispatcher from 0x1004b0770 to 0x1004b07ea (122 bytes)
//
// 83 xrefs:
// > LevelBrowserLayer::registerWithTouchDispatcher @ 0x100491df7
// > ??> @ 0x1008b0cd0
// > ??> @ 0x1008b1348
// > ??> @ 0x1008b18d0
// > ??> @ 0x1008b7208
// > ??> @ 0x1008c0558
// > ??> @ 0x1008c0d78
// > ??> @ 0x1008c1788
// > ??> @ 0x1008c1ec8
// > ??> @ 0x1008c2498
// > ??> @ 0x1008da738
// > ??> @ 0x1008e32a8
// > ??> @ 0x1008e3818
// > ??> @ 0x1008e3d88
// > ??> @ 0x1008e42f8
// > ??> @ 0x1008e4868
// > ??> @ 0x1008e4dd8
// > ??> @ 0x1008e5398
// > ??> @ 0x1008e5940
// > ??> @ 0x1008e5f00
// > ??> @ 0x1008e6470
// > ??> @ 0x1008e69e0
// > ??> @ 0x1008e6f90
// > ??> @ 0x1008e7520
// > ??> @ 0x1008e7a90
// > ??> @ 0x1008e8000
// > ??> @ 0x1008e85e0
// > ??> @ 0x1008e8bc0
// > ??> @ 0x1008e91a0
// > ??> @ 0x1008e9710
// > ??> @ 0x1008e9c80
// > ??> @ 0x1008ea1f0
// > ??> @ 0x1008efb40
// > ??> @ 0x1008f0108
// > ??> @ 0x1008f7c58
// > ??> @ 0x1008f9110
// > ??> @ 0x100906be0
// > ??> @ 0x10090c008
// > ??> @ 0x10090f018
// > ??> @ 0x10090f658
// > ??> @ 0x10090fbc8
// > ??> @ 0x10091ba30
// > ??> @ 0x10091fa28
// > ??> @ 0x100920030
// > ??> @ 0x100922970
// > ??> @ 0x1009268d8
// > ??> @ 0x100927b00
// > ??> @ 0x1009295e0
// > ??> @ 0x10092dd78
// > ??> @ 0x10092f2b8
// > ??> @ 0x1009321a0
// > ??> @ 0x1009375f0
// > ??> @ 0x100939c80
// > ??> @ 0x10093ab00
// > ??> @ 0x10093b628
// > ??> @ 0x10093bc68
// > ??> @ 0x10093c250
// > ??> @ 0x100943ba8
// > ??> @ 0x1009459d0
// > ??> @ 0x100945fe0
// > ??> @ 0x1009465c8
// > ??> @ 0x100948918
// > ??> @ 0x100948fd8
// > ??> @ 0x100949548
// > ??> @ 0x100949ba8
// > ??> @ 0x10094a250
// > ??> @ 0x10094a8b8
// > ??> @ 0x10095ebe0
// > ??> @ 0x100963ed0
// > ??> @ 0x100964da8
// > ??> @ 0x100972f80
// > ??> @ 0x100976b20
// > ??> @ 0x100979418
// > ??> @ 0x1009799b8
// > ??> @ 0x100979f58
// > ??> @ 0x10097d180
// > ??> @ 0x100983be0
// > ??> @ 0x100984168
// > ??> @ 0x100985b88
// > ??> @ 0x100989e38
// > ??> @ 0x100990e18
// > ??> @ 0x100991460
// > ??> @ 0x1009957a0
//
// 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::CCLayer::registerWithTouchDispatcher(cocos2d::CCLayer *a1)
{
cocos2d::CCDirector *v1; // rax
cocos2d::CCTouchDispatcher *v2; // rax
cocos2d::CCTouchScriptHandlerEntry *m_pScriptTouchHandlerEntry; // rcx
cocos2d::CCTouchDelegate *v4; // rsi
v1 = cocos2d::CCDirector::sharedDirector();
v2 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v1->getTouchDispatcher)(v1);
m_pScriptTouchHandlerEntry = a1->m_pScriptTouchHandlerEntry;
v4 = &a1->cocos2d::CCTouchDelegate;
if ( m_pScriptTouchHandlerEntry )
{
if ( !m_pScriptTouchHandlerEntry->m_bIsMultiTouches )
{
cocos2d::CCTouchDispatcher::addTargetedDelegate(
v2,
v4,
m_pScriptTouchHandlerEntry->m_nPriority,
m_pScriptTouchHandlerEntry->m_bSwallowsTouches);
return;
}
}
else if ( a1->m_eTouchMode )
{
cocos2d::CCTouchDispatcher::addTargetedDelegate(v2, v4, a1->m_nTouchPriority, 1);
return;
}
cocos2d::CCTouchDispatcher::addStandardDelegate(v2, v4, 0);
}