//
// GJGarageLayer::updateRate from 0x100306df0 to 0x100306f78 (392 bytes)
//
// 2 xrefs:
// > sub_100306F78 @ 0x100306f7c
// > ??> @ 0x1007ec048
//
// 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 GJGarageLayer::updateRate(GJGarageLayer *a1)
{
cocos2d::CCString *v2; // x0
const char *CString; // x20
cocos2d::CCString *v4; // x0
const char *v5; // x21
cocos2d::CCSprite *m_supporter; // x22
cocos2d::CCSpriteFrameCache *v7; // x0
cocos2d::CCSpriteFrame *v8; // x0
cocos2d::CCSprite *v9; // x20
__n128 v10; // q0
cocos2d::CCSprite *v11; // x8
__n128 v12; // q1
cocos2d::CCSprite *v13; // x0
cocos2d::CCNode *m_unknown; // x0
__int16 v15; // [xsp+10h] [xbp-30h] BYREF
char v16; // [xsp+12h] [xbp-2Eh]
__int16 v17; // [xsp+14h] [xbp-2Ch] BYREF
char v18; // [xsp+16h] [xbp-2Ah]
int v19; // [xsp+18h] [xbp-28h] BYREF
if ( GameManager::sharedState()->m_ratedGame && a1->m_supporter )
{
v2 = (cocos2d::CCString *)sub_100268F4C("player_%02d_001.png", 13);
CString = cocos2d::CCString::getCString(v2);
v4 = (cocos2d::CCString *)sub_100268F4C("player_%02d_2_001.png", 13);
v5 = cocos2d::CCString::getCString(v4);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_supporter->removeAllChildrenWithCleanup)(
a1->m_supporter,
1);
m_supporter = a1->m_supporter;
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, CString);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_supporter->setDisplayFrame)(m_supporter, v8);
v9 = cocos2d::CCSprite::createWithSpriteFrameName(v5);
v10 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_supporter->addChild_0)(
a1->m_supporter,
v9,
0xFFFFFFFFLL);
v11 = a1->m_supporter;
v10.n128_f32[0] = v11->m_obRect.size.width * 0.5;
v12.n128_f32[0] = v11->m_obRect.size.height * 0.5;
sub_100022980(v10, v12, &v19);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v9->setPosition)(v9, &v19);
v13 = a1->m_supporter;
v18 = -81;
v17 = -20561;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v13->setColor)(v13, &v17);
v16 = -1;
v15 = -1;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v9->setColor)(v9, &v15);
GameManager::sharedState()->m_gameRateDelegate1 = nullptr;
}
if ( GameManager::sharedState()->m_clickedFacebook )
{
m_unknown = a1->m_unknown;
if ( m_unknown )
{
((void (__fastcall *)(cocos2d::CCNode *, __int64))m_unknown->removeAllChildrenWithCleanup)(m_unknown, 1);
GameManager::sharedState()->m_gameRateDelegate1 = nullptr;
}
}
}