//
// GameToolbox::pointsToString from 0x2efe48 to 0x2eff8a (322 bytes)
//
// 37 xrefs:
// > GJScoreCell::loadFromScore @ 0x337714
// > GJScoreCell::loadFromScore @ 0x337810
// > GJScoreCell::loadFromScore @ 0x337942
// > GJScoreCell::loadFromScore @ 0x337a32
// > GJScoreCell::loadFromScore @ 0x337b8c
// > GJScoreCell::loadFromScore @ 0x337ca8
// > GJScoreCell::loadFromScore @ 0x337e12
// > GJLocalLevelScoreCell::loadFromScore @ 0x3380fa
// > GJLevelScoreCell::loadFromScore @ 0x338660
// > PauseLayer::setupProgressBars @ 0x3a8392
// > LevelInfoLayer::setupPlatformerStats @ 0x3b1aae
// > LevelInfoLayer::updateLabelValues @ 0x3b2d42
// > LevelInfoLayer::updateLabelValues @ 0x3b2dbe
// > EndLevelLayer::customSetup @ 0x4295dc
// > GJBaseGameLayer::updateSpecialLabels @ 0x483a88
// > ProfilePage::onInfo @ 0x4c44a8
// > ProfilePage::onInfo @ 0x4c44ca
// > ProfilePage::onInfo @ 0x4c44de
// > ProfilePage::onInfo @ 0x4c44f4
// > ProfilePage::onInfo @ 0x4c450a
// > ProfilePage::onInfo @ 0x4c4520
// > ProfilePage::onInfo @ 0x4c458a
// > ProfilePage::loadPageFromUserInfo @ 0x4c5304
// > DemonInfoPopup::init @ 0x4c83cc
// > DemonInfoPopup::init @ 0x4c841c
// > DemonInfoPopup::init @ 0x4c85e2
// > DemonInfoPopup::init @ 0x4c863e
// > DemonInfoPopup::init @ 0x4c870e
// > DemonInfoPopup::init @ 0x4c8784
// > StarInfoPopup::init @ 0x4c8a66
// > StarInfoPopup::init @ 0x4c8bdc
// > StarInfoPopup::init @ 0x4c8c88
// > StarInfoPopup::init @ 0x4c8cfe
// > StarInfoPopup::init @ 0x4c8d78
// > GJShopLayer::init @ 0x4e3ada
// > PurchaseItemPopup::init @ 0x4e417a
// > GJPathPage::init @ 0x58dbe2
//
// 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
//
GameToolbox *__fastcall GameToolbox::pointsToString(GameToolbox *this, unsigned int a2)
{
int v3; // r9
int i; // r6
int v5; // r8
unsigned int v7; // [sp+4h] [bp-28h]
int v8; // [sp+10h] [bp-1Ch] BYREF
_DWORD *v9; // [sp+14h] [bp-18h] BYREF
void *v10; // [sp+18h] [bp-14h] BYREF
int v11; // [sp+1Ch] [bp-10h] BYREF
int v12; // [sp+20h] [bp-Ch] BYREF
if ( a2 + 999 > 0x7CE )
{
v7 = a2 >> 31;
GameToolbox::intToString((GameToolbox *)&v8, (a2 ^ ((int)a2 >> 31)) + (a2 >> 31));
v3 = 0;
v9 = &unk_ACDDA8;
for ( i = *(_DWORD *)(v8 - 12) - 1; i >= 0; --i )
{
++v3;
sub_775170(&v8);
v5 = *(unsigned __int8 *)(v8 + i);
v10 = &unk_ACDDA8;
sub_7740F8(&v10, *(v9 - 3) + 1);
sub_774560(&v10, 1, v5);
sub_77441C(&v10, &v9);
sub_774794(&v9, &v10);
sub_774008(&v10);
if ( !(v3 % 3) && i )
{
sub_2EDF90(&v11, ",", &v9);
sub_774794(&v9, &v11);
sub_774008(&v11);
}
}
if ( v7 )
{
sub_2EDF90(&v12, "-", &v9);
sub_774794(&v9, &v12);
sub_774008(&v12);
}
*(_DWORD *)this = v9;
v9 = &unk_ACDDA8;
sub_774008(&v9);
sub_774008(&v8);
}
else
{
GameToolbox::intToString(this, a2);
}
return this;
}