// // SimplePlayer::updatePlayerFrame from 0x40346c to 0x4036d6 (618 bytes) // // 16 xrefs: // > CommentCell::loadFromComment @ 0x335fa4 // > GJScoreCell::loadFromScore @ 0x3373ba // > GJLevelScoreCell::loadFromScore @ 0x338424 // > GJUserCell::loadFromScore @ 0x338b70 // > GJRequestCell::loadFromScore @ 0x339256 // > GJGarageLayer::onSelect @ 0x403a8e // > SimplePlayer::asyncLoadIcon @ 0x403b3a // > SimplePlayer::iconFinishedLoading @ 0x403b6a // > SimplePlayer::init @ 0x40455c // > GJItemIcon::init @ 0x4047d4 // > GJGarageLayer::init @ 0x407582 // > GJBaseGameLayer::playExitDualEffect @ 0x46f71c // > ProfilePage::toggleShip @ 0x4c42f2 // > ProfilePage::loadPageFromUserInfo @ 0x4c5772 // > CharacterColorPage::toggleShip @ 0x564aa4 // > CharacterColorPage::init @ 0x565b22 // // 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 SimplePlayer::updatePlayerFrame(SimplePlayer *a1, int a2, IconType a3) { int v6; // r5 GJRobotSprite *m_robotSprite; // r0 GJSpiderSprite *m_spiderSprite; // r0 GameManager *v9; // r0 GJSpiderSprite *v10; // r0 GJSpiderSprite *v11; // r0 cocos2d::CCString *v12; // r0 const char *CString; // r10 cocos2d::CCString *v14; // r0 const char *v15; // r9 cocos2d::CCString *v16; // r0 const char *v17; // r8 cocos2d::CCString *v18; // r0 cocos2d::CCString *v19; // r0 const char *v20; // r0 cocos2d::CCSprite *m_firstLayer; // r8 cocos2d::CCSprite_vtbl *v22; // r3 cocos2d::CCSprite *v23; // r4 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7 void (__fastcall *v25)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r4 float v26; // r2 char *v27; // [sp+Ch] [bp-18h] char *v28; // [sp+10h] [bp-14h] BYREF cocos2d::CCPoint v29; // [sp+14h] [bp-10h] BYREF v28 = (char *)&unk_ACDDA8; switch ( a3 ) { case Ship: sub_7753D4((int)&v28, "ship"); v6 = 169; break; case Ball: sub_7753D4((int)&v28, "player_ball"); v6 = 118; break; case Ufo: sub_7753D4((int)&v28, "bird"); v6 = 149; break; case Wave: sub_7753D4((int)&v28, "dart"); v6 = 96; break; case Robot: sub_7753D4((int)&v28, "robot"); v6 = 68; break; case Spider: sub_7753D4((int)&v28, "spider"); v6 = 69; break; case Swing: sub_7753D4((int)&v28, "swing"); v6 = 43; break; case Jetpack: sub_7753D4((int)&v28, "jetpack"); v6 = 8; break; default: sub_7753D4((int)&v28, "player"); v6 = 485; break; } m_robotSprite = a1->m_robotSprite; if ( m_robotSprite ) m_robotSprite->setVisible(m_robotSprite, a3 == Robot); m_spiderSprite = a1->m_spiderSprite; if ( m_spiderSprite ) m_spiderSprite->setVisible(m_spiderSprite, a3 == Spider); a1->m_firstLayer->setVisible(a1->m_firstLayer, (unsigned int)(a3 - 5) > 1); a1->m_secondLayer->setVisible(a1->m_secondLayer, (unsigned int)(a3 - 5) > 1); a1->m_birdDome->setVisible(a1->m_birdDome, (unsigned int)(a3 - 5) > 1); if ( a2 <= v6 && a2 <= 0 ) { v6 = 1; } else if ( v6 >= a2 ) { v6 = a2; } v9 = GameManager::sharedState(); GameManager::loadIcon(v9, v6, a3, a1->m_iconRequestID); if ( a3 == Robot ) { v10 = (GJSpiderSprite *)a1->m_robotSprite; if ( !v10 ) { SimplePlayer::createRobotSprite(a1, v6); v11 = (GJSpiderSprite *)a1->m_robotSprite; LABEL_28: v11->setVisible(v11, 1); goto LABEL_38; } LABEL_26: GJRobotSprite::updateFrame(v10, v6); goto LABEL_38; } if ( a3 == Spider ) { v10 = a1->m_spiderSprite; if ( !v10 ) { SimplePlayer::createSpiderSprite(a1, v6); v11 = a1->m_spiderSprite; goto LABEL_28; } goto LABEL_26; } v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_001.png", v28, v6); CString = cocos2d::CCString::getCString(v12); v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_2_001.png", v28, v6); v15 = cocos2d::CCString::getCString(v14); if ( a3 == Ufo ) { v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_3_001.png", v28, v6); v17 = cocos2d::CCString::getCString(v16); } else { v17 = nullptr; } v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_glow_001.png", v28, v6); v27 = (char *)cocos2d::CCString::getCString(v18); v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%02d_extra_001.png", v28, v6); v20 = cocos2d::CCString::getCString(v19); SimplePlayer::setFrames(a1, CString, v15, v17, v27, v20); ((void (__fastcall *)(cocos2d::CCSprite *, int))a1->m_firstLayer->setScale)(a1->m_firstLayer, 1065353216); m_firstLayer = a1->m_firstLayer; v22 = m_firstLayer->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( a3 == Ball ) { ((void (__fastcall *)(cocos2d::CCSprite *, int))v22->setScale)(a1->m_firstLayer, 1063675494); v23 = a1->m_firstLayer; setPosition = v23->setPosition; cocos2d::CCPoint::CCPoint(&v29, 0.0, 0.0); setPosition(v23, &v29); } else { v25 = v22->setPosition; if ( a3 == Ufo ) v26 = -7.0; else v26 = 0.0; cocos2d::CCPoint::CCPoint(&v29, 0.0, v26); v25(m_firstLayer, &v29); } LABEL_38: sub_774008(&v28); }
GD Web Decomp Icon

GD Web Decomp

Raw Source