//
// GJPathSprite::changeToLockedArt from 0xba51f4 to 0xba5468 (628 bytes)
//
// 3 xrefs:
// > GJPathPage::playUnlockAnimation @ 0xba557c
// > GJPathSprite::updateState @ 0xba5bac
// > ??> @ 0xa27c0
//
// 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 13:02:48 +0000
//
__int64 __fastcall GJPathSprite::changeToLockedArt(GJPathSprite *this)
{
char *v1; // x21
cocos2d::CCString *v3; // x0
const char *CString; // x0
size_t v5; // x0
char v6; // w0
size_t v7; // x0
cocos2d::CCSprite *v8; // x20
void (__fastcall *v9)(cocos2d::CCSprite *, __int64 *); // x23
unsigned int v10; // w0
float v11; // s0
float v12; // s0
void (__fastcall *v13)(cocos2d::CCSprite *, __int64 *, float); // x3
const char *v14; // x1
__int64 v15; // x20
void (__fastcall *v16)(__int64, __int64 *); // x24
void (__fastcall *v17)(__int64, __int64 *); // x3
char *v19; // [xsp+48h] [xbp+48h]
__int64 v20; // [xsp+50h] [xbp+50h] BYREF
_BYTE v21[8]; // [xsp+58h] [xbp+58h] BYREF
__int64 v22; // [xsp+60h] [xbp+60h] BYREF
__int64 v23[2]; // [xsp+68h] [xbp+68h] BYREF
void *v24; // [xsp+78h] [xbp+78h]
__int64 v25[2]; // [xsp+80h] [xbp+80h] BYREF
void *v26; // [xsp+90h] [xbp+90h]
v1 = (char *)v23 + 1;
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"pathIcon_%02d_001.png",
(const char *)*((unsigned int *)this + 149));
CString = (const char *)cocos2d::CCString::getCString(v3);
v23[0] = 0;
v19 = (char *)CString;
v23[1] = 0;
v24 = nullptr;
v5 = strlen(CString);
std::string::__init(v23, v19, v5);
v6 = v23[0];
*((_BYTE *)this + 559) = 1;
if ( (v6 & 1) != 0 )
v1 = (char *)v24;
v25[0] = 0;
v25[1] = 0;
v26 = nullptr;
v7 = strlen(v1);
std::string::__init(v25, v1, v7);
v8 = CCSpriteGrayscale::createWithSpriteFrameName((char *)v25);
if ( (v25[0] & 1) != 0 )
operator delete(v26);
(*(void (__fastcall **)(GJPathSprite *, cocos2d::CCSprite *, __int64))(*(_QWORD *)this + 464LL))(
this,
v8,
0xFFFFFFFFLL);
v9 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v8 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v22, this, (const cocos2d::CCPoint *)&unk_155E870);
v9(v8, &v22);
v10 = *((_DWORD *)this + 149) - 3;
if ( v10 > 5 )
v11 = 3.0;
else
v11 = flt_1195FA0[v10];
v12 = CCSpriteWithHue::setEvenLuminance(v8, v11);
v13 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *, float))(*(_QWORD *)v8 + 960LL);
memset(&v22, 40, 3);
v13(v8, &v22, v12);
v15 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_lockGray_001.png", v14);
(*(void (__fastcall **)(GJPathSprite *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v15, 1);
v16 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v20, this, (const cocos2d::CCPoint *)&unk_155E870);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v22, &v20);
v16(v15, &v22);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, 1.0);
v17 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 960LL);
LOWORD(v22) = -14136;
BYTE2(v22) = -56;
v17(v15, &v22);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
return _stack_chk_guard;
}