//
// SimplePlayer::updatePlayerFrame from 0x8bc5a8 to 0x8bca10 (1128 bytes)
//
// 31 xrefs:
// > GJThreadCell::loadFromThread @ 0x73e3c8
// > GJScoreCell::loadFromScore @ 0x743454
// > GJCompactUserCell::buildUserRow @ 0x744978
// > GJLevelScoreCell::loadFromScore @ 0x7495a0
// > CommentCell::loadFromComment @ 0x74bda0
// > GJGarageLayer::onSelect @ 0x8bcbb8
// > SimplePlayer::asyncLoadIcon @ 0x8bcf68
// > SimplePlayer::iconFinishedLoading @ 0x8bcf80
// > SimplePlayer::init @ 0x8bd81c
// > GJItemIcon::init @ 0x8bdd50
// > GJGarageLayer::init @ 0x8c2120
// > GJGarageLayer::init @ 0x8c2f94
// > GJGarageLayer::init @ 0x8c2fbc
// > GJGarageLayer::init @ 0x8c2fe4
// > GJGarageLayer::init @ 0x8c300c
// > GJGarageLayer::init @ 0x8c3034
// > GJGarageLayer::init @ 0x8c305c
// > GJGarageLayer::init @ 0x8c3084
// > GJBaseGameLayer::playExitDualEffect @ 0x99ea54
// > GJBaseGameLayer::playExitDualEffect @ 0x99ea78
// > GJBaseGameLayer::playExitDualEffect @ 0x99ee0c
// > GJBaseGameLayer::playExitDualEffect @ 0x99ee30
// > GJBaseGameLayer::playExitDualEffect @ 0x99ee54
// > GJBaseGameLayer::playExitDualEffect @ 0x99ee78
// > ProfilePage::loadPageFromUserInfo @ 0xa59e2c
// > CharacterColorPage::toggleShip @ 0xb5121c
// > CharacterColorPage::init @ 0xb527f4
// > CharacterColorPage::init @ 0xb52cdc
// > sub_C630DC @ 0xc631c0
// > ThreadViewPopup::mountVirtualRow @ 0xc8b40c
// > ??> @ 0x78358
//
// 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:56:28 +0000
//
__int64 __fastcall SimplePlayer::updatePlayerFrame(__int64 a1, int a2, int a3)
{
int v6; // w25
__int64 v7; // x0
__int64 v8; // x0
GameManager *v9; // x0
unsigned int v10; // w23
__int64 **v11; // x0
char *v12; // x1
cocos2d::CCString *v13; // x0
const char *CString; // x25
char *v15; // x1
cocos2d::CCString *v16; // x0
const char *v17; // x26
const char *v18; // x24
cocos2d::CCString *v19; // x0
const char *v20; // x27
char *v21; // x1
cocos2d::CCString *v22; // x0
const char *v23; // x0
__int64 v24; // x20
void (__fastcall *v25)(__int64, _BYTE *); // x21
GJRobotSprite *v27; // x0
__int64 v28; // x2
char *v29; // x1
cocos2d::CCString *v30; // x0
__int64 v31; // x20
void (__fastcall *v32)(__int64, _BYTE *); // x21
_BYTE v33[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v34[2]; // [xsp+70h] [xbp+70h] BYREF
char *v35; // [xsp+80h] [xbp+80h]
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
switch ( a3 )
{
case 1:
std::string::assign(v34, "ship");
v6 = 169;
break;
case 2:
std::string::assign(v34, "player_ball");
v6 = 118;
break;
case 3:
std::string::assign(v34, "bird");
v6 = 149;
break;
case 4:
std::string::assign(v34, "dart");
v6 = 96;
break;
case 5:
std::string::assign(v34, "robot");
v6 = 68;
break;
case 6:
std::string::assign(v34, "spider");
v6 = 69;
break;
case 7:
std::string::assign(v34, "swing");
v6 = 43;
break;
case 8:
std::string::assign(v34, "jetpack");
v6 = 8;
break;
default:
std::string::assign(v34, "player");
v6 = 485;
break;
}
v7 = *(_QWORD *)(a1 + 640);
if ( v7 )
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v7 + 344LL))(v7, a3 == 5);
v8 = *(_QWORD *)(a1 + 648);
if ( v8 )
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 344LL))(v8, a3 == 6);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 600) + 344LL))(
*(_QWORD *)(a1 + 600),
(unsigned int)(a3 - 5) > 1);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 608) + 344LL))(
*(_QWORD *)(a1 + 608),
(unsigned int)(a3 - 5) > 1);
v9 = (GameManager *)(*(__int64 (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 616) + 344LL))(
*(_QWORD *)(a1 + 616),
(unsigned int)(a3 - 5) > 1);
if ( v6 < a2 || (v10 = 1, a2 > 0) )
{
if ( v6 > a2 )
v10 = a2;
else
v10 = v6;
}
v11 = (__int64 **)GameManager::sharedState(v9);
GameManager::loadIcon(v11, v10, a3, *(_DWORD *)(a1 + 664));
if ( a3 == 5 )
{
v27 = *(GJRobotSprite **)(a1 + 640);
if ( !v27 )
{
SimplePlayer::createRobotSprite((__int64 *)a1, v10);
v28 = *(_QWORD *)(a1 + 640);
goto LABEL_36;
}
LABEL_33:
GJRobotSprite::updateFrame(v27, v10);
goto LABEL_24;
}
if ( a3 == 6 )
{
v27 = *(GJRobotSprite **)(a1 + 648);
if ( !v27 )
{
SimplePlayer::createSpiderSprite((SimplePlayer *)a1, v10);
v28 = *(_QWORD *)(a1 + 648);
LABEL_36:
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v28 + 344LL))(v28, 1);
goto LABEL_24;
}
goto LABEL_33;
}
v12 = (char *)v34 + 1;
if ( (v34[0] & 1) != 0 )
v12 = v35;
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_001.png", v12, v10);
CString = (const char *)cocos2d::CCString::getCString(v13);
v15 = (char *)v34 + 1;
if ( (v34[0] & 1) != 0 )
v15 = v35;
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_2_001.png", v15, v10);
v17 = (const char *)cocos2d::CCString::getCString(v16);
v18 = nullptr;
if ( a3 == 3 )
{
v29 = (char *)v34 + 1;
if ( (v34[0] & 1) != 0 )
v29 = v35;
v30 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_3_001.png", v29, v10);
v18 = (const char *)cocos2d::CCString::getCString(v30);
if ( (v34[0] & 1) == 0 )
goto LABEL_17;
}
else if ( (v34[0] & 1) == 0 )
{
LABEL_17:
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s_%02d_glow_001.png",
(const char *)v34 + 1,
v10);
goto LABEL_18;
}
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_glow_001.png", v35, v10);
LABEL_18:
v20 = (const char *)cocos2d::CCString::getCString(v19);
v21 = (char *)v34 + 1;
if ( (v34[0] & 1) != 0 )
v21 = v35;
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_extra_001.png", v21, v10);
v23 = (const char *)cocos2d::CCString::getCString(v22);
SimplePlayer::setFrames((SimplePlayer *)a1, CString, v17, v18, v20, v23);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 600) + 160LL))(*(_QWORD *)(a1 + 600), 1.0);
if ( a3 == 2 )
{
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 600) + 160LL))(*(_QWORD *)(a1 + 600), 0.9);
}
else if ( a3 == 3 )
{
v31 = *(_QWORD *)(a1 + 600);
v32 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v31 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, -7.0);
v32(v31, v33);
goto LABEL_24;
}
v24 = *(_QWORD *)(a1 + 600);
v25 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, 0.0);
v25(v24, v33);
LABEL_24:
if ( (v34[0] & 1) != 0 )
operator delete(v35);
return _stack_chk_guard;
}