//
// PauseLayer::setupPlatformerLabels from 0x7d7b54 to 0x7d7fcc (1144 bytes)
//
// 2 xrefs:
// > PauseLayer::setupProgressBars @ 0x7d8054
// > ??> @ 0x7c588
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:54:21 +0000
//
__int64 __fastcall PauseLayer::setupPlatformerLabels(PauseLayer *this, unsigned __int8 a2)
{
int v3; // w20
cocos2d::CCDirector *v4; // x0
GameManager *WinSize; // x0
int v6; // w21
float v7; // s8
float v8; // s1
float v9; // s9
GameManager *v10; // x0
__int64 v11; // x0
int PlayTimerMilli; // w0
const char *v13; // x1
unsigned int v14; // w2
unsigned int v15; // w3
unsigned int v16; // w4
cocos2d::CCString *v17; // x0
char *CString; // x0
char *v19; // x1
cocos2d::CCString *v20; // x0
cocos2d::CCLabelBMFont *v21; // x0
const char *v22; // x2
cocos2d::CCLabelBMFont *v23; // x24
GameManager *v24; // x0
__int64 v26; // x0
size_t v27; // x3
unsigned __int64 v28; // x1
char *v29; // x21
char *v30; // x20
size_t v31; // x3
cocos2d::CCLabelBMFont *v32; // x0
cocos2d::CCLabelBMFont *v33; // x20
size_t v34; // [xsp+68h] [xbp+68h]
__int64 v35; // [xsp+70h] [xbp+70h] BYREF
_BYTE v36[8]; // [xsp+78h] [xbp+78h] BYREF
__int64 v37; // [xsp+80h] [xbp+80h] BYREF
_BYTE v38[8]; // [xsp+88h] [xbp+88h] BYREF
__int64 v39[2]; // [xsp+90h] [xbp+90h] BYREF
char *v40; // [xsp+A0h] [xbp+A0h]
_QWORD v41[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v42; // [xsp+B8h] [xbp+B8h]
unsigned __int64 v43; // [xsp+C0h] [xbp+C0h] BYREF
size_t v44; // [xsp+C8h] [xbp+C8h]
void *v45; // [xsp+D0h] [xbp+D0h]
v3 = a2;
v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
WinSize = (GameManager *)cocos2d::CCDirector::getWinSize(&v35, v4);
v6 = *(unsigned __int8 *)(*(_QWORD *)(GameManager::sharedState(WinSize) + 544) + 1920LL);
if ( v3 )
{
if ( v6 )
{
v7 = 0.64;
v8 = 100.0;
v9 = -27.0;
}
else
{
v9 = -35.0;
v7 = 0.8;
v8 = 92.0;
}
}
else
{
v9 = -35.0;
v7 = 0.8;
v8 = 85.0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, *(float *)&v35 * 0.5, v8 + (float)(*((float *)&v35 + 1) * 0.5));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.0, v9);
v10 = (GameManager *)cocos2d::CCPoint::operator+(&v37, v36);
v11 = GameManager::sharedState(v10);
PlayTimerMilli = GJBaseGameLayer::getPlayTimerMilli(*(GJBaseGameLayer **)(v11 + 544));
v39[0] = 0;
v39[1] = 0;
v40 = nullptr;
v13 = (const char *)(unsigned int)(PlayTimerMilli / 1000 / 3600);
v14 = PlayTimerMilli / 1000 / 60 % 60;
v15 = PlayTimerMilli / 1000 % 60;
v16 = PlayTimerMilli % 1000;
if ( v14 | (unsigned int)v13 )
{
if ( (_DWORD)v13 )
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%02d:%02d:%02d.%03d", v13);
else
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d.%03d",
(const char *)v14,
v15,
v16);
}
else
{
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i.%03d",
(const char *)v15,
v16);
}
CString = (char *)cocos2d::CCString::getCString(v17);
std::string::assign(v39, CString);
v19 = (char *)v39 + 1;
if ( (v39[0] & 1) != 0 )
v19 = v40;
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", v19);
v21 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v20);
v23 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v21, "goldFont.fnt", v22);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 79) + 464LL))(
*((_QWORD *)this + 79),
v23,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v23 + 184LL))(v23, v36);
v24 = (GameManager *)cocos2d::CCLabelBMFont::limitLabelWidth(v23, 150.0, v7, 0.0);
if ( v6 )
{
v26 = GameManager::sharedState(v24);
GameToolbox::pointsToString((GameToolbox *)*(unsigned int *)(*(_QWORD *)(v26 + 544) + 1916LL), &v43);
if ( (v43 & 1) != 0 )
{
v27 = v44;
v28 = (v43 & 0xFFFFFFFFFFFFFFFELL) - 1;
if ( v28 - v44 > 7 )
{
v29 = (char *)v45;
goto LABEL_17;
}
}
else
{
v27 = (unsigned __int8)v43 >> 1;
v28 = 22;
v29 = (char *)&v43 + 1;
if ( 22 - v27 > 7 )
{
LABEL_17:
v30 = "Points: ";
if ( v27 )
{
if ( v29 <= "Points: " && &v29[v27] > "Points: " )
v30 = "";
v34 = v27;
memmove(v29 + 8, v29, v27);
v27 = v34;
}
v31 = v27 + 8;
*(_QWORD *)v29 = *(_QWORD *)v30;
if ( (v43 & 1) != 0 )
v44 = v31;
else
LOBYTE(v43) = 2 * v31;
v29[v31] = 0;
goto LABEL_23;
}
}
std::string::__grow_by_and_replace((__int64)&v43, v28, v27 + 8 - v28, v27, 0, 0, 8u, "Points: ");
LABEL_23:
v41[0] = v43;
if ( (v43 & 1) != 0 )
v32 = (cocos2d::CCLabelBMFont *)v45;
else
v32 = (cocos2d::CCLabelBMFont *)((char *)v41 + 1);
v41[1] = v44;
v42 = v45;
v33 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v32, "goldFont.fnt", (const char *)v41);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 79) + 464LL))(
*((_QWORD *)this + 79),
v33,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v33 + 184LL))(v33, &v37);
cocos2d::CCLabelBMFont::limitLabelWidth(v33, 150.0, v7, 0.0);
if ( (v41[0] & 1) != 0 )
operator delete(v42);
}
if ( (v39[0] & 1) != 0 )
operator delete(v40);
return _stack_chk_guard;
}