//
// PlayerObject::updateDashAnimation from 0x33d9a0 to 0x33dafc (348 bytes)
//
// 1 xrefs:
// > PlayerObject::update @ 0x34f81e
//
// 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::updateDashAnimation(PlayerObject *a1)
{
float v2; // s16
float v3; // s15
const char *v4; // r4
cocos2d::CCSprite *m_dashFireSprite; // r0
cocos2d::CCArray *v6; // r0
int v7; // r7
cocos2d::CCString *v8; // r0
const char *CString; // r8
cocos2d::CCString *v10; // r0
const char *v11; // r9
cocos2d::CCSprite *v12; // r4
void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r10
cocos2d::CCSpriteFrameCache *v14; // r0
cocos2d::CCSpriteFrame *v15; // r0
void (__fastcall *v16)(int, cocos2d::CCSpriteFrame *); // r4
cocos2d::CCSpriteFrameCache *v17; // r0
cocos2d::CCSpriteFrame *v18; // r0
const cocos2d::CCSize *v19; // r0
void (__fastcall *v20)(int, cocos2d::CCPoint *); // r6
cocos2d::CCSize v21; // [sp+4h] [bp-14h] BYREF
cocos2d::CCPoint v22; // [sp+Ch] [bp-Ch] BYREF
v2 = (float)(0.04 / a1->m_playerSpeed)
* (1.0 - fabsf(a1->m_dashFireSprite->getRotation(a1->m_dashFireSprite)) / 70.0 * 0.400000006);
v3 = a1->m_totalTime / v2;
v4 = (const char *)((int)floorf(v3) % 12 + 1);
if ( v4 != (const char *)a1->m_dashFireFrame )
{
m_dashFireSprite = a1->m_dashFireSprite;
a1->m_dashFireFrame = (int)v4;
v6 = m_dashFireSprite->getChildren(m_dashFireSprite);
v7 = cocos2d::CCArray::objectAtIndex(v6, 0);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"playerDash2_%03d.png", v4);
CString = cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"playerDash2_outline_%03d.png",
v4);
v11 = cocos2d::CCString::getCString(v10);
if ( CString )
{
v12 = a1->m_dashFireSprite;
setDisplayFrame = v12->setDisplayFrame;
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, CString);
setDisplayFrame(v12, v15);
v16 = *(void (__fastcall **)(int, cocos2d::CCSpriteFrame *))(*(_DWORD *)v7 + 572);
v17 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v18 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v17, v11);
v16(v7, v18);
v19 = a1->m_dashFireSprite->getContentSize(a1->m_dashFireSprite);
cocos2d::CCSize::CCSize(&v21, v19);
v20 = *(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint(&v22, v21.width * 0.5, v21.height * 0.5);
v20(v7, &v22);
}
}
}