Etterna 0.74.4
Loading...
Searching...
No Matches
NotesLoaderOSU.h
1#ifndef NOTES_LOADER_OSU_H
2#define NOTES_LOADER_OSU_H
3
4#include <map>
5#include <string>
6#include <vector>
7
8class Song;
9class Steps;
10
11struct OsuHold
12{
13 int msStart;
14 int msEnd;
15 int lane;
16 OsuHold(int msStart_, int msEnd_, int lane_)
17 {
18 msStart = msStart_;
19 msEnd = msEnd_;
20 lane = lane_;
21 }
22};
23struct OsuNote
24{
25 int ms;
26 int lane;
27 OsuNote(int ms_, int lane_)
28 {
29 ms = ms_;
30 lane = lane_;
31 }
32};
33
34namespace OsuLoader {
35
36// these are not organised AT ALL
37
38std::map<std::string, std::map<std::string, std::string>>
39ParseFileString(const std::string& fileContents);
40
41void
42SeparateTagsAndContents(std::string fileContents,
43 std::vector<std::string>& tagsOut,
44 std::vector<std::vector<std::string>>& contentsOut);
45
46void
47SetMetadata(std::map<std::string, std::map<std::string, std::string>>,
48 Song& out);
49void
50SetTimingData(std::map<std::string, std::map<std::string, std::string>>,
51 Song& out);
52
53void
54GetApplicableFiles(const std::string& sPath, std::vector<std::string>& out);
55
56bool
57LoadFromDir(const std::string& sPath, Song& out);
58
59void
60LoadNoteDataFromParsedData(
61 Steps* out,
62 std::map<std::string, std::map<std::string, std::string>> parsedData);
63
64bool
65LoadNoteDataFromSimfile(const std::string& path, Steps& out);
66
67bool
68LoadChartData(
69 Song* song,
70 Steps* chart,
71 std::map<std::string, std::map<std::string, std::string>> parsedData);
72
73int
74MsToNoteRow(int ms, Song* song);
75
76} // namespace OsuLoader
77
78#endif
Holds all music metadata and steps for one song.
Definition Song.h:65
Holds note information for a Song.
Definition Steps.h:42
Definition NotesLoaderOSU.h:12
Definition NotesLoaderOSU.h:24