the whole game

This commit is contained in:
Kolyah35
2026-03-02 22:04:18 +03:00
parent 816e9060b4
commit f0617a5d22
2069 changed files with 581500 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "ChooseLevelScreen.h"
#include <algorithm>
#include <set>
#include "../../Minecraft.h"
void ChooseLevelScreen::init() {
loadLevelSource();
}
void ChooseLevelScreen::loadLevelSource()
{
LevelStorageSource* levelSource = minecraft->getLevelSource();
levelSource->getLevelList(levels);
std::sort(levels.begin(), levels.end());
}
std::string ChooseLevelScreen::getUniqueLevelName( const std::string& level ) {
std::set<std::string> Set;
for (unsigned int i = 0; i < levels.size(); ++i)
Set.insert(levels[i].id);
std::string s = level;
while ( Set.find(s) != Set.end() )
s += "-";
return s;
}