|
RhythmGame 1.4.3
|
Contains various helper classes and functions. More...
Namespaces | |
| namespace | detail |
Classes | |
| struct | BeatorajaState |
| struct | DXArchiveSegment |
| class | EnableSharedFromBase |
| A helper class for creating a shared pointer to self. More... | |
| class | Exception |
| class | FrameRateLimiter |
| struct | JavaRandom |
| class | Lr2Random |
| class | PendingReply |
| QML-facing handle for one asynchronous result. More... | |
| class | PendingReplySource |
| Producer-side control for a PendingReply. More... | |
| class | QtSink |
| struct | ShuffleResult |
| struct | Timeline |
| struct | TimelineLane |
| struct | TimelinePermutation |
| class | TupleSize |
| Used to get the size of a tuple or an aggregate. More... | |
Typedefs | |
| using | DXArchive = std::map< std::string, DXArchiveSegment > |
| using | Note = charts::BmsNotesData::Note |
| using | NoteType = charts::BmsNotesData::NoteType |
| using | QtSinkMt = QtSink< std::mutex > |
| using | Sha256 = std::string |
| using | Md5 = std::string |
Functions | |
| auto | capitalize (std::string_view str) -> std::string |
| template<typename T > | |
| auto | compress (const T &data) -> QByteArray |
| template<typename T > | |
| void | decompress (QByteArray data, T &out) |
| template<typename T > | |
| T | decompress (QByteArray data) |
| QString | convertTachiClearType (const int enumIndex) |
| auto | createQmlPropertyMap (QObject *parent) -> QQmlPropertyMap * |
| auto | normalizeDxaPath (const std::filesystem::path &path) -> std::string |
| DXArchive | extractDxaToMem (const std::filesystem::path &path) |
| int | extractDxaToFile (const std::filesystem::path &path) |
| auto | folderName (QString path) -> QString |
| template<typename T , typename Random > | |
| void | fisherYatesShuffle (std::span< T > arr, Random &randomGenerator, bool usePre130) |
| auto | getColumsIota (const int size) -> QList< int > |
| auto | getNextNote (const std::span< std::vector< charts::BmsNotesData::Note > > arr, std::vector< std::vector< charts::BmsNotesData::Note >::const_iterator > ¬eIters) -> std::optional< std::vector< charts::BmsNotesData::Note >::const_iterator > |
| auto | pushProposedNote (std::vector< charts::BmsNotesData::Note > &lane, const std::vector< charts::BmsNotesData::Note >::const_iterator ¬e) -> void |
| auto | tryPushingNoteWithDistance (const std::vector< charts::BmsNotesData::Note >::const_iterator ¬eIt, const QList< int > &columnsIota, std::vector< std::vector< charts::BmsNotesData::Note > > &newColumns, const std::chrono::nanoseconds preferredNoteDistance) -> bool |
| void | pushNoteWithMaxDistance (const std::vector< charts::BmsNotesData::Note >::const_iterator ¬eIt, const QList< int > &columnsIota, std::vector< std::vector< charts::BmsNotesData::Note > > &newColumns) |
| template<typename Random > | |
| void | shuffleAllNotes (std::span< std::vector< charts::BmsNotesData::Note > > arr, const std::chrono::nanoseconds preferredNoteDistance, Random &randomGenerator, bool usePre130) |
| auto | convertColumnsToK7 (QList< int > &columns) -> void |
| auto | convertNotesToK7 (std::span< std::vector< charts::BmsNotesData::Note > > ¬es) -> void |
| auto | generatePermutation (std::span< std::vector< charts::BmsNotesData::Note > > ¬es, resource_managers::NoteOrderAlgorithm algorithm, uint64_t seed, bool k5, bool usePre130) -> ShuffleResult |
| Generate a permutation of notes. | |
| auto | eraseFirst (std::vector< int > &lanes, const int value) -> void |
| auto | isPlayableTimelineNote (const Note ¬e) -> bool |
| auto | makeSourceForDest (const int numCols, const std::unordered_map< int, int > &permutationMap) -> TimelinePermutation |
| void | applyTimelinePermutations (std::span< std::vector< Note > > notes, const std::vector< Timeline > &timelines, const std::vector< TimelinePermutation > &permutations) |
| ShuffleResult | makeIdentityResult (int64_t seed, int numCols) |
| auto | makeModifyLanes (int numCols, int scratchCol, bool includeScratch) -> std::vector< int > |
| auto | makeLaneIdentity (int numCols) -> QList< int > |
| auto | applyLanePermutation (std::span< std::vector< Note > > notes, const QList< int > &columns) -> void |
| auto | lr2LaneToColumn (const int lane, const int keyCount) -> int |
| auto | generateLr2LanePermutation (std::span< std::vector< Note > > notes, resource_managers::NoteOrderAlgorithm algorithm, Lr2Random &rng) -> ShuffleResult |
| auto | generateBeatorajaLanePermutation (std::span< std::vector< Note > > notes, resource_managers::NoteOrderAlgorithm algorithm, int64_t seed) -> ShuffleResult |
| auto | mergePermutationMap (const std::unordered_map< int, int > &randomMap, const std::unordered_map< int, int > &lnActive) -> std::unordered_map< int, int > |
| auto | isBeatorajaNoteOrderAlgorithm (resource_managers::NoteOrderAlgorithm algorithm) -> bool |
| auto | isLr2NoteOrderAlgorithm (resource_managers::NoteOrderAlgorithm algorithm) -> bool |
| auto | flipBeatorajaDpPlayfields (std::array< std::vector< charts::BmsNotesData::Note >, charts::BmsNotesData::columnNumber > ¬es) -> void |
| auto | flipLr2DpPlayfields (std::array< std::vector< charts::BmsNotesData::Note >, charts::BmsNotesData::columnNumber > ¬es) -> void |
| auto | generateBeatorajaLanePermutation (std::span< std::vector< charts::BmsNotesData::Note > > notes, resource_managers::NoteOrderAlgorithm algorithm, int64_t seed) -> ShuffleResult |
| auto | generateLr2LanePermutation (std::span< std::vector< charts::BmsNotesData::Note > > notes, resource_managers::NoteOrderAlgorithm algorithm, Lr2Random &rng) -> ShuffleResult |
| template<std::size_t N, typename T > requires requires { std::get<N>(std::declval<T>()); } | |
| constexpr auto | get (T &&t) -> auto & |
| Returns the nth element of a type that supports std::get. | |
| template<std::size_t N, typename T > requires std::is_aggregate_v<std::remove_cvref_t<T>> | |
| constexpr auto | get (T &&aggregate) -> auto & |
| Returns the nth member of an aggregate. | |
| auto | pathToQString (const std::filesystem::path &path) -> QString |
| auto | pathToUtfString (const std::filesystem::path &path) -> std::string |
| auto | qStringToPath (const QString &qString) -> std::filesystem::path |
| template<typename Factory = spdlog::synchronous_factory> | |
| std::shared_ptr< spdlog::logger > | qtLoggerMt (const std::string &logger_name, QObject *qt_object, const std::string &meta_method) |
| auto | sha256 (const std::string_view str) -> Sha256 |
| auto | md5 (const std::string_view str) -> Md5 |
| auto | timingWindowsFromHash (const QHash< gameplay_logic::Judgement, QPair< qint64, qint64 > > &hash) -> gameplay_logic::rules::TimingWindows |
| auto | toLower (char p) -> char |
| auto | utfStringToPath (const std::string &utfString) -> std::filesystem::path |
| constexpr auto | packVersion (const uint32_t major, const uint32_t minor, const uint32_t patch) -> int64_t |
| constexpr auto | unpackVersion (const uint64_t version) -> std::tuple< uint32_t, uint32_t, uint32_t > |
Variables | |
| template<typename T > | |
| constexpr auto | tupleSizeV = TupleSize<T>::value |
| constexpr uint64_t | currentVersion |
Contains various helper classes and functions.
| using support::DXArchive = typedef std::map<std::string, DXArchiveSegment> |
| using support::Md5 = typedef std::string |
| using support::Note = typedef charts::BmsNotesData::Note |
| using support::NoteType = typedef charts::BmsNotesData::NoteType |
| using support::QtSinkMt = typedef QtSink<std::mutex> |
| using support::Sha256 = typedef std::string |
| auto support::applyLanePermutation | ( | std::span< std::vector< Note > > | notes, |
| const QList< int > & | columns | ||
| ) | -> void |
| void support::applyTimelinePermutations | ( | std::span< std::vector< Note > > | notes, |
| const std::vector< Timeline > & | timelines, | ||
| const std::vector< TimelinePermutation > & | permutations | ||
| ) |
| auto support::capitalize | ( | std::string_view | str | ) | -> std::string |
| auto support::compress | ( | const T & | data | ) | -> QByteArray |
| auto support::convertColumnsToK7 | ( | QList< int > & | columns | ) | -> void |
| auto support::convertNotesToK7 | ( | std::span< std::vector< charts::BmsNotesData::Note > > & | notes | ) | -> void |
| QString support::convertTachiClearType | ( | const int | enumIndex | ) |
| auto support::createQmlPropertyMap | ( | QObject * | parent | ) | -> QQmlPropertyMap * |
| T support::decompress | ( | QByteArray | data | ) |
| void support::decompress | ( | QByteArray | data, |
| T & | out | ||
| ) |
| auto support::eraseFirst | ( | std::vector< int > & | lanes, |
| const int | value | ||
| ) | -> void |
| auto support::extractDxaToFile | ( | const std::filesystem::path & | path | ) |
| auto support::extractDxaToMem | ( | const std::filesystem::path & | path | ) |
| void support::fisherYatesShuffle | ( | std::span< T > | arr, |
| Random & | randomGenerator, | ||
| bool | usePre130 | ||
| ) |
| auto support::flipBeatorajaDpPlayfields | ( | std::array< std::vector< charts::BmsNotesData::Note >, charts::BmsNotesData::columnNumber > & | notes | ) | -> void |
| auto support::flipLr2DpPlayfields | ( | std::array< std::vector< charts::BmsNotesData::Note >, charts::BmsNotesData::columnNumber > & | notes | ) | -> void |
|
inline |
| auto support::generateBeatorajaLanePermutation | ( | std::span< std::vector< charts::BmsNotesData::Note > > | notes, |
| resource_managers::NoteOrderAlgorithm | algorithm, | ||
| int64_t | seed | ||
| ) | -> ShuffleResult |
| auto support::generateBeatorajaLanePermutation | ( | std::span< std::vector< Note > > | notes, |
| resource_managers::NoteOrderAlgorithm | algorithm, | ||
| int64_t | seed | ||
| ) | -> ShuffleResult |
| auto support::generateLr2LanePermutation | ( | std::span< std::vector< charts::BmsNotesData::Note > > | notes, |
| resource_managers::NoteOrderAlgorithm | algorithm, | ||
| Lr2Random & | rng | ||
| ) | -> ShuffleResult |
| auto support::generateLr2LanePermutation | ( | std::span< std::vector< Note > > | notes, |
| resource_managers::NoteOrderAlgorithm | algorithm, | ||
| Lr2Random & | rng | ||
| ) | -> ShuffleResult |
| auto support::generatePermutation | ( | std::span< std::vector< charts::BmsNotesData::Note > > & | notes, |
| resource_managers::NoteOrderAlgorithm | algorithm, | ||
| uint64_t | seed, | ||
| bool | k5, | ||
| bool | usePre130 | ||
| ) | -> ShuffleResult |
Generate a permutation of notes.
The permutation is generated using the given algorithm and seed.
| notes | The notes to shuffle. |
| algorithm | The algorithm to use. |
| seed | The seed to use. |
| k5 | Whether to treat the notes 5k as 7k (legacy behavior) |
| usePre130 | Whether to use the broken pre-1.3.0 version of the s-random shuffle algorithm (legacy behavior) |
|
constexpr |
Returns the nth member of an aggregate.
| N | Index of the element to get. |
| T | Type of the aggregate. |
| aggregate | Aggregate to get the element from. |
|
constexpr |
Returns the nth element of a type that supports std::get.
| N | Index of the element to get. |
| T | Type of the object to get the element from. |
| t | Object to get the element from. |
| auto support::getColumsIota | ( | const int | size | ) | -> QList<int> |
| auto support::getNextNote | ( | const std::span< std::vector< charts::BmsNotesData::Note > > | arr, |
| std::vector< std::vector< charts::BmsNotesData::Note >::const_iterator > & | noteIters | ||
| ) | -> std::optional<std::vector<charts::BmsNotesData::Note>::const_iterator> |
| auto support::isBeatorajaNoteOrderAlgorithm | ( | resource_managers::NoteOrderAlgorithm | algorithm | ) | -> bool |
| auto support::isLr2NoteOrderAlgorithm | ( | resource_managers::NoteOrderAlgorithm | algorithm | ) | -> bool |
| auto support::isPlayableTimelineNote | ( | const Note & | note | ) | -> bool |
| auto support::lr2LaneToColumn | ( | const int | lane, |
| const int | keyCount | ||
| ) | -> int |
| ShuffleResult support::makeIdentityResult | ( | int64_t | seed, |
| int | numCols | ||
| ) |
| auto support::makeLaneIdentity | ( | int | numCols | ) | -> QList<int> |
| auto support::makeModifyLanes | ( | int | numCols, |
| int | scratchCol, | ||
| bool | includeScratch | ||
| ) | -> std::vector<int> |
| auto support::makeSourceForDest | ( | const int | numCols, |
| const std::unordered_map< int, int > & | permutationMap | ||
| ) | -> TimelinePermutation |
| auto support::md5 | ( | const std::string_view | str | ) | -> Md5 |
| auto support::mergePermutationMap | ( | const std::unordered_map< int, int > & | randomMap, |
| const std::unordered_map< int, int > & | lnActive | ||
| ) | -> std::unordered_map<int, int> |
| auto support::normalizeDxaPath | ( | const std::filesystem::path & | path | ) | -> std::string |
|
constexpr |
| auto support::pathToQString | ( | const std::filesystem::path & | path | ) | -> QString |
| auto support::pathToUtfString | ( | const std::filesystem::path & | path | ) | -> std::string |
| void support::pushNoteWithMaxDistance | ( | const std::vector< charts::BmsNotesData::Note >::const_iterator & | noteIt, |
| const QList< int > & | columnsIota, | ||
| std::vector< std::vector< charts::BmsNotesData::Note > > & | newColumns | ||
| ) |
| auto support::pushProposedNote | ( | std::vector< charts::BmsNotesData::Note > & | lane, |
| const std::vector< charts::BmsNotesData::Note >::const_iterator & | note | ||
| ) | -> void |
| auto support::qStringToPath | ( | const QString & | qString | ) | -> std::filesystem::path |
|
inline |
| auto support::sha256 | ( | const std::string_view | str | ) | -> Sha256 |
| void support::shuffleAllNotes | ( | std::span< std::vector< charts::BmsNotesData::Note > > | arr, |
| const std::chrono::nanoseconds | preferredNoteDistance, | ||
| Random & | randomGenerator, | ||
| bool | usePre130 | ||
| ) |
| auto support::timingWindowsFromHash | ( | const QHash< gameplay_logic::Judgement, QPair< qint64, qint64 > > & | hash | ) | -> gameplay_logic::rules::TimingWindows |
|
inline |
| auto support::tryPushingNoteWithDistance | ( | const std::vector< charts::BmsNotesData::Note >::const_iterator & | noteIt, |
| const QList< int > & | columnsIota, | ||
| std::vector< std::vector< charts::BmsNotesData::Note > > & | newColumns, | ||
| const std::chrono::nanoseconds | preferredNoteDistance | ||
| ) | -> bool |
|
constexpr |
| auto support::utfStringToPath | ( | const std::string & | utfString | ) | -> std::filesystem::path |
|
constexpr |