//
// cocos2d::CCDirector::pushScene from 0x1800bef90 to 0x1800bf04e (190 bytes)
//
// 3 xrefs:
// > cocos2d::CCDirector::runWithScene @ 0x1800bf309
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b9270
//
// 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
//
char __fastcall cocos2d::CCDirector::pushScene(cocos2d::CCDirector *this, struct cocos2d::CCScene *a2)
{
__int64 v5; // rax
bool v6; // si
cocos2d::CCScene *m_pNextScene; // rdi
cocos2d::CCSceneDelegate *m_pAppDelegate; // rcx
cocos2d::CCSceneDelegate *m_pDelegate; // rcx
if ( this->m_bIsTransitioning )
return 0;
this->m_bSendCleanupToScene = 0;
cocos2d::CCArray::addObject(this->m_pobScenesStack, a2);
this->m_pNextScene = a2;
v5 = _RTDynamicCast(
a2,
0,
&cocos2d::CCScene `RTTI Type Descriptor',
&cocos2d::CCTransitionScene `RTTI Type Descriptor',
0);
v6 = v5 != 0;
if ( !v5 )
{
m_pNextScene = this->m_pNextScene;
if ( !this->m_bDontCallWillSwitch )
{
m_pAppDelegate = this->m_pAppDelegate;
if ( m_pAppDelegate )
((void (__fastcall *)(cocos2d::CCSceneDelegate *, cocos2d::CCScene *))m_pAppDelegate->willSwitchToScene)(
m_pAppDelegate,
this->m_pNextScene);
m_pDelegate = m_pNextScene->m_pDelegate;
if ( m_pDelegate )
((void (__fastcall *)(cocos2d::CCSceneDelegate *))m_pDelegate->willSwitchToScene)(m_pDelegate);
}
}
this->m_bIsTransitioning = v6;
return 1;
}