//
// LevelInfoLayer::onFavorite from 0x100028ed0 to 0x100028f48 (120 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x100025a4c
//
// 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 LevelInfoLayer::onFavorite(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // x8
_BOOL4 m_levelFavorited; // w20
__int64 v4; // x19
cocos2d::CCSpriteFrameCache *v5; // x0
const char *v6; // x1
cocos2d::CCSpriteFrame *v7; // x1
if ( !a1->m_isBusy )
{
m_level = a1->m_level;
m_levelFavorited = m_level->m_levelFavorited;
m_level->m_levelFavorited = !m_levelFavorited;
v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].~CCObject_0)(a2);
v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( m_levelFavorited )
v6 = "gj_heartOff_001.png";
else
v6 = "gj_heartOn_001.png";
v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, v6);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v4 + 1144LL))(v4, v7);
}
}