git clone --recursive https://github.com/JustCabbage/osu-parser.git
target_include_directories(ProjectName PUBLIC osu-parser/include)
#include <osu!parser/Parser.hpp>
int main()
{
const std::string GamePath = std::string(getenv("localappdata")) + "\\osu!\\";
Parser::Database ParsedDatabase(GamePath + "osu!.db");
for(const auto& Beatmap : ParsedDatabase.Beatmaps)
{
std::cout << Beatmap.BeatmapHash << "\n";
}
}
#include <osu!parser/Parser.hpp>
int main()
{
const std::string SongsPath = std::string(getenv("localappdata")) + "\\osu!\\Songs\\RandomBeatmap\\Beatmap.osu";
Parser::Beatmap ParsedBeatmap(SongsPath);
std::cout << "Audio Filename - " << ParsedBeatmap.General.AudioFilename << "\n";
std::cout << "Total Hit Objects - " << ParsedBeatmap.HitObjects.size() << "\n";
std::cout << "Total Timing Points - " << ParsedBeatmap.TimingPoints.size() << "\n";
}
#include <osu!parser/Parser.hpp>
int main()
{
const std::string ReplayPath = std::string(std::getenv("localappdata")) + "\\osu!\\Replays\\MyReplay.osr";
Parser::Replay ParsedReplay(ReplayPath);
std::cout << "Parsed " << ParsedReplay.Actions.size() << " Replay Actions\n";
std::cout << "Replay Score - " << ParsedReplay.Score << "\n";
}