// // LevelSearchLayer::toggleDifficulty from 0x3acc60 to 0x3ace1a (442 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 LevelSearchLayer::toggleDifficulty(LevelSearchLayer *a1, cocos2d::CCObject *a2) { int v3; // r5 bool v4; // r7 cocos2d::CCDictionary *m_difficultyDict; // r11 const char *v6; // r7 cocos2d::CCObject *v7; // r9 char *DiffKey; // r0 int i; // r6 void (*v10)(void); // r2 int j; // r9 int v12; // r1 GameLevelManager *v13; // r0 cocos2d::CCDictionary *v14; // r5 char *v15; // r0 cocos2d::CCString *v16; // r0 _BOOL4 v17; // r5 int k; // r9 int v19; // r1 int m; // r9 int v21; // r1 std::string v22; // [sp+8h] [bp-Ch] BYREF v3 = a2->getTag(a2); v4 = LevelSearchLayer::checkDiff(a1, v3); if ( a1->m_type == 1 ) { for ( i = 0; i != 8; ++i ) { if ( i != v3 ) LevelSearchLayer::toggleDifficultyNum(a1, i, 0); } } m_difficultyDict = a1->m_difficultyDict; v6 = (const char *)!v4; v7 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v6); DiffKey = (char *)LevelSearchLayer::getDiffKey(a1, v3); sub_776584((int)&v22, DiffKey); cocos2d::CCDictionary::setObject((int)m_difficultyDict, v7); sub_774008(&v22); v10 = *(void (**)(void))(*(_DWORD *)cocos2d::CCArray::objectAtIndex(a1->m_difficultySprites, v3) + 472); if ( v6 ) { LOWORD(v22.m_data.m_data) = -1; BYTE2(v22.m_data.m_data) = -1; v10(); if ( !v3 ) { for ( j = 1; j != 8; ++j ) { v12 = j; LevelSearchLayer::toggleDifficultyNum(a1, v12, 0); } goto LABEL_19; } if ( v3 == 6 ) { for ( k = 0; k != 6; ++k ) { v19 = k; LevelSearchLayer::toggleDifficultyNum(a1, v19, 0); } goto LABEL_18; } } else { memset(&v22, 125, 3); v10(); if ( !v3 || v3 == 6 ) goto LABEL_17; } if ( v3 != 7 || !v6 ) { LABEL_17: LevelSearchLayer::toggleDifficultyNum(a1, 0, 0); LevelSearchLayer::toggleDifficultyNum(a1, 6, 0); LABEL_18: LevelSearchLayer::toggleDifficultyNum(a1, 7, 0); goto LABEL_19; } for ( m = 0; m != 7; ++m ) { v21 = m; LevelSearchLayer::toggleDifficultyNum(a1, v21, 0); } LABEL_19: v13 = GameLevelManager::sharedState(); GameLevelManager::setDiffVal(v13, v3, (bool)v6); v14 = a1->m_difficultyDict; v15 = (char *)LevelSearchLayer::getDiffKey(a1, 6); sub_776584((int)&v22, v15); v16 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v14, &v22); v17 = cocos2d::CCString::boolValue(v16); sub_774008(&v22); a1->m_demonTypeButton->setEnabled(a1->m_demonTypeButton, v17); a1->m_demonTypeButton->setVisible(a1->m_demonTypeButton, v17); }
GD Web Decomp Icon

GD Web Decomp

Raw Source