//
// PlayerObject::updatePlayerShipFrame from 0x1002c65f4 to 0x1002c678c (408 bytes)
//
// 2 xrefs:
// > PlayerObject::toggleFlyMode @ 0x1002c648c
// > MenuGameLayer::resetPlayer @ 0x100442624
//
// 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 11:02:33 +0000
//
void __fastcall PlayerObject::updatePlayerShipFrame(__int64 a1, int a2)
{
int v3; // w8
__int64 v4; // x20
__int64 v5; // x0
__int64 v6; // x0
__int64 CString; // x21
__int64 v8; // x0
__int64 v9; // x22
__int64 v10; // x0
__int64 v11; // x23
__int64 v12; // x24
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x21
__int64 v17; // x0
__int64 v18; // x0
__int64 v19; // x0
__int64 v20; // x21
__int64 v21; // x0
__int64 v22; // x0
double *v23; // x0
__int64 v24; // x21
__int64 v25; // x0
char *v26; // x0
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v28; // [xsp+1Fh] [xbp-41h]
float v29; // [xsp+20h] [xbp-40h] BYREF
__int64 v30; // [xsp+28h] [xbp-38h] BYREF
if ( a2 >= 169 )
v3 = 169;
else
v3 = a2;
if ( v3 <= 1 )
v4 = 1;
else
v4 = (unsigned int)v3;
v5 = GameManager::sharedState(a1);
GameManager::loadIcon(v5, v4, 1, *(unsigned int *)(a1 + 2972));
v6 = sub_1003065B0("ship_%02d_001.png", v4);
CString = cocos2d::CCString::getCString(v6);
v8 = sub_1003065B0("ship_%02d_2_001.png", v4);
v9 = cocos2d::CCString::getCString(v8);
v10 = sub_1003065B0("ship_%02d_glow_001.png", v4);
v11 = cocos2d::CCString::getCString(v10);
v12 = *(_QWORD *)(a1 + 1832);
v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v11);
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, CString);
v15 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 1160LL))(v12, v14);
v16 = *(_QWORD *)(a1 + 1840);
v17 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v15);
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, v9);
v19 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 1160LL))(v16, v18);
v20 = *(_QWORD *)(a1 + 1864);
v21 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v19);
v22 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v21, v11);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 1160LL))(v20, v22);
v23 = (double *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1832) + 328LL))(*(_QWORD *)(a1 + 1832));
sub_100026438(&v30, v23);
v24 = *(_QWORD *)(a1 + 1840);
sub_1000262BC(&v29, *(float *)&v30 * 0.5, *((float *)&v30 + 1) * 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v24 + 184LL))(v24, &v29);
v25 = sub_1003065B0("ship_%02d_extra_001.png", v4);
v26 = (char *)cocos2d::CCString::getCString(v25);
sub_100009900(__p, v26);
sub_1002B53E0(a1, (__int64 *)__p);
if ( v28 < 0 )
operator delete(__p[0]);
}