//
// cocos2d::CCDirector::drawScene from 0x1800be3d0 to 0x1800be4e5 (277 bytes)
//
// 3 xrefs:
// > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beb06
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b918c
//
// 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::drawScene(cocos2d::CCDirector *this)
{
cocos2d::CCEGLView *m_pobOpenGLView; // rcx
cocos2d::CCScene *m_pRunningScene; // rcx
cocos2d::CCNode *m_pNotificationNode; // rcx
struct cocos2d::timezone *v5; // r8
cocos2d::CCEGLView *v6; // rcx
struct cocos2d::cc_timeval v7; // [rsp+30h] [rbp+8h] BYREF
if ( !this->m_bPaused )
((void (__fastcall *)(cocos2d::CCScheduler *))this->m_pScheduler->update)(this->m_pScheduler);
m_pobOpenGLView = this->m_pobOpenGLView;
if ( m_pobOpenGLView )
((void (__fastcall *)(cocos2d::CCEGLView *))m_pobOpenGLView->pollInputEvents)(m_pobOpenGLView);
glClear(0x4100u);
if ( this->m_pNextScene )
cocos2d::CCDirector::setNextScene(this);
kmGLPushMatrix();
m_pRunningScene = this->m_pRunningScene;
if ( m_pRunningScene )
((void (__fastcall *)(cocos2d::CCScene *))m_pRunningScene->visit)(m_pRunningScene);
m_pNotificationNode = this->m_pNotificationNode;
if ( m_pNotificationNode )
((void (__fastcall *)(cocos2d::CCNode *))m_pNotificationNode->visit)(m_pNotificationNode);
if ( this->m_bDisplayStats )
cocos2d::CCDirector::showStats(this);
if ( this->m_bDisplayFPS )
cocos2d::CCDirector::showFPSLabel(this);
kmGLPopMatrix();
v6 = this->m_pobOpenGLView;
++this->m_uTotalFrames;
if ( v6 )
((void (__fastcall *)(cocos2d::CCEGLView *))v6->swapBuffers)(v6);
if ( this->m_bDisplayStats )
{
cocos2d::CCTime::gettimeofdayCocos2d(&v7, nullptr, v5);
this->m_fSecondsPerFrame = (float)((float)(v7.tv_usec - this->m_pLastUpdate->tv_usec) / 1000000.0)
+ (float)(v7.tv_sec - this->m_pLastUpdate->tv_sec);
}
}