//
// GameManager::completedAchievement from 0x419210 to 0x41929a (138 bytes)
//
// 2 xrefs:
// > GameManager::reportAchievementWithID @ 0x4192e4
// > GameManager::verifyAchievementUnlocks @ 0x4198f2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:47:42 +0000
//
int __fastcall GameManager::completedAchievement(AchievementManager *a1, int a2)
{
PlatformToolbox *v4; // r0
int result; // r0
int v6; // r4
unsigned int v7; // r0
int v8; // r3
int v9; // [sp+0h] [bp-1Ch] BYREF
int v10; // [sp+4h] [bp-18h] BYREF
int v11[3]; // [sp+8h] [bp-14h] BYREF
v9 = 0;
v10 = 0;
if ( (*(_BYTE *)a2 & 1) != 0 )
v4 = *(PlatformToolbox **)(a2 + 8);
else
v4 = (PlatformToolbox *)(a2 + 1);
PlatformToolbox::logEvent(v4, (const char *)a2);
std::string::basic_string(v11, a2);
GameManager::getUnlockForAchievement(a1, (int)v11, &v9, &v10);
result = std::string::~string((int)v11);
if ( v10 )
{
if ( (unsigned int)(v10 - 2) > 1 )
{
v6 = v9;
v7 = GameManager::unlockTypeToIconType(a1, v10);
return GameManager::unlockIcon((int)a1, v6, v7, v8);
}
else
{
return GameManager::unlockColor((int)a1, v9, v10, v10 - 2);
}
}
return result;
}