//
// CommentCell::likedItem from 0x100255190 to 0x10025527b (235 bytes)
//
// 2 xrefs:
// > sub_1002553E0 @ 0x1002553ec
// > ??> @ 0x1008e6a98
//
// 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 CommentCell::likedItem(CommentCell *a1, LikeItemType a2, int a3, bool a4)
{
GJComment *m_comment; // rax
int m_likeCount; // r14d
cocos2d::CCLabelBMFont *m_likeLabel; // rbx
int v7; // r15d
cocos2d::CCString *v8; // rax
const char *CString; // rax
cocos2d::CCSprite *m_iconSprite; // rbx
cocos2d::CCSpriteFrameCache *v11; // rax
const char *v12; // rsi
cocos2d::CCSpriteFrame *v13; // rax
char v14; // [rsp+0h] [rbp-20h]
m_comment = a1->m_comment;
if ( m_comment && m_comment->m_commentID == a3 )
{
m_likeCount = m_comment->m_likeCount;
if ( a4 )
{
m_comment->m_likeCount = m_likeCount + 1;
m_likeLabel = a1->m_likeLabel;
v7 = -2;
if ( !m_likeLabel )
return;
}
else
{
m_comment->m_likeCount = m_likeCount - 1;
m_likeLabel = a1->m_likeLabel;
v7 = 0;
if ( !m_likeLabel )
return;
}
v8 = (cocos2d::CCString *)sub_1007AB580("%i", v14);
CString = cocos2d::CCString::getCString(v8);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_likeLabel->setString)(m_likeLabel, CString);
m_iconSprite = a1->m_iconSprite;
v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v12 = "GJ_dislikesIcon_001.png";
if ( m_likeCount > v7 )
v12 = "GJ_likesIcon_001.png";
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, v12);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_iconSprite->setDisplayFrame)(
m_iconSprite,
v13);
}
}