//
// CommentCell::onGoToLevel from 0x60ba8c to 0x60bbd0 (324 bytes)
//
// 3 xrefs:
// > ??> @ 0xad688
// > CommentCell::loadFromComment @ 0x617b9c
// > ??> @ 0x122dfd8
//
// 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 CommentCell::onGoToLevel(CommentCell *a1, cocos2d::CCObject *a2)
{
GJComment *m_comment; // x0
unsigned __int64 m_levelID; // x0
int v4; // w21
GJSearchObject *v5; // x20
void *v6; // x0
cocos2d::CCDirector *v7; // x21
cocos2d::CCScene *v8; // x0
cocos2d::CCTransitionFade *v9; // x0
unsigned int *v10; // x2
int v11; // w1
__int64 v12; // [xsp+50h] [xbp+50h] BYREF
m_comment = a1->m_comment;
if ( m_comment )
{
m_levelID = (unsigned int)m_comment->m_levelID;
if ( (_DWORD)m_levelID )
{
if ( (m_levelID & 0x80000000) != 0LL )
{
m_levelID = (unsigned int)-(int)m_levelID;
v4 = 1;
}
else
{
v4 = 0;
}
GameToolbox::intToString(&v12, (GameToolbox *)m_levelID);
v5 = GJSearchObject::create((SearchType)0);
v6 = (void *)(v12 - 24);
if ( (__int64 *)(v12 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v12 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *(_DWORD *)(v12 - 8);
*(_DWORD *)(v12 - 8) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v6);
}
v5->m_searchMode = v4;
v7 = cocos2d::CCDirector::sharedDirector();
v8 = LevelBrowserLayer::scene(v5);
v9 = cocos2d::CCTransitionFade::create(0.5, v8);
cocos2d::CCDirector::pushScene(v7, v9);
}
}
}