diff --git a/src/main.cpp b/src/main.cpp index 5f49394..e252a29 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -102,41 +102,17 @@ int main(int argc, char *argv[]) { TextureManager tman(skinDir); - Difficulty::DifficultySettings diff{ - .hpDrainRate = 3., - .circleSize = 5., - .overallDifficulty = 9., - .approachRate = 9., - }; - float deltaTime; - std::vector hitObjects; - hitObjects.push_back(HitObjectDrawable( - tman, - HitObject{ - .x = 400, - .y = 300, - .time = 2000, - .type = HitObjectType(), - .hitSound = HitSound(), - }, - diff, - 1 - )); - - hitObjects.push_back(HitObjectDrawable( - tman, - HitObject{ - .x = 500, - .y = 200, - .time = 2500, - .type = HitObjectType(), - .hitSound = HitSound(), - }, - diff, - 2 - )); + fs::path songsDir = osuPath / "Songs"; + for (const auto& songDir : fs::directory_iterator(songsDir)) { + for (const auto& beatmapDiff : fs::directory_iterator(songDir)) { + if (beatmapDiff.path().extension() == ".osu" || beatmapDiff.path().extension() == ".os") { + Difficulty diff = parseDifficulty(beatmapDiff); + std::cout << diff.metadata.artist << " - " << diff.metadata.titleUnicode << "\n"; + } + } + } while (window.isOpen()) { sf::Event event; @@ -147,17 +123,9 @@ int main(int argc, char *argv[]) { } deltaTime = clock.restart().asMilliseconds(); - - for (HitObjectDrawable &hitObject : hitObjects) { - hitObject.update(deltaTime); - } window.clear(sf::Color::Black); - for (HitObjectDrawable &hitObject : hitObjects) { - window.draw(hitObject); - } - window.display(); }