//
// GameToolbox::msToTimeString from 0x3cfd84 to 0x3cfe30 (172 bytes)
//
// 3 xrefs:
// > GJLocalLevelScoreCell::loadFromScore @ 0x4313aa
// > GJLevelScoreCell::loadFromScore @ 0x43190a
// > LevelStatsInfoPopup::buildStatsText @ 0x79b928
//
// 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:46:40 +0000
//
GameToolbox *__fastcall GameToolbox::msToTimeString(GameToolbox *this, int a2, int a3)
{
int v4; // r8
int v5; // r7
int v6; // r6
int v7; // r0
cocos2d::CCString *v8; // r0
char *CString; // r0
v4 = a2 / 1000;
v5 = a2 % 1000;
v6 = a2 / 1000 / 60 % 60;
v7 = a2 / 1000 / 3600;
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
if ( v6 )
{
if ( v7 )
goto LABEL_8;
goto LABEL_6;
}
if ( v7 )
goto LABEL_8;
if ( a3 )
{
LABEL_6:
if ( a3 != 2 )
{
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i:%02d.%03d",
(const char *)v6,
v4 % 60,
v5,
this,
a2,
a3);
goto LABEL_9;
}
LABEL_8:
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i:%02d:%02d.%03d",
(const char *)v7,
v6,
v4 % 60,
v5,
a2,
a3);
goto LABEL_9;
}
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i.%03d",
(const char *)(v4 % 60),
v5,
0,
this,
a2,
0);
LABEL_9:
CString = (char *)cocos2d::CCString::getCString(v8);
std::string::assign((int *)this, CString);
return this;
}