//
// cocos2d::CCLayer::onExit from 0x1800506e0 to 0x1800507f5 (277 bytes)
//
// 8 xrefs:
// > cocos2d::CCMenu::onExit @ 0x180059884
// > ??> @ 0x1800ed1a8
// > ??> @ 0x1800ed668
// > ??> @ 0x1800edba0
// > ??> @ 0x1800ee108
// > ??> @ 0x1800ee6e0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b2004
//
// 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::onExit(cocos2d::CCLayer *this)
{
struct cocos2d::CCDirector *v2; // rax
struct cocos2d::CCDirector *v3; // rsi
struct cocos2d::CCTouchDelegate *v4; // rbx
cocos2d::CCTouchDispatcher *v5; // rax
cocos2d::CCAccelerometer *v6; // rax
struct cocos2d::CCObject *v7; // rbx
cocos2d::CCMouseDispatcher *v8; // rax
struct cocos2d::CCObject *v9; // rbx
cocos2d::CCMouseDispatcher *v10; // rax
struct cocos2d::CCObject *v11; // rbx
cocos2d::CCMouseDispatcher *v12; // rax
v2 = cocos2d::CCDirector::sharedDirector();
v3 = v2;
if ( this->m_bTouchEnabled )
{
v4 = &this->cocos2d::CCTouchDelegate;
if ( !this )
v4 = nullptr;
v5 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getTouchDispatcher)(v2);
cocos2d::CCTouchDispatcher::removeDelegate(v5, v4);
}
if ( this->m_bAccelerometerEnabled )
{
v6 = (cocos2d::CCAccelerometer *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getAccelerometer)(v3);
cocos2d::CCAccelerometer::setDelegate(v6, nullptr);
}
if ( this->m_bKeypadEnabled )
{
v7 = (struct cocos2d::CCObject *)&this->cocos2d::CCKeypadDelegate;
if ( !this )
v7 = nullptr;
v8 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getKeypadDispatcher)(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v8, v7);
}
if ( this->m_bKeyboardEnabled )
{
v9 = (struct cocos2d::CCObject *)&this->cocos2d::CCKeyboardDelegate;
if ( !this )
v9 = nullptr;
v10 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getKeyboardDispatcher)(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v10, v9);
}
if ( this->m_bMouseEnabled )
{
v11 = (struct cocos2d::CCObject *)&this->cocos2d::CCMouseDelegate;
if ( !this )
v11 = nullptr;
v12 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getMouseDispatcher)(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v12, v11);
}
cocos2d::CCNode::onExit(this);
}