//
// PlayerObject::updatePlayerSwingFrame from 0x43aef0 to 0x43b03e (334 bytes)
//
// 2 xrefs:
// > PlayerObject::toggleSwingMode @ 0x43edce
// > MenuGameLayer::resetPlayer @ 0x4929e6
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:48:21 +0000
//
int __fastcall PlayerObject::updatePlayerSwingFrame(PlayerObject *this, const char *a2)
{
const char *v3; // r4
int **v4; // r0
cocos2d::CCString *v5; // r0
const char *CString; // r11
cocos2d::CCString *v7; // r0
const char *v8; // r10
cocos2d::CCString *v9; // r0
cocos2d::CCSpriteFrameCache *v10; // r0
int v11; // r6
int (__fastcall *v12)(int, int); // r8
const char *v13; // r9
cocos2d::CCSpriteFrameCache *v14; // r0
int v15; // r0
cocos2d::CCSpriteFrameCache *v16; // r0
int v17; // r6
int (__fastcall *v18)(int, int); // r8
cocos2d::CCSpriteFrameCache *v19; // r0
int v20; // r0
cocos2d::CCSpriteFrameCache *v21; // r0
int v22; // r6
void (__fastcall *v23)(int, int); // r8
cocos2d::CCSpriteFrameCache *v24; // r0
int v25; // r0
const cocos2d::CCSize *v26; // r0
int v27; // r8
void (__fastcall *v28)(int, _BYTE *); // r9
cocos2d::CCString *v29; // r0
const char *v30; // r0
const char *v31; // r6
size_t v32; // r0
float v34[2]; // [sp+0h] [bp-24h] BYREF
_BYTE v35[8]; // [sp+8h] [bp-1Ch] BYREF
int v36[3]; // [sp+10h] [bp-14h] BYREF
if ( (int)a2 <= 0 )
{
v3 = (_BYTE *)(&dword_0 + 1);
}
else
{
if ( (int)a2 >= 43 )
a2 = (_BYTE *)(&word_2A + 1);
v3 = a2;
}
v4 = (int **)GameManager::sharedState(this);
GameManager::loadIcon(v4, (int)v3, 7, *((_DWORD *)this + 604));
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"swing_%02d_001.png", v3);
CString = (const char *)cocos2d::CCString::getCString(v5);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"swing_%02d_2_001.png", v3);
v8 = (const char *)cocos2d::CCString::getCString(v7);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"swing_%02d_glow_001.png", v3);
v10 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCString::getCString(v9);
v11 = *((_DWORD *)this + 373);
v12 = *(int (__fastcall **)(int, int))(*(_DWORD *)v11 + 580);
v13 = (const char *)v10;
v14 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v10);
v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, CString);
v16 = (cocos2d::CCSpriteFrameCache *)v12(v11, v15);
v17 = *((_DWORD *)this + 374);
v18 = *(int (__fastcall **)(int, int))(*(_DWORD *)v17 + 580);
v19 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v16);
v20 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v19, v8);
v21 = (cocos2d::CCSpriteFrameCache *)v18(v17, v20);
v22 = *((_DWORD *)this + 376);
v23 = *(void (__fastcall **)(int, int))(*(_DWORD *)v22 + 580);
v24 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v21);
v25 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v24, v13);
v23(v22, v25);
v26 = (const cocos2d::CCSize *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 373) + 164))(*((_DWORD *)this + 373));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v34, v26);
v27 = *((_DWORD *)this + 374);
v28 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v27 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, v34[0] * 0.5, v34[1] * 0.5);
v28(v27, v35);
v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"swing_%02d_extra_001.png", v3);
v30 = (const char *)cocos2d::CCString::getCString(v29);
memset(v36, 0, sizeof(v36));
v31 = v30;
v32 = strlen(v30);
std::string::__init(v36, v31, v32);
PlayerObject::updatePlayerSpriteExtra(this, (int)v36);
return std::string::~string((int)v36);
}