//
// CreatorLayer::checkQuestsStatus from 0x1000b6418 to 0x1000b64f4 (220 bytes)
//
// 2 xrefs:
// > CreatorLayer::init @ 0x1000b5618
// > CreatorLayer::sceneWillResume @ 0x1000b6bfc
//
// 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 CreatorLayer::checkQuestsStatus(CreatorLayer *a1)
{
cocos2d::CCSprite *m_questsSprite; // x0
int v3; // w20
GameStatsManager *v4; // x0
GJChallengeItem *Challenge; // x0
cocos2d::CCSprite *v6; // x20
__n128 v7; // q1
__n128 v8; // q0
__int64 v9; // [xsp+0h] [xbp-20h] BYREF
int v10; // [xsp+8h] [xbp-18h] BYREF
m_questsSprite = a1->m_questsSprite;
if ( m_questsSprite )
{
((void (__fastcall *)(cocos2d::CCSprite *))m_questsSprite->removeAllChildren)(m_questsSprite);
v3 = 1;
while ( 1 )
{
v4 = GameStatsManager::sharedState();
Challenge = GameStatsManager::getChallenge(v4, v3);
if ( Challenge )
{
if ( Challenge->m_canClaim )
break;
}
if ( ++v3 == 4 )
return;
}
v6 = cocos2d::CCSprite::createWithSpriteFrameName("exMark_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_questsSprite->addChild_0)(
a1->m_questsSprite,
v6,
10);
((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScale)(v6, 0.8);
((void (__fastcall *)(__int64 *__return_ptr))a1->m_questsSprite->getScaledContentSize)(&v9);
v7.n128_u32[0] = HIDWORD(v9);
v8.n128_u32[0] = 20.0;
sub_100022980(v8, v7, &v10);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v6->setPosition)(v6, &v10);
}
}