RhythmGame 1.4.3
Loading...
Searching...
No Matches
Classes | Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
gameplay_logic::BmsResult Class Referencefinal

The aggregated info about a score. More...

#include <BmsResult.h>

Inheritance diagram for gameplay_logic::BmsResult:
Inheritance graph
[legend]
Collaboration diagram for gameplay_logic::BmsResult:
Collaboration graph
[legend]

Classes

struct  DTO
 

Signals

void changed ()
 

Public Member Functions

 BmsResult (double maxPoints, int maxHits, int normalNoteCount, int scratchCount, int lnCount, int bssCount, int mineCount, QString clearType, QList< int > judgementCounts, int mineHits, double points, int maxCombo, int64_t unixTimestamp, int64_t length, QList< qint64 > randomSequence, uint64_t randomSeed, resource_managers::NoteOrderAlgorithm noteOrderAlgorithm, resource_managers::NoteOrderAlgorithm noteOrderAlgorithmP2, resource_managers::DpOptions dpOptions, ChartData::Keymode keymode, QString guid, QString sha256, QString md5, uint64_t gameVersion=support::currentVersion, QString owner=QStringLiteral(""), QObject *parent=nullptr)
 
auto getMaxPoints () const -> double
 
auto getMaxHits () const -> int
 
auto getNormalNoteCount () const -> int
 
auto getScratchCount () const -> int
 
auto getLnCount () const -> int
 
auto getBssCount () const -> int
 
auto getMineCount () const -> int
 
auto getPoints () const -> double
 
auto getMaxCombo () const -> int
 
auto getJudgementCounts () const -> const QList< int > &
 
auto getMineHits () const -> int
 
auto getClearType () const -> const QString &
 
auto getRandomSequence () const -> const QList< qint64 > &
 
auto getUnixTimestamp () const -> int64_t
 
auto getLength () const -> int64_t
 
auto getGuid () const -> QString
 
auto getSha256 () const -> QString
 
auto getMd5 () const -> QString
 
auto getRandomSeed () const -> uint64_t
 
auto getNoteOrderAlgorithm () const -> resource_managers::NoteOrderAlgorithm
 
auto getNoteOrderAlgorithmP2 () const -> resource_managers::NoteOrderAlgorithm
 
auto getDpOptions () const -> resource_managers::DpOptions
 
auto getKeymode () const -> ChartData::Keymode
 
auto getPermutation () const -> const QList< int > &
 
auto getGameVersion () const -> uint64_t
 
auto getOwner () const -> const QString &
 
auto clone () const -> std::unique_ptr< BmsResult >
 
bool updateFrom (const BmsResult &other)
 
bool isReplayAvailable () const
 
bool isGaugeHistoryAvailable () const
 
bool isImported () const
 
auto getSourceName () const -> QString
 
void setStoredData (bool replay, bool gauges, bool fromImport, QString source)
 
void save (db::SqliteCppDb &db, int source=0, int longNoteMode=0) const
 
auto serializeRandomSequence () const -> QByteArray
 
void save (db::SqliteCppDb &db, const QByteArray &randomSequenceCompressed, int source, int longNoteMode) const
 
auto toJson () const -> QJsonObject
 

Static Public Member Functions

static auto load (const DTO &dto) -> std::unique_ptr< BmsResult >
 
static auto fromJson (const QJsonObject &obj) -> std::unique_ptr< BmsResult >
 

Properties

double maxPoints
 The maximum possible points achievable in the score.
 
int maxHits
 The maximum number of possible hits (normal notes + long notes) in the chart.
 
int normalNoteCount
 The number of normal notes in the chart.
 
int scratchCount
 The number of scratch notes in the chart.
 
int lnCount
 The number of long notes in the chart excluding BSS (scratch lns).
 
int bssCount
 The number of BSS (scratch long notes) in the chart.
 
int mineCount
 The number of mines (landmines) in the chart.
 
double points
 The points achieved in the score.
 
int maxCombo
 The best combo achieved in the score.
 
QList< int > judgementCounts
 The counts of each judgement type achieved in the score.
 
int mineHits
 The number of mines hit in the score.
 
QString clearType
 The clear type achieved in the score.
 
QList< qint64 > randomSequence
 The random sequence used for parsing the chart.
 
int64_t unixTimestamp
 The timestamp when the score was achieved, in Unix time.
 
