|
RhythmGame 1.4.3
|
The main class responsible for running a chart during gameplay. More...
#include <ChartRunner.h>


Public Types | |
| enum class | EventType { KeyPress , KeyRelease } |
| enum | Status { Loading , Ready , Running , Finished } |
Signals | |
| void | statusChanged () |
| void | startPendingChanged () |
| void | bgaLoaded () |
| void | inputMappingChanged () |
Public Member Functions | |
| ChartRunner (ChartData *chartData, QFuture< std::unique_ptr< qml_components::BgaContainer > > bgaFuture, ChartData::Keymode keymode, Player *player1, Player *player2, QObject *parent=nullptr) | |
| Q_INVOKABLE void | start () |
| auto | startPending () const -> bool |
| void | holdStart () |
| void | releaseStart () |
| void | passKey (input::BmsKey key, EventType eventType, int64_t time) |
| Q_INVOKABLE QList< BmsScore * > | finish () |
| auto | getChartData () const -> ChartData * |
| auto | getKeymode () const -> ChartData::Keymode |
| auto | getStatus () const -> Status |
| auto | getBga () const -> qml_components::BgaContainer * |
| auto | getPlayer1 () const -> Player * |
| auto | getPlayer2 () const -> Player * |
| auto | getInputMapping () const -> QList< int > |
| void | setInputMapping (QList< int > inputMapping) |
| auto | inputSuppressed () const -> bool |
| void | setInputSuppressed (bool suppressed) |
| auto | currentOffsetFromStart () const -> std::chrono::nanoseconds |
Properties | |
| ChartData * | chartData |
| The chart data of the chart being played. | |
| qml_components::BgaContainer * | bga {} |
| The BGA object. Initially null. | |
| Status | status { Loading } |
| The current status of the chart runner. | |
| bool | startPending |
| gameplay_logic::ChartData::Keymode | keymode |
| The keymode of the chart being played. | |
| QList< int > | inputMapping |
| Mapping of BmsKey to column index. Usually iota by default except in 10k mode, where the P2 side has columns moved right. | |
The main class responsible for running a chart during gameplay.
Once start() is called and the BGA and sounds are loaded, the ChartRunner starts its update timer. It updates the player objects on each timer tick. It also handles key events and passes them to the appropriate player object.
|
strong |
|
explicit |
|
signal |
| auto gameplay_logic::ChartRunner::currentOffsetFromStart | ( | ) | const -> std::chrono::nanoseconds |
| auto gameplay_logic::ChartRunner::finish | ( | ) |
| auto gameplay_logic::ChartRunner::getBga | ( | ) | const -> qml_components::BgaContainer* |
| auto gameplay_logic::ChartRunner::getChartData | ( | ) | const -> ChartData* |
| auto gameplay_logic::ChartRunner::getInputMapping | ( | ) | const -> QList<int> |
| auto gameplay_logic::ChartRunner::getKeymode | ( | ) | const -> ChartData::Keymode |
| auto gameplay_logic::ChartRunner::getPlayer1 | ( | ) | const -> Player* |
| auto gameplay_logic::ChartRunner::getPlayer2 | ( | ) | const -> Player* |
| auto gameplay_logic::ChartRunner::getStatus | ( | ) | const -> Status |
| void gameplay_logic::ChartRunner::holdStart | ( | ) |
|
signal |
| auto gameplay_logic::ChartRunner::inputSuppressed | ( | ) | const -> bool |
| void gameplay_logic::ChartRunner::passKey | ( | input::BmsKey | key, |
| EventType | eventType, | ||
| int64_t | time | ||
| ) |
| void gameplay_logic::ChartRunner::releaseStart | ( | ) |
| void gameplay_logic::ChartRunner::setInputMapping | ( | QList< int > | inputMapping | ) |
| void gameplay_logic::ChartRunner::setInputSuppressed | ( | bool | suppressed | ) |
| void gameplay_logic::ChartRunner::start | ( | ) |
| auto gameplay_logic::ChartRunner::startPending | ( | ) | const -> bool |
|
signal |
|
signal |
|
read |
The BGA object. Initially null.
|
read |
The chart data of the chart being played.
|
read |
Mapping of BmsKey to column index. Usually iota by default except in 10k mode, where the P2 side has columns moved right.
If you want to flip scratch in 5k mode, you will want key 3 to correspond to column 1. Use this to achieve that.
|
read |
The keymode of the chart being played.
Can be different from the keymode of chartData when resource_managers::dp_options::DpOptions is battle.
|
read |
A start request waiting for resources or an external start hold.