// // PlayerObject::updatePlayerSwingFrame from 0x100417890 to 0x100417ab5 (549 bytes) // // 2 xrefs: // > PlayerObject::toggleSwingMode @ 0x10041760d // > MenuGameLayer::resetPlayer @ 0x1004fab50 // // 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::updatePlayerSwingFrame(PlayerObject *a1, int a2) { int v2; // r14d GameManager *v3; // rax cocos2d::CCString *v4; // rax const char *CString; // r13 cocos2d::CCString *v6; // rax const char *v7; // r12 cocos2d::CCString *v8; // rax cocos2d::CCSprite *m_iconSprite; // r15 cocos2d::CCSpriteFrameCache *v10; // rax cocos2d::CCSpriteFrame *v11; // rax cocos2d::CCSprite *m_iconSpriteSecondary; // r15 cocos2d::CCSpriteFrameCache *v13; // rax cocos2d::CCSpriteFrame *v14; // rax cocos2d::CCSprite *m_iconGlow; // r15 cocos2d::CCSpriteFrameCache *v16; // rax cocos2d::CCSpriteFrame *v17; // rax _QWORD *v18; // rax cocos2d::CCSprite *v19; // r15 double v20; // xmm0_8 cocos2d::CCString *v21; // rax const char *v22; // r15 size_t v23; // rax size_t v24; // r14 char *v25; // r12 size_t v26; // r13 char v27; // [rsp+0h] [rbp-60h] char v28; // [rsp+0h] [rbp-60h] char v29; // [rsp+0h] [rbp-60h] char v30; // [rsp+0h] [rbp-60h] float v31; // [rsp+8h] [rbp-58h] BYREF const char *v32; // [rsp+10h] [rbp-50h] __int64 v33; // [rsp+18h] [rbp-48h] BYREF _QWORD __dst[2]; // [rsp+20h] [rbp-40h] BYREF void *__p; // [rsp+30h] [rbp-30h] v2 = a2; if ( a2 >= 43 ) v2 = 43; if ( v2 < 2 ) v2 = 1; v3 = GameManager::sharedState(); GameManager::loadIcon(v3, v2, 7, a1->m_iconRequestID); v4 = (cocos2d::CCString *)sub_1007AB580("swing_%02d_001.png", v27); CString = cocos2d::CCString::getCString(v4); v6 = (cocos2d::CCString *)sub_1007AB580("swing_%02d_2_001.png", v28); v7 = cocos2d::CCString::getCString(v6); v8 = (cocos2d::CCString *)sub_1007AB580("swing_%02d_glow_001.png", v29); v32 = cocos2d::CCString::getCString(v8); m_iconSprite = a1->m_iconSprite; v10 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v10, CString); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_iconSprite->setDisplayFrame)(m_iconSprite, v11); m_iconSpriteSecondary = a1->m_iconSpriteSecondary; v13 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, v7); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_iconSpriteSecondary->setDisplayFrame)( m_iconSpriteSecondary, v14); m_iconGlow = a1->m_iconGlow; v16 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v17 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v16, v32); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_iconGlow->setDisplayFrame)(m_iconGlow, v17); v18 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->getContentSize)(a1->m_iconSprite); sub_10028CFC0(&v33, v18); v19 = a1->m_iconSpriteSecondary; *(_QWORD *)&v20 = (unsigned int)v33; *(float *)&v20 = *(float *)&v33 * 0.5; sub_10028CBE0(&v31, *(float *)&v33 * 0.5, 0.5 * *((float *)&v33 + 1)); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v19->setPosition)(v19, &v31); v21 = (cocos2d::CCString *)sub_1007AB580("swing_%02d_extra_001.png", v30); v22 = cocos2d::CCString::getCString(v21); v23 = strlen(v22); if ( v23 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v20); v24 = v23; if ( v23 >= 0x17 ) { v26 = 26; if ( (v23 | 7) != 0x17 ) v26 = (v23 | 7) + 1; v25 = (char *)operator new(v26); __p = v25; __dst[0] = v26 + 1; __dst[1] = v24; goto LABEL_12; } LOBYTE(__dst[0]) = 2 * v23; v25 = (char *)__dst + 1; if ( v23 ) LABEL_12: memmove(v25, v22, v24); v25[v24] = 0; PlayerObject::updatePlayerSpriteExtra((__int64)a1, (__int64)__dst); if ( (__dst[0] & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source