int64_t length
 The length of the chart in nanoseconds.
 
QString guid
 The unique identifier for the score.
 
QString sha256
 The SHA-256 hash of the chart file, in hexadecimal upper-case format.
 
QString md5
 The MD5 hash of the chart file, in hexadecimal upper-case format.
 
uint64_t randomSeed
 The random seed used for note order shuffling.
 
resource_managers::NoteOrderAlgorithm noteOrderAlgorithm READ getNoteOrderAlgorithm
 The note order algorithm used for the chart.
 
resource_managers::NoteOrderAlgorithm noteOrderAlgorithmP2 READ getNoteOrderAlgorithmP2
 The note order algorithm used for player 2 side in DP charts.
 
resource_managers::DpOptions dpOptions
 The DP options used for the score.
 
gameplay_logic::ChartData::Keymode keymode
 The keymode of the chart.
 
QList< int > permutation
 The permutation of columns that resulted from NoteOrderAlgorithm.
 
uint64_t gameVersion
 The game version where the score was achieved.
 
QString owner
 The owner of the score.
 
bool replayAvailable = false
 
bool gaugeHistoryAvailable = false
 
bool imported = false
 
QString sourceName = QStringLiteral("RhythmGame")
 

Detailed Description

The aggregated info about a score.

Constructor & Destructor Documentation

◆ BmsResult()

