// // ProfilePage::onFollow from 0x4c4a50 to 0x4c4be4 (404 bytes) // // 0 xrefs: // // 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 ProfilePage::onFollow(ProfilePage *a1, cocos2d::CCObject *a2) { GameManager *v3; // r0 GameLevelManager *v4; // r0 _BOOL4 isFollowingUser; // r4 GameLevelManager *v6; // r0 signed int v7; // r7 float v8; // s16 int v9; // s18 GameManager *v10; // r0 GameManager *v11; // r8 float v12; // r0 GameManager *v13; // r8 float v14; // r0 cocos2d::CCString *v15; // r0 char *CString; // r0 FLAlertLayer *v17; // r4 GameLevelManager *v18; // r0 cocos2d::CCNode *v19; // r5 void (__fastcall *setSkewY)(cocos2d::CCNode *__hidden, float); // r7 cocos2d::CCSpriteFrameCache *v21; // r0 const char *v22; // r1 cocos2d::CCSpriteFrame *v23; // r0 GameLevelManager *v24; // r0 _BYTE v25[4]; // [sp+10h] [bp-8h] BYREF v3 = GameManager::sharedState(); GameManager::reportAchievementWithID(v3, "geometry.ach.followCreator", 100, 0); v4 = GameLevelManager::sharedState(); isFollowingUser = GameLevelManager::isFollowingUser(v4, a1->m_accountID); if ( isFollowingUser ) { v18 = GameLevelManager::sharedState(); GameLevelManager::unfollowUser(v18, a1->m_accountID); } else { v6 = GameLevelManager::sharedState(); v7 = cocos2d::CCDictionary::count(v6->m_followedCreators); v8 = (float)(v7 + 1); v9 = (int)floorf((float)(v8 / 10.0) * 100.0); v10 = GameManager::sharedState(); GameManager::reportAchievementWithID(v10, "geometry.ach.followCreator02", v9, 0); v11 = GameManager::sharedState(); v12 = floorf((float)(v8 / 25.0) * 100.0); GameManager::reportAchievementWithID(v11, "geometry.ach.followCreator03", (int)v12, 0); v13 = GameManager::sharedState(); v14 = floorf((float)(v8 / 50.0) * 100.0); GameManager::reportAchievementWithID(v13, "geometry.ach.followCreator04", (int)v14, 0); if ( v7 > 99 ) { v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"You can only follow %i users at the same time.", (const char *)&dword_64); CString = (char *)cocos2d::CCString::getCString(v15); sub_776584((int)v25, CString); v17 = FLAlertLayer::create(0, (int)"Max Followed", (int)v25, (int)"OK", 0); sub_774008(v25); v17->show(v17); return; } v24 = GameLevelManager::sharedState(); GameLevelManager::followUser(v24, a1->m_accountID); } v19 = a1->m_followBtn->getNormalImage(a1->m_followBtn); setSkewY = v19->__vftable[1].setSkewY; v21 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); if ( isFollowingUser ) v22 = "gj_heartOff_001.png"; else v22 = "gj_heartOn_001.png"; v23 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v21, v22); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))setSkewY)(v19, v23); }
GD Web Decomp Icon

GD Web Decomp

Raw Source