//
// PauseLayer::setupPlatformerLabels from 0x4907a0 to 0x490a6c (716 bytes)
//
// 1 xrefs:
// > PauseLayer::setupProgressBars @ 0x490b04
//
// 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:49:37 +0000
//
int __fastcall PauseLayer::setupPlatformerLabels(PauseLayer *this, int a2)
{
GameManager *WinSize; // r0
int v5; // r3
int v6; // r5
float v7; // r4
float v8; // r8
float v9; // s15
GameManager *v10; // r0
int v11; // r0
int PlayTimerMilli; // r4
int v13; // r7
int v14; // r4
int v15; // r6
int v16; // r1
cocos2d::CCString *v17; // r0
char *CString; // r0
cocos2d::CCString *v19; // r0
cocos2d::CCLabelBMFont *v20; // r0
const char *v21; // r2
cocos2d::CCLabelBMFont *v22; // r4
GameManager *v23; // r0
int v24; // r0
int v25; // r1
size_t v26; // r3
unsigned int v27; // r1
size_t v28; // r6
char *v29; // r11
char *v30; // r4
int v31; // r0
size_t v32; // r1
cocos2d::CCLabelBMFont *v33; // r2
const char *v34; // r2
cocos2d::CCLabelBMFont *v35; // r0
cocos2d::CCLabelBMFont *v36; // r5
int v38; // [sp+14h] [bp-50h]
float v39[2]; // [sp+18h] [bp-4Ch] BYREF
_BYTE v40[8]; // [sp+20h] [bp-44h] BYREF
_BYTE v41[8]; // [sp+28h] [bp-3Ch] BYREF
_BYTE v42[8]; // [sp+30h] [bp-34h] BYREF
int v43[2]; // [sp+38h] [bp-2Ch] BYREF
char *v44; // [sp+40h] [bp-24h]
_DWORD v45[2]; // [sp+44h] [bp-20h] BYREF
cocos2d::CCLabelBMFont *v46; // [sp+4Ch] [bp-18h]
int v47; // [sp+50h] [bp-14h] BYREF
size_t v48; // [sp+54h] [bp-10h]
void *v49; // [sp+58h] [bp-Ch]
cocos2d::CCDirector::sharedDirector(this);
WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v39);
v5 = *(_DWORD *)(GameManager::sharedState(WinSize) + 404);
v6 = *(unsigned __int8 *)(v5 + 1396);
if ( a2 )
{
if ( *(_BYTE *)(v5 + 1396) )
v7 = 27.0;
else
v7 = 35.0;
if ( *(_BYTE *)(v5 + 1396) )
v8 = 0.64;
else
v8 = 0.8;
v9 = 100.0;
if ( !*(_BYTE *)(v5 + 1396) )
v9 = 92.0;
}
else
{
v9 = 85.0;
v7 = 35.0;
v8 = 0.8;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, v39[0] * 0.5, v9 + (float)(v39[1] * 0.5));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, 0.0, COERCE_FLOAT(LODWORD(v7) ^ 0x80000000));
v10 = (GameManager *)cocos2d::CCPoint::operator+(v41, v40, v42);
v11 = GameManager::sharedState(v10);
PlayTimerMilli = GJBaseGameLayer::getPlayTimerMilli(*(GJBaseGameLayer **)(v11 + 404));
v13 = PlayTimerMilli / 1000;
v38 = PlayTimerMilli % 1000;
v14 = PlayTimerMilli / 1000 % 60;
v15 = v13 / 60 % 60;
v16 = v13 / 3600;
v43[0] = 0;
v43[1] = 0;
v44 = nullptr;
if ( v15 )
{
if ( !v16 )
{
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d.%03d",
(const char *)v15,
v14,
v38);
goto LABEL_15;
}
}
else if ( !v16 )
{
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i.%03d",
(const char *)v14,
v38);
goto LABEL_15;
}
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d:%02d.%03d",
(const char *)v16,
v15,
v14,
v38);
LABEL_15:
CString = (char *)cocos2d::CCString::getCString(v17);
std::string::assign(v43, CString);
if ( (v43[0] & 1) != 0 )
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", v44);
else
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Time: %s",
(const char *)v43 + 1);
v20 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v19);
v22 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v20, "goldFont.fnt", v21);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 121) + 232))(
*((_DWORD *)this + 121),
v22,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v22 + 92))(v22, v40);
v23 = (GameManager *)cocos2d::CCLabelBMFont::limitLabelWidth(v22, 150.0, v8, 0.0);
if ( v6 )
{
v24 = GameManager::sharedState(v23);
GameToolbox::pointsToString((GameToolbox *)&v47, *(_DWORD *)(*(_DWORD *)(v24 + 404) + 1392));
v26 = (unsigned __int8)v47;
if ( (v47 & 1) != 0 )
v25 = v47;
else
v26 = (int)(unsigned __int8)v47 >> 1;
if ( (v47 & 1) != 0 )
{
v26 = v48;
v27 = (v25 & 0xFFFFFFFE) - 1;
}
else
{
v27 = 10;
}
v28 = v26 + 8;
if ( v27 - v26 <= 7 )
{
std::string::__grow_by_and_replace((int)&v47, v27, v28 - v27, v26, 0, 0, 8u, "Points: ");
}
else
{
if ( (v47 & 1) != 0 )
v29 = (char *)v49;
else
v29 = (char *)&v47 + 1;
if ( v26 )
{
v30 = "Points: ";
if ( v29 <= "Points: " && &v29[v26] > "Points: " )
v30 = "";
memmove(v29 + 8, v29, v26);
}
else
{
v30 = "Points: ";
}
*(_DWORD *)v29 = *(_DWORD *)v30;
*((_DWORD *)v29 + 1) = *((_DWORD *)v30 + 1);
if ( (v47 & 1) != 0 )
v48 = v28;
else
LOBYTE(v47) = 2 * v28;
v29[v28] = 0;
}
v31 = v47;
v32 = v48;
v33 = (cocos2d::CCLabelBMFont *)v49;
v47 = 0;
v48 = 0;
v49 = nullptr;
v45[0] = v31;
v45[1] = v32;
v46 = v33;
std::string::~string((int)&v47);
if ( (v45[0] & 1) != 0 )
v35 = v46;
else
v35 = (cocos2d::CCLabelBMFont *)((char *)v45 + 1);
v36 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v35, "goldFont.fnt", v34);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 121) + 232))(
*((_DWORD *)this + 121),
v36,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v36 + 92))(v36, v41);
cocos2d::CCLabelBMFont::limitLabelWidth(v36, 150.0, v8, 0.0);
std::string::~string((int)v45);
}
return std::string::~string((int)v43);
}