gameplay_logic::BmsResult::BmsResult ( double  maxPoints,
int  maxHits,
int  normalNoteCount,
int  scratchCount,
int  lnCount,
int  bssCount,
int  mineCount,
QString  clearType,
QList< int >  judgementCounts,
int  mineHits,
double  points,
int  maxCombo,
int64_t  unixTimestamp,
int64_t  length,
QList< qint64 >  randomSequence,
uint64_t  randomSeed,
resource_managers::NoteOrderAlgorithm  noteOrderAlgorithm,
resource_managers::NoteOrderAlgorithm  noteOrderAlgorithmP2,
resource_managers::DpOptions  dpOptions,
ChartData::Keymode  keymode,
QString  guid,
QString  sha256,
QString  md5,
uint64_t  gameVersion = support::currentVersion,
QString  owner = QStringLiteral(""),
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ changed

void gameplay_logic::BmsResult::changed ( )
signal

◆ clone()

auto gameplay_logic::BmsResult::clone ( ) const -> std::unique_ptr<BmsResult>

◆ fromJson()

auto gameplay_logic::BmsResult::fromJson ( const QJsonObject &  obj) -> std::unique_ptr<BmsResult>
static

◆ getBssCount()

auto gameplay_logic::BmsResult::getBssCount ( ) const -> int

◆ getClearType()

auto gameplay_logic::BmsResult::getClearType ( ) const -> const QString&

◆ getDpOptions()

auto gameplay_logic::BmsResult::getDpOptions ( ) const -> resource_managers::DpOptions

◆ getGameVersion()

auto gameplay_logic::BmsResult::getGameVersion ( ) const -> uint64_t

◆ getGuid()

auto gameplay_logic::BmsResult::getGuid ( ) const -> QString

◆ getJudgementCounts()

auto gameplay_logic::BmsResult::getJudgementCounts ( ) const -> const QList<int>&

◆ getKeymode()

auto gameplay_logic::BmsResult::getKeymode ( ) const -> ChartData::Keymode

◆ getLength()

auto gameplay_logic::BmsResult::getLength ( ) const -> int64_t

◆ getLnCount()

auto gameplay_logic::BmsResult::getLnCount ( ) const -> int

◆ getMaxCombo()

auto gameplay_logic::BmsResult::getMaxCombo ( ) const -> int

◆ getMaxHits()

auto gameplay_logic::BmsResult::getMaxHits ( ) const -> int

◆ getMaxPoints()

auto gameplay_logic::BmsResult::getMaxPoints ( ) const -> double

◆ getMd5()

auto gameplay_logic::BmsResult::getMd5 ( ) const -> QString

◆ getMineCount()

auto gameplay_logic::BmsResult::getMineCount ( ) const -> int

◆ getMineHits()

auto gameplay_logic::BmsResult::getMineHits ( ) const -> int

◆ getNormalNoteCount()

auto gameplay_logic::BmsResult::getNormalNoteCount ( ) const -> int

◆ getNoteOrderAlgorithm()

auto gameplay_logic::BmsResult::getNoteOrderAlgorithm ( ) const -> resource_managers::NoteOrderAlgorithm

◆ getNoteOrderAlgorithmP2()

auto gameplay_logic::BmsResult::getNoteOrderAlgorithmP2 ( ) const -> resource_managers::NoteOrderAlgorithm

◆ getOwner()

auto gameplay_logic::BmsResult::getOwner ( ) const -> const QString&

◆ getPermutation()

auto gameplay_logic::BmsResult::getPermutation ( ) const -> const QList<int>&

◆ getPoints()

auto gameplay_logic::BmsResult::getPoints ( ) const -> double

◆ getRandomSeed()

auto gameplay_logic::BmsResult::getRandomSeed ( ) const -> uint64_t

◆ getRandomSequence()

auto gameplay_logic::BmsResult::getRandomSequence ( ) const -> const QList<qint64>&

◆ getScratchCount()

auto gameplay_logic::BmsResult::getScratchCount ( ) const -> int

◆ getSha256()

auto gameplay_logic::BmsResult::getSha256 ( ) const -> QString

◆ getSourceName()

auto gameplay_logic::BmsResult::getSourceName ( ) const -> QString
inline

◆ getUnixTimestamp()

auto gameplay_logic::BmsResult::getUnixTimestamp ( ) const -> int64_t

◆ isGaugeHistoryAvailable()

bool gameplay_logic::BmsResult::isGaugeHistoryAvailable ( ) const
inline

◆ isImported()

bool gameplay_logic::BmsResult::isImported ( ) const
inline

◆ isReplayAvailable()

bool gameplay_logic::BmsResult::isReplayAvailable ( ) const
inline

◆ load()

auto gameplay_logic::BmsResult::load ( const DTO &  dto) -> std::unique_ptr<BmsResult>
static

◆ save() [1/2]

void gameplay_logic::BmsResult::save ( db::SqliteCppDb &  db,
const QByteArray &  randomSequenceCompressed,
int  source,
int  longNoteMode 
) const

◆ save() [2/2]

void gameplay_logic::BmsResult::save ( db::SqliteCppDb &  db,
int  source = 0,
int  longNoteMode = 0 
) const

◆ serializeRandomSequence()

auto gameplay_logic::BmsResult::serializeRandomSequence ( ) const -> QByteArray

◆ setStoredData()

void gameplay_logic::BmsResult::setStoredData ( bool  replay,
bool  gauges,
bool  fromImport,
QString  source 
)
inline

◆ toJson()

auto gameplay_logic::BmsResult::toJson ( ) const -> QJsonObject

◆ updateFrom()

bool gameplay_logic::BmsResult::updateFrom ( const BmsResult &  other)

Updates cached metadata while keeping existing QML references valid.

Property Documentation

◆ bssCount

int gameplay_logic::BmsResult::bssCount
read

The number of BSS (scratch long notes) in the chart.

A BSS consists of an ln start and ln end. Such a pair counts as one BSS.

◆ clearType

QString gameplay_logic::BmsResult::clearType
read

The clear type achieved in the score.

This property indicates the type of clear achieved in the score, such as "HARD", "EXHARD", "FC", "FAILED", etc. For charts played with course gauges, it will always be "NOPLAY".

◆ dpOptions

resource_managers::DpOptions gameplay_logic::BmsResult::dpOptions
read

The DP options used for the score.

This property indicates the DP options that were active during gameplay.

See also
resource_managers::DpOptions

◆ gameVersion

uint64_t gameplay_logic::BmsResult::gameVersion
read

The game version where the score was achieved.

For migrations.

◆ gaugeHistoryAvailable

bool gameplay_logic::BmsResult::gaugeHistoryAvailable = false
read

◆ getNoteOrderAlgorithm

resource_managers::NoteOrderAlgorithm noteOrderAlgorithm READ gameplay_logic::BmsResult::getNoteOrderAlgorithm

The note order algorithm used for the chart.

This property indicates the algorithm used to modify the arrangement of notes in the chart.

See also
resource_managers::note_order_algorithm::NoteOrderAlgorithm

◆ getNoteOrderAlgorithmP2

resource_managers::NoteOrderAlgorithm noteOrderAlgorithmP2 READ gameplay_logic::BmsResult::getNoteOrderAlgorithmP2

The note order algorithm used for player 2 side in DP charts.

See also
noteOrderAlgorithm

◆ guid

QString gameplay_logic::BmsResult::guid
read

The unique identifier for the score.

This GUID is generated when the BmsLiveScore instance is created and can be used to uniquely identify the score instance.

◆ imported

bool gameplay_logic::BmsResult::imported = false
read

◆ judgementCounts

QList< int > gameplay_logic::BmsResult::judgementCounts
read
Initial value:
=
QList<int>(magic_enum::enum_count<Judgement>())

The counts of each judgement type achieved in the score.

The order is defined in the Judgement enum.

See also
Judgement

◆ keymode

gameplay_logic::ChartData::Keymode gameplay_logic::BmsResult::keymode
read

The keymode of the chart.

Can be different from the keymode of chartData when resource_managers::dp_options::DpOptions is battle.

Note
This is the property used to determine which gampley screen to load.

◆ length

int64_t gameplay_logic::BmsResult::length
read

The length of the chart in nanoseconds.

This property indicates the total duration of the chart from start to finish, measured in nanoseconds.

Note
This is based on the timestamp of the last visible note.

◆ lnCount

int gameplay_logic::BmsResult::lnCount
read

The number of long notes in the chart excluding BSS (scratch lns).

A long note consists of an LN start and LN end. Such a pair counts as one long note.

◆ maxCombo

int gameplay_logic::BmsResult::maxCombo
read

The best combo achieved in the score.

◆ maxHits

int gameplay_logic::BmsResult::maxHits
read

The maximum number of possible hits (normal notes + long notes) in the chart.

◆ maxPoints

double gameplay_logic::BmsResult::maxPoints
read

The maximum possible points achievable in the score.

◆ md5

QString gameplay_logic::BmsResult::md5
read

The MD5 hash of the chart file, in hexadecimal upper-case format.

This can be used to uniquely identify a chart file.

◆ mineCount

int gameplay_logic::BmsResult::mineCount
read

The number of mines (landmines) in the chart.

◆ mineHits

int gameplay_logic::BmsResult::mineHits
read

The number of mines hit in the score.

◆ normalNoteCount

int gameplay_logic::BmsResult::normalNoteCount
read

The number of normal notes in the chart.

Normal means not long notes, not mines, not invisible notes, not scratches

◆ owner

QString gameplay_logic::BmsResult::owner
read

The owner of the score.

Local scores have an empty string as the source. For online scores, this is a link to the profile this score belongs to.

◆ permutation

QList< int > gameplay_logic::BmsResult::permutation
read

The permutation of columns that resulted from NoteOrderAlgorithm.

This is reconstructed from the saved note-order settings and random seed, so stored scores expose the same lane layout that was known during gameplay.

◆ points

double gameplay_logic::BmsResult::points
read

The points achieved in the score.

◆ randomSeed

uint64_t gameplay_logic::BmsResult::randomSeed
read

The random seed used for note order shuffling.

This seed is used to initialize the mt19937 random number generator for shuffling notes according to the selected note order algorithm.

Note
This seed is not used for #RANDOM parsing. Use randomSequence for that.
See also
resource_managers::NoteOrderAlgorithm
noteOrderAlgorithm

◆ randomSequence

QList< qint64 > gameplay_logic::BmsResult::randomSequence
read

The random sequence used for parsing the chart.

If the chart uses #RANDOM, this property provides the sequence of random values used to determine the contents of the chart. If the chart does not use randomization, this list will be empty.

◆ replayAvailable

bool gameplay_logic::BmsResult::replayAvailable = false
read

Whether the saved run has a recording, independently of whether it is loaded.

◆ scratchCount

int gameplay_logic::BmsResult::scratchCount
read

The number of scratch notes in the chart.

Scratch notes are normal notes on scratch columns.

◆ sha256

QString gameplay_logic::BmsResult::sha256
read

The SHA-256 hash of the chart file, in hexadecimal upper-case format.

This can be used to uniquely identify a chart file.

◆ sourceName

QString gameplay_logic::BmsResult::sourceName = QStringLiteral("RhythmGame")
read

◆ unixTimestamp

int64_t gameplay_logic::BmsResult::unixTimestamp
read

The timestamp when the score was achieved, in Unix time.

This property records the time when the score was created, represented as the number of seconds since January 1, 1970 (the Unix epoch).


The documentation for this class was generated from the following files: