//
// cocos2d::CCLayer::setTouchEnabled from 0x180050eb0 to 0x180050f20 (112 bytes)
//
// 10 xrefs:
// > ??> @ 0x1800ed278
// > ??> @ 0x1800ed738
// > ??> @ 0x1800edc70
// > ??> @ 0x1800ee1d8
// > ??> @ 0x1800ee7b0
// > ??> @ 0x1800f7080
// > ??> @ 0x18013801c
// > ??> @ 0x18013802c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b2148
//
// 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::setTouchEnabled(cocos2d::CCLayer *this, bool a2)
{
bool v3; // zf
struct cocos2d::CCDirector *v4; // rax
struct cocos2d::CCTouchDelegate *v5; // rbx
cocos2d::CCTouchDispatcher *v6; // rax
if ( this->m_bTouchEnabled != a2 )
{
v3 = !this->m_bRunning;
this->m_bTouchEnabled = a2;
if ( !v3 )
{
if ( a2 )
{
((void (__fastcall *)(cocos2d::CCLayer *))this->registerWithTouchDispatcher)(this);
}
else
{
v4 = cocos2d::CCDirector::sharedDirector();
v5 = &this->cocos2d::CCTouchDelegate;
if ( !this )
v5 = nullptr;
v6 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v4->getTouchDispatcher)(v4);
cocos2d::CCTouchDispatcher::removeDelegate(v6, v5);
}
}
}
}