Skip to content

About

๐Ÿ“„ An osu! file format parser written in C++20, built to support The Floor is Rhythm.

Resources

Stars

0 stars

Watchers

0 watching

Forks

ย 
ย 

Latest commit

ย 

History

62 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

osu!parser MIT license

A C++ library to parse osu! filetypes

Installation

git clone --recursive https://github.com/JustCabbage/osu-parser.git

Project Setup

target_include_directories(ProjectName PUBLIC osu-parser/include)

Examples:

Database Parsing

#include <osu!parser/Parser.hpp>

int main()
{
    const std::string GamePath = std::string(getenv("localappdata")) + "\\osu!\\";

    OsuParser::Database ParsedDatabase(GamePath + "osu!.db");

    for(const auto& Beatmap : ParsedDatabase.Beatmaps)
    {
        std::cout << Beatmap.BeatmapHash << "\n";
    }
}

Beatmap Parsing

#include <osu!parser/Parser.hpp>

int main()
{
    const std::string SongsPath = std::string(getenv("localappdata")) + "\\osu!\\Songs\\RandomBeatmap\\Beatmap.osu";
    
    OsuParser::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";
}

Replay Parsing

#include <osu!parser/Parser.hpp>

int main()
{
    const std::string ReplayPath = std::string(std::getenv("localappdata")) + "\\osu!\\Replays\\MyReplay.osr";
    
    OsuParser::Replay ParsedReplay(ReplayPath);

    std::cout << "Parsed " << ParsedReplay.Actions.size() << " Replay Actions\n";
    std::cout << "Replay Score - " << ParsedReplay.Score << "\n";
}

Credits

About

๐Ÿ“„ An osu! file format parser written in C++20, built to support The Floor is Rhythm.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages