//
// GJPathSprite::updateState from 0x140289220 to 0x140289400 (480 bytes)
//
// 3 xrefs:
// > GJPathsLayer::init @ 0x140285022
// > GJPathPage::init @ 0x140285dec
// > ??> @ 0x1406d1610
//
// 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
//
// Hidden C++ exception states: #wind=3
void GJPathSprite::updateState(GJPathSprite *a1)
{
int m_pathNumber; // ebx
GameStatsManager *v3; // rdi
const char *v4; // rax
int Stat; // ebx
signed int v6; // edx
const char *v7; // rax
struct cocos2d::CCLabelBMFont *v8; // rdi
float v9; // xmm0_4
struct cocos2d::CCPoint v10; // rax
void *v11; // [rsp+20h] [rbp-48h] BYREF
struct cocos2d::CCPoint v12; // [rsp+30h] [rbp-38h] BYREF
_QWORD v13[4]; // [rsp+38h] [rbp-30h] BYREF
if ( !qword_1406C2EE8 )
{
v11 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
}
if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, a1->m_pathNumber + 5) )
{
m_pathNumber = a1->m_pathNumber;
v3 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v11 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v3 = (GameStatsManager *)qword_1406C2EE8;
}
v4 = (const char *)GameToolbox::intToString(v13, m_pathNumber + 29);
if ( *((_QWORD *)v4 + 3) > 0xFu )
v4 = *(const char **)v4;
Stat = GameStatsManager::getStat(v3, v4);
sub_14003A830((__int64)v13);
v6 = (int)floorf((float)Stat / 100.0);
if ( v6 < 10 )
{
v7 = (const char *)GameToolbox::intToString(v13, v6);
if ( *((_QWORD *)v7 + 3) > 0xFu )
v7 = *(const char **)v7;
v8 = cocos2d::CCLabelBMFont::create(v7, (const char *)&qword_14052A4D8);
sub_14003A830((__int64)v13);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v8->setScale_0)(v8);
v9 = ((float (__fastcall *)(GJPathSprite *, struct cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v8, 1);
cocos2d::CCPoint::CCPoint(v9, 0.0);
v10 = cocos2d::CCNode::convertToNodeSpace(a1, &v12);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(v10, &v11);
v8->setPosition_0(v8, (const cocos2d::CCPoint *)&v11);
}
else
{
GJPathSprite::addShardSprite(a1);
}
}
else
{
GJPathSprite::changeToLockedArt(a1);
}
}