forked from NaiJi/project-kyoku
Start documenting some classes
This commit is contained in:
parent
41541e0757
commit
f1d24460a6
|
@ -8,6 +8,15 @@
|
||||||
namespace kku
|
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 <typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
|
template <typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
|
||||||
struct Area
|
struct Area
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,14 +5,33 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// BPMSection
|
||||||
|
///
|
||||||
|
/// Data to setup and distinguish
|
||||||
|
/// a section on beatmap timeline
|
||||||
struct BPMSection
|
struct BPMSection
|
||||||
{
|
{
|
||||||
|
/// Amount of beats
|
||||||
|
/// per minute in the section
|
||||||
unsigned int bpm = 120; // Hi, osu
|
unsigned int bpm = 120; // Hi, osu
|
||||||
|
|
||||||
|
/// Denominator in fraction of major
|
||||||
|
/// beats. Like, 1/2, 1/3. etc...
|
||||||
unsigned int fraction = 2;
|
unsigned int fraction = 2;
|
||||||
|
|
||||||
|
/// Timestamp respresenting when
|
||||||
|
/// the section becomes active
|
||||||
microsec offset_start = 0;
|
microsec offset_start = 0;
|
||||||
|
|
||||||
|
/// Interval between beats
|
||||||
microsec interval = 0;
|
microsec interval = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// BPMSectionComparator
|
||||||
|
///
|
||||||
|
/// Predicate to define
|
||||||
|
/// BPMSection sorting rule:
|
||||||
|
/// by timestamp of start
|
||||||
struct BPMSectionComparator
|
struct BPMSectionComparator
|
||||||
{
|
{
|
||||||
bool operator()(const BPMSection& lhs, const BPMSection& rhs) const noexcept
|
bool operator()(const BPMSection& lhs, const BPMSection& rhs) const noexcept
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// Color
|
||||||
|
///
|
||||||
|
/// Object of color data in RGBa
|
||||||
struct Color
|
struct Color
|
||||||
{
|
{
|
||||||
unsigned char red = 0;
|
unsigned char red = 0;
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// CoreFactory
|
||||||
|
///
|
||||||
|
/// Provides basic
|
||||||
|
/// multimedia elements and data
|
||||||
class CoreFactory
|
class CoreFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// Editor
|
||||||
|
///
|
||||||
|
/// Functional aggregation of
|
||||||
|
/// logic for Editor game mode
|
||||||
class Editor
|
class Editor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// Game
|
||||||
|
///
|
||||||
|
/// Functional aggregation of
|
||||||
|
/// logic for actual game mode
|
||||||
class Game
|
class Game
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// Line
|
||||||
|
///
|
||||||
|
/// Graphical 2D line
|
||||||
class Line
|
class Line
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// Music
|
||||||
|
///
|
||||||
|
/// Object for streaming music file
|
||||||
class Music
|
class Music
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
namespace kku
|
namespace kku
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Meaning an element of a vector space in math.
|
/// Vector2
|
||||||
* Don't mistake for std::vector<T>
|
///
|
||||||
* For now we don't need it as a special class,
|
/// Meaning an element of a vector space in math.
|
||||||
* so let it be a wrapper. */
|
/// Don't mistake for std::vector<T>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using Vector2 = std::pair<T, T>;
|
using Vector2 = std::pair<T, T>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue