//
// AchievementManager::reportAchievementWithID from 0x1000e8a48 to 0x1000e8b1c (212 bytes)
//
// 1 xrefs:
// > GameManager::reportAchievementWithID @ 0x100313d60
//
// 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 AchievementManager::reportAchievementWithID(AchievementManager *a1, const char *a2, int a3, bool a4)
{
cocos2d::CCDictionary *m_reportedAchievements; // x22
__int64 v9; // x23
AchievementManager *v10; // x0
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v12; // [xsp+1Fh] [xbp-31h]
if ( AchievementManager::percentForAchievement(a1, a2) <= 99 )
{
if ( AchievementManager::percentForAchievement(a1, a2) < a3 )
{
if ( a3 >= 100 )
a3 = 100;
m_reportedAchievements = a1->m_reportedAchievements;
v9 = sub_100268F4C("%i", a3);
sub_100009900(__p, (char *)a2);
cocos2d::CCDictionary::setObject_1(m_reportedAchievements, v9, __p);
if ( v12 < 0 )
operator delete(__p[0]);
PlatformToolbox::reportAchievementWithID(a2, a3);
}
if ( a3 >= 100 && !a4 )
{
v10 = AchievementManager::sharedState();
AchievementManager::notifyAchievementWithID(v10, a2);
}
}
}