//
// cocos2d::CCDirector::setNextScene from 0x5c398c to 0x5c3a4c (192 bytes)
//
// 1 xrefs:
// > cocos2d::CCDirector::drawScene @ 0x5c3bb4
//
// 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 cocos2d::CCDirector::setNextScene(cocos2d::CCDirector *a1)
{
cocos2d::CCScene *m_pRunningScene; // r5
_BOOL4 v3; // r7
cocos2d::CCScene *m_pNextScene; // r0
cocos2d::CCScene *v5; // r0
cocos2d::CCScene *v6; // r0
cocos2d::CCScene *v7; // r0
cocos2d::CCScene *v8; // r0
m_pRunningScene = a1->m_pRunningScene;
if ( m_pRunningScene )
v3 = _dynamic_cast(
a1->m_pRunningScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0) != nullptr;
else
v3 = 0;
m_pNextScene = a1->m_pNextScene;
if ( !m_pNextScene
|| !_dynamic_cast(
m_pNextScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0) )
{
if ( m_pRunningScene )
{
m_pRunningScene->onExitTransitionDidStart(m_pRunningScene);
a1->m_pRunningScene->onExit(a1->m_pRunningScene);
}
if ( a1->m_bSendCleanupToScene )
{
v8 = a1->m_pRunningScene;
if ( v8 )
v8->cleanup(v8);
}
}
v5 = a1->m_pRunningScene;
if ( v5 )
cocos2d::CCObject::release(v5);
v6 = a1->m_pNextScene;
a1->m_pRunningScene = v6;
cocos2d::CCObject::retain(v6);
a1->m_pNextScene = nullptr;
if ( !v3 )
{
v7 = a1->m_pRunningScene;
if ( v7 )
{
v7->onEnter(v7);
a1->m_pRunningScene->onEnterTransitionDidFinish(a1->m_pRunningScene);
}
}
}