//
// PlayerObject::updatePlayerBirdFrame from 0x341454 to 0x3415dc (392 bytes)
//
// 2 xrefs:
// > PlayerObject::toggleBirdMode @ 0x347090
// > MenuGameLayer::resetPlayer @ 0x3a9a88
//
// 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
//
void PlayerObject::updatePlayerBirdFrame(PlayerObject *a1, int a2)
{
const char *v3; // r5
GameManager *v4; // r0
cocos2d::CCString *v5; // r0
const char *CString; // r8
cocos2d::CCString *v7; // r0
const char *v8; // r11
cocos2d::CCString *v9; // r0
const char *v10; // r10
cocos2d::CCString *v11; // r0
const char *v12; // r0
cocos2d::CCSprite *m_vehicleSprite; // r6
const char *v14; // r9
cocos2d::CCSpriteFrameCache *v15; // r0
cocos2d::CCSpriteFrame *v16; // r0
cocos2d::CCSprite *m_vehicleSpriteSecondary; // r6
void (__fastcall *v18)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r8
cocos2d::CCSpriteFrameCache *v19; // r0
cocos2d::CCSpriteFrame *v20; // r0
cocos2d::CCSprite *m_birdVehicle; // r6
void (__fastcall *v22)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r8
cocos2d::CCSpriteFrameCache *v23; // r0
cocos2d::CCSpriteFrame *v24; // r0
cocos2d::CCSprite *m_vehicleGlow; // r6
void (__fastcall *v26)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r8
cocos2d::CCSpriteFrameCache *v27; // r0
cocos2d::CCSpriteFrame *v28; // r0
const cocos2d::CCSize *v29; // r0
cocos2d::CCSprite *v30; // r8
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCSprite *v32; // r8
void (__fastcall *v33)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
const cocos2d::CCPoint *v34; // r0
cocos2d::CCString *v35; // r0
char *v36; // r0
void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // [sp+4h] [bp-20h]
cocos2d::CCSize v38; // [sp+Ch] [bp-18h] BYREF
cocos2d::CCPoint v39; // [sp+14h] [bp-10h] BYREF
if ( a2 <= 0 )
{
v3 = (_BYTE *)(&dword_0 + 1);
}
else
{
if ( a2 >= 149 )
a2 = 149;
v3 = (const char *)a2;
}
v4 = GameManager::sharedState();
GameManager::loadIcon(v4, (int)v3, 3, a1->m_iconRequestID);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"bird_%02d_001.png", v3);
CString = cocos2d::CCString::getCString(v5);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"bird_%02d_2_001.png", v3);
v8 = cocos2d::CCString::getCString(v7);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"bird_%02d_3_001.png", v3);
v10 = cocos2d::CCString::getCString(v9);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"bird_%02d_glow_001.png", v3);
v12 = cocos2d::CCString::getCString(v11);
m_vehicleSprite = a1->m_vehicleSprite;
setDisplayFrame = m_vehicleSprite->setDisplayFrame;
v14 = v12;
v15 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v16 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v15, CString);
setDisplayFrame(m_vehicleSprite, v16);
m_vehicleSpriteSecondary = a1->m_vehicleSpriteSecondary;
v18 = m_vehicleSpriteSecondary->setDisplayFrame;
v19 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v20 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v8);
v18(m_vehicleSpriteSecondary, v20);
m_birdVehicle = a1->m_birdVehicle;
v22 = m_birdVehicle->setDisplayFrame;
v23 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v24 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v23, v10);
v22(m_birdVehicle, v24);
m_vehicleGlow = a1->m_vehicleGlow;
v26 = m_vehicleGlow->setDisplayFrame;
v27 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v28 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v27, v14);
v26(m_vehicleGlow, v28);
v29 = a1->m_vehicleSprite->getContentSize(a1->m_vehicleSprite);
cocos2d::CCSize::CCSize(&v38, v29);
v30 = a1->m_vehicleSpriteSecondary;
setPosition = v30->setPosition;
cocos2d::CCPoint::CCPoint(&v39, v38.width * 0.5, v38.height * 0.5);
setPosition(v30, &v39);
v32 = a1->m_birdVehicle;
v33 = v32->setPosition;
v34 = a1->m_vehicleSpriteSecondary->getPosition(a1->m_vehicleSpriteSecondary);
v33(v32, v34);
v35 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"bird_%02d_extra_001.png", v3);
v36 = (char *)cocos2d::CCString::getCString(v35);
sub_776584((int)&v39, v36);
PlayerObject::updateShipSpriteExtra((int)a1, (const char **)&v39);
sub_774008(&v39);
}