//
// GJMessageCell::markAsRead from 0x339f48 to 0x339fa0 (88 bytes)
//
// 2 xrefs:
// > GJMessageCell::onViewMessage @ 0x339faa
// > GJMessageCell::FLAlert_Clicked @ 0x33a000
//
// 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 GJMessageCell::markAsRead(GJMessageCell *a1)
{
GJUserMessage *m_message; // r3
_BOOL4 m_read; // r4
cocos2d::CCLayer *m_mainLayer; // r0
int v4; // r0
GameLevelManager *v5; // r4
GJAccountManager *v6; // r0
GJUserScore *v7; // r0
m_message = a1->m_message;
m_read = m_message->m_read;
if ( !m_message->m_read )
{
m_mainLayer = a1->m_mainLayer;
m_message->m_read = 1;
v4 = (int)m_mainLayer->getChildByTag(m_mainLayer, 100);
if ( v4 )
(*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v4 + 164))(v4, m_read);
v5 = GameLevelManager::sharedState();
v6 = GJAccountManager::sharedState();
v7 = GameLevelManager::userInfoForAccountID(v5, v6->m_accountID - v6->m_unkInt1);
if ( v7 )
v7->m_newMsgCount = (v7->m_newMsgCount - 1) & ~((v7->m_newMsgCount - 1) >> 31);
}
}