//
// cocos2d::CCDirector::runWithScene from 0x100484100 to 0x100484197 (151 bytes)
//
// 1 xrefs:
// > AppDelegate::applicationDidFinishLaunching @ 0x10065c1f2
//
// 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::CCDirector::runWithScene(cocos2d::CCDirector *a1, cocos2d::CCScene *a2)
{
cocos2d::CCScene *v3; // r14
__int64 v4; // rdx
_BOOL8 v5; // rcx
void *v6; // rax
cocos2d::CCSceneDelegate *m_pAppDelegate; // rdi
cocos2d::CCSceneDelegate *m_pDelegate; // rdi
if ( !a1->m_bIsTransitioning )
{
v3 = a2;
a1->m_bSendCleanupToScene = 0;
sub_10071FCD0(a1->m_pobScenesStack, a2);
a1->m_pNextScene = a2;
if ( !a2
|| (a2 = (cocos2d::CCScene *)&`typeinfo for'cocos2d::CCScene,
v6 = __dynamic_cast(
v3,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0),
LOBYTE(v5) = 1,
!v6) )
{
if ( !a1->m_bDontCallWillSwitch )
{
m_pAppDelegate = a1->m_pAppDelegate;
if ( m_pAppDelegate )
{
a2 = v3;
((void (__fastcall *)(cocos2d::CCSceneDelegate *, cocos2d::CCScene *, __int64, _BOOL8))m_pAppDelegate->willSwitchToScene)(
m_pAppDelegate,
v3,
v4,
v5);
}
m_pDelegate = v3->m_pDelegate;
if ( m_pDelegate )
((void (__fastcall *)(cocos2d::CCSceneDelegate *, cocos2d::CCScene *, __int64, _BOOL8))m_pDelegate->willSwitchToScene)(
m_pDelegate,
a2,
v4,
v5);
}
LOBYTE(v5) = 0;
}
a1->m_bIsTransitioning = v5;
}
((void (__fastcall *)(cocos2d::CCDirector *, cocos2d::CCScene *))a1->startAnimation)(a1, a2);
}