diff --git a/include/core/area.h b/include/core/area.h index dfa4d48..2a79a90 100644 --- a/include/core/area.h +++ b/include/core/area.h @@ -8,6 +8,15 @@ namespace kku { +/// Area +/// +/// Consists of 2 arithmetic +/// points that represent +/// a rectangle position +/// and 2 arithmetic +/// lengths by x and y +/// that represent +/// rectangle coverage area template >> struct Area { diff --git a/include/core/bpmsection.h b/include/core/bpmsection.h index ec2c18b..282dddb 100644 --- a/include/core/bpmsection.h +++ b/include/core/bpmsection.h @@ -5,14 +5,33 @@ namespace kku { +/// BPMSection +/// +/// Data to setup and distinguish +/// a section on beatmap timeline struct BPMSection { + /// Amount of beats + /// per minute in the section unsigned int bpm = 120; // Hi, osu + + /// Denominator in fraction of major + /// beats. Like, 1/2, 1/3. etc... unsigned int fraction = 2; + + /// Timestamp respresenting when + /// the section becomes active microsec offset_start = 0; + + /// Interval between beats microsec interval = 0; }; +/// BPMSectionComparator +/// +/// Predicate to define +/// BPMSection sorting rule: +/// by timestamp of start struct BPMSectionComparator { bool operator()(const BPMSection& lhs, const BPMSection& rhs) const noexcept @@ -21,4 +40,4 @@ struct BPMSectionComparator } }; -} \ No newline at end of file +} diff --git a/include/core/color.h b/include/core/color.h index f0c599d..e17b970 100644 --- a/include/core/color.h +++ b/include/core/color.h @@ -3,6 +3,9 @@ namespace kku { +/// Color +/// +/// Object of color data in RGBa struct Color { unsigned char red = 0; @@ -11,4 +14,4 @@ struct Color unsigned char alpha = 0; }; -} \ No newline at end of file +} diff --git a/include/core/corefactory.h b/include/core/corefactory.h index 8c73f9e..5b899d8 100644 --- a/include/core/corefactory.h +++ b/include/core/corefactory.h @@ -13,6 +13,10 @@ namespace kku { +/// CoreFactory +/// +/// Provides basic +/// multimedia elements and data class CoreFactory { public: diff --git a/include/core/editor.h b/include/core/editor.h index a82c3b1..329774d 100644 --- a/include/core/editor.h +++ b/include/core/editor.h @@ -10,6 +10,10 @@ namespace kku { +/// Editor +/// +/// Functional aggregation of +/// logic for Editor game mode class Editor { public: @@ -85,4 +89,4 @@ protected: std::set _bpm_sections; }; -} \ No newline at end of file +} diff --git a/include/core/game.h b/include/core/game.h index 54e1a39..217ba94 100644 --- a/include/core/game.h +++ b/include/core/game.h @@ -6,6 +6,10 @@ namespace kku { +/// Game +/// +/// Functional aggregation of +/// logic for actual game mode class Game { public: @@ -17,4 +21,4 @@ public: virtual void display() const = 0; }; -} \ No newline at end of file +} diff --git a/include/core/line.h b/include/core/line.h index 22d2d95..9170d65 100644 --- a/include/core/line.h +++ b/include/core/line.h @@ -6,6 +6,9 @@ namespace kku { +/// Line +/// +/// Graphical 2D line class Line { public: @@ -15,4 +18,4 @@ public: virtual void display() = 0; }; -} \ No newline at end of file +} diff --git a/include/core/music.h b/include/core/music.h index a1aa949..d968616 100644 --- a/include/core/music.h +++ b/include/core/music.h @@ -7,6 +7,9 @@ namespace kku { +/// Music +/// +/// Object for streaming music file class Music { public: diff --git a/include/core/vector.h b/include/core/vector.h index 7a8fd02..871201d 100644 --- a/include/core/vector.h +++ b/include/core/vector.h @@ -5,11 +5,10 @@ namespace kku { -/* Meaning an element of a vector space in math. - * Don't mistake for std::vector - * For now we don't need it as a special class, - * so let it be a wrapper. */ - +/// Vector2 +/// +/// Meaning an element of a vector space in math. +/// Don't mistake for std::vector template using Vector2 = std::pair;