//
// cocos2d::CCDirector::popScene from 0x1800beb70 to 0x1800bebe8 (120 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b921c
//
// 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::popScene(cocos2d::CCDirector *this)
{
int v2; // eax
cocos2d::CCArray *m_pobScenesStack; // rcx
if ( this->m_pSceneReference && this->m_pSceneReference == cocos2d::CCArray::lastObject(this->m_pobScenesStack) )
this->m_pSceneReference = nullptr;
cocos2d::CCArray::removeLastObject(this->m_pobScenesStack, 1u);
v2 = cocos2d::CCArray::count(this->m_pobScenesStack);
if ( v2 )
{
m_pobScenesStack = this->m_pobScenesStack;
this->m_bSendCleanupToScene = 1;
this->m_pNextScene = (cocos2d::CCScene *)cocos2d::CCArray::stringAtIndex(m_pobScenesStack, v2 - 1);
}
else
{
this->m_bPurgeDirecotorInNextLoop = 1;
}
}