// // InfoLayer::onComment from 0x42f3a0 to 0x42f538 (408 bytes) // // 1 xrefs: // > InfoLayer::FLAlert_Clicked @ 0x42f59c // // 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 InfoLayer::onComment(InfoLayer *a1, cocos2d::CCObject *a2) { GJAccountManager *v3; // r0 FLAlertLayer *v4; // r0 GameManager *v5; // r0 GameManager *v6; // r0 FLAlertLayer *v7; // r5 GameLevelManager *v8; // r8 GameLevelManager *v9; // r9 int ID; // r0 const char *PostCommentKey; // r0 const char *TimeLeft; // r0 cocos2d::CCString *v13; // r0 char *CString; // r0 CommentType v15; // r8 _DWORD *v16; // r8 GJGameLevel *m_level; // r2 char v18; // [sp+14h] [bp-10h] BYREF _BYTE v19[4]; // [sp+18h] [bp-Ch] BYREF v3 = GJAccountManager::sharedState(); if ( v3->m_accountID - v3->m_unkInt1 <= 0 ) { sub_776584( (int)v19, "You need an account to post comments. You can create one for free from settings in the main menu."); v4 = FLAlertLayer::create(0, (int)"Account Needed", (int)v19, (int)"Close", 0, 380.0); LABEL_7: v7 = v4; sub_774008(v19); goto LABEL_8; } v5 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v5, "0012") ) { v6 = GameManager::sharedState(); GameManager::setGameVariable(v6, "0012", 1); sub_776584( (int)v19, "1. Do not spam.\n" "2. Do not harass other players.\n" "3. Do not post inappropriate or controversial content.\n" "4. Do not try to bypass these rules.\n" "These rules and their enforcement are entirely at Elder Moderators' discretion."); v7 = FLAlertLayer::create((int)&a1->FLAlertLayerProtocol, (int)"Comment Rules", (int)v19, (int)"Next", 0, 380.0); sub_774008(v19); v7->setTag(v7, 3); LABEL_8: v7->show(v7); return; } v8 = GameLevelManager::sharedState(); v9 = GameLevelManager::sharedState(); ID = InfoLayer::getID(a1); PostCommentKey = GameLevelManager::getPostCommentKey(v9, ID); TimeLeft = (const char *)GameLevelManager::getTimeLeft(v8, PostCommentKey, 15.0); if ( (unsigned int)(TimeLeft - 1) <= 0xE ) { v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Please wait %i seconds before posting a new comment!", TimeLeft); CString = (char *)cocos2d::CCString::getCString(v13); sub_776584((int)v19, CString); v4 = FLAlertLayer::create(0, (int)"Too fast", (int)v19, (int)"OK", 0, 300.0); goto LABEL_7; } sub_776584((int)&v18, "Add Comment"); v15 = InfoLayer::getID(a1); sub_776584((int)v19, (char *)&unk_939830); v16 = (_DWORD *)ShareCommentLayer::create((ShareCommentLayer *)&v18, (std::string)100, 0, v15, (int)v19); sub_774008(v19); sub_774008(&v18); m_level = a1->m_level; if ( m_level ) v16[137] = m_level->m_orbCompletion.random - m_level->m_orbCompletion.seed; (*(void (__fastcall **)(_DWORD *))(*v16 + 644))(v16); }
GD Web Decomp Icon

GD Web Decomp

Raw Source