//
// PlayerObject::updateDashAnimation from 0x10021c858 to 0x10021c9fc (420 bytes)
//
// 1 xrefs:
// > PlayerObject::update @ 0x10021a19c
//
// 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 __fastcall PlayerObject::updateDashAnimation(PlayerObject *a1)
{
float v2; // s0
int v3; // w21
__int64 v4; // x0
__int64 v5; // x20
cocos2d::CCString *v6; // x0
const char *CString; // x22
cocos2d::CCString *v8; // x0
const char *v9; // x0
const char *v10; // x21
cocos2d::CCSprite *m_dashFireSprite; // x23
cocos2d::CCSpriteFrameCache *v12; // x0
cocos2d::CCSpriteFrame *v13; // x0
cocos2d::CCSpriteFrameCache *v14; // x0
cocos2d::CCSpriteFrame *v15; // x0
double *v16; // x0
__n128 v17; // q0
__n128 v18; // q1
int v19; // [xsp+10h] [xbp-50h] BYREF
__int64 v20; // [xsp+18h] [xbp-48h] BYREF
v2 = a1->m_totalTime
/ (float)((float)(0.04 / a1->m_playerSpeed)
* (float)((float)((float)(fabsf(((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getRotation)(a1->m_dashFireSprite))
/ -70.0)
* 0.4)
+ 1.0));
v3 = (int)vcvtms_s32_f32(v2) % 12 + 1;
if ( v3 != a1->m_dashFireFrame )
{
a1->m_dashFireFrame = v3;
v4 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getChildren)(a1->m_dashFireSprite);
v5 = sub_10024A388(v4, 0);
v6 = (cocos2d::CCString *)sub_100268F4C("playerDash2_%03d.png", v3);
CString = cocos2d::CCString::getCString(v6);
v8 = (cocos2d::CCString *)sub_100268F4C("playerDash2_outline_%03d.png", v3);
v9 = cocos2d::CCString::getCString(v8);
if ( CString )
{
v10 = v9;
m_dashFireSprite = a1->m_dashFireSprite;
v12 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v12, CString);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_dashFireSprite->setDisplayFrame)(
m_dashFireSprite,
v13);
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, v10);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v5 + 1144LL))(v5, v15);
v16 = (double *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getContentSize)(a1->m_dashFireSprite);
v17.n128_f64[0] = sub_100022AFC(&v20, v16);
v17.n128_f32[0] = *(float *)&v20 * 0.5;
v18.n128_f32[0] = *((float *)&v20 + 1) * 0.5;
sub_100022980(v17, v18, &v19);
(*(void (__fastcall **)(__int64, int *))(*(_QWORD *)v5 + 184LL))(v5, &v19);
}
}
}