//
// PlayerObject::updatePlayerArt from 0x62683c to 0x626be4 (936 bytes)
//
// 7 xrefs:
// > PlayerObject::rotateGameplayOnly @ 0x626bf8
// > PlayerObject::modeDidChange @ 0x626c0c
// > PlayerObject::doReversePlayer @ 0x62a340
// > PlayerObject::doReversePlayer @ 0x62a3ac
// > PlayerObject::flipGravity @ 0x62e884
// > PlayerObject::rotateGameplay @ 0x6305cc
// > ??> @ 0xc8790
//
// 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::updatePlayerArt(PlayerObject *a1)
{
cocos2d::CCNode *m_mainLayer; // x20
void (__fastcall *setScaleX)(cocos2d::CCNode *__hidden, float); // x21
int v4; // w0
long double v5; // q0
cocos2d::CCNode *v6; // x20
void (__fastcall *setScaleY)(cocos2d::CCNode *__hidden, float); // x21
long double v8; // q0
int v9; // w0
float v10; // s8
int v11; // w0
float x; // w1
float v13; // w1
int v14; // w0
float v15; // s8
float v16; // s0
float v17; // s1
float v18; // w1
float v19; // s0
float v20; // s1
float v21; // w1
float v22; // s0
float v23; // s1
float v24; // s8
cocos2d::CCPoint v25; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v26; // [xsp+48h] [xbp+48h] BYREF
cocos2d::CCPoint v27; // [xsp+50h] [xbp+50h] BYREF
m_mainLayer = a1->m_mainLayer;
setScaleX = m_mainLayer->setScaleX;
v4 = PlayerObject::reverseMod(a1);
setScaleX(m_mainLayer, (float)v4);
if ( a1->m_isSwing || a1->m_isBall || PlayerObject::isInNormalMode(a1) )
{
v6 = a1->m_mainLayer;
LODWORD(v5) = 1.0;
setScaleY = v6->setScaleY;
}
else
{
v6 = a1->m_mainLayer;
if ( a1->m_isSideways )
v24 = -1.0;
else
v24 = 1.0;
setScaleY = v6->setScaleY;
*(float *)&v5 = v24 * (float)PlayerObject::flipMod(a1);
}
setScaleY(v6, v5);
LODWORD(v8) = 0;
if ( a1->m_isSideways )
LODWORD(v8) = -1028390912;
a1->m_mainLayer->setRotation(a1->m_mainLayer, v8);
v9 = PlayerObject::flipMod(a1);
if ( a1->m_isSideways )
{
v10 = 0.0;
if ( a1->m_isUpsideDown )
v10 = 180.0;
}
else
{
v10 = (float)(90 * v9);
}
a1->m_playerGroundParticles->setAngle(a1->m_playerGroundParticles, v10);
a1->m_trailingParticles->setAngle(a1->m_trailingParticles, v10);
a1->m_shipClickParticles->setAngle(a1->m_shipClickParticles, v10);
v11 = PlayerObject::flipMod(a1);
cocos2d::CCPoint::CCPoint(&v25, 0.0, (float)(-300 * v11));
if ( a1->m_isSideways )
{
x = v25.x;
v25.x = v25.y;
v25.y = x;
}
a1->m_playerGroundParticles->setGravity(a1->m_playerGroundParticles, &v25);
a1->m_trailingParticles->setGravity(a1->m_trailingParticles, &v25);
a1->m_shipClickParticles->setGravity(a1->m_shipClickParticles, &v25);
cocos2d::CCPoint::CCPoint(&v26, 0.0, 2.0);
if ( a1->m_isSideways )
{
v13 = v26.x;
v26.x = v26.y;
v26.y = v13;
}
a1->m_trailingParticles->setPosVar(a1->m_trailingParticles, &v26);
a1->m_shipClickParticles->setPosVar(a1->m_shipClickParticles, &v26);
v14 = PlayerObject::flipMod(a1);
if ( a1->m_isSideways )
{
if ( a1->m_isUpsideDown )
v15 = 60.0;
else
v15 = 240.0;
}
else
{
v15 = (float)(330 * v14);
}
a1->m_ufoClickParticles->setAngle(a1->m_ufoClickParticles, v15);
a1->m_robotBurstParticles->setAngle(a1->m_robotBurstParticles, v15);
cocos2d::CCPoint::CCPoint(&v27, 5.0, 1.0);
cocos2d::CCPoint::operator=(&v26, v16, v17);
if ( a1->m_isSideways )
{
v18 = v26.x;
v26.x = v26.y;
v26.y = v18;
}
a1->m_ufoClickParticles->setPosVar(a1->m_ufoClickParticles, &v26);
a1->m_robotBurstParticles->setPosVar(a1->m_robotBurstParticles, &v26);
cocos2d::CCPoint::CCPoint(&v27, 5.0, 1.0);
cocos2d::CCPoint::operator=(&v26, v19, v20);
if ( a1->m_isRobot || a1->m_isSpider )
{
cocos2d::CCPoint::CCPoint(&v27, 15.0, 0.0);
cocos2d::CCPoint::operator=(&v26, v22, v23);
}
if ( a1->m_isSideways )
{
v21 = v26.x;
v26.x = v26.y;
v26.y = v21;
}
a1->m_playerGroundParticles->setPosVar(a1->m_playerGroundParticles, &v26);
}