//
// PlayerObject::updateDashAnimation from 0x1004017e0 to 0x100401997 (439 bytes)
//
// 1 xrefs:
// > PlayerObject::update @ 0x1003fdd91
//
// 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)
{
double v1; // xmm1_8
__m128 v2; // xmm0
int v3; // r15d
__int64 v4; // rax
__int64 v5; // r14
cocos2d::CCString *v6; // rax
const char *CString; // r12
cocos2d::CCString *v8; // rax
const char *v9; // rax
const char *v10; // r15
cocos2d::CCSprite *m_dashFireSprite; // r13
cocos2d::CCSpriteFrameCache *v12; // rax
cocos2d::CCSpriteFrame *v13; // rax
cocos2d::CCSpriteFrameCache *v14; // rax
cocos2d::CCSpriteFrame *v15; // rax
_QWORD *v16; // rax
char v17; // [rsp+0h] [rbp-40h]
char v18; // [rsp+0h] [rbp-40h]
float v19[2]; // [rsp+4h] [rbp-3Ch] BYREF
__int64 v20; // [rsp+Ch] [rbp-34h] BYREF
float v21; // [rsp+14h] [rbp-2Ch]
v21 = 0.039999999 / a1->m_playerSpeed;
v1 = a1->m_totalTime
/ (float)((float)((float)((float)(fabs(((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getRotation)(a1->m_dashFireSprite))
/ -70.0)
* 0.40000001)
+ 1.0)
* v21);
v2 = 0;
v2.f32[0] = v1;
v3 = (int)_mm_round_ss(v2, v2, 9).f32[0] % 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_1007200C0(v4, 0);
v6 = (cocos2d::CCString *)sub_1007AB580("playerDash2_%03d.png", v17);
CString = cocos2d::CCString::getCString(v6);
v8 = (cocos2d::CCString *)sub_1007AB580("playerDash2_outline_%03d.png", v18);
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 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getContentSize)(a1->m_dashFireSprite);
sub_10028CFC0(&v20, v16);
sub_10028CBE0(v19, *(float *)&v20 * 0.5, 0.5 * *((float *)&v20 + 1));
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v5 + 184LL))(v5, v19);
}
}
}