Rating of the difficulty of the gems of a remix, from the gaps between consecutive gems.
More...
#include <difficultyrating.h>
|
| | DifficultyRating (float fTempo, int nNumBars, int nTicksPerBar) |
| | Construct a rating with no tracks rated.
|
| | ~DifficultyRating () |
| | Release the rating.
|
| float | GapDifficulty (int nTick, bool bSameLane, float fGapMs) const |
| | Report the difficulty of a gap between two gems.
|
| void | BeginTrack (int nSlot) |
| | Start rating a track.
|
| void | AddGem (int nLane, int nTick) |
| | Rate the next gem of the track, closing the previous bar when the gem starts a new one.
|
| int | EndTrack () |
| | Finish rating a track and add its mean bar difficulty to the rating.
|
| int | RateCatchTrack (const CatchTrackData *pData, int nSlot) |
| | Rate the gems of a catch track.
|
| int | RatePitchTrack (PitchTrackGems *pGems) |
| | Rate the gems of a pitch track into the first set of bar difficulties.
|
| int | GetSkillTier () |
| | Report the skill tier of the rating from the "skill_thresholds" entry of the "game" section of the configuration.
|
| bool | IsBelowEmptyThreshold () |
| | Report whether the fraction of bars without gems is below the "empty_threshold" entry of the "game" section of the configuration.
|
| float | GetDifficulty () const |
| | Report the sum of the mean bar difficulties of the rated tracks.
|
| float | GetEmptyFraction () const |
| | Report the fraction of the bars of the rated tracks without gems.
|
|
| static constexpr int | kNumSlots = 4 |
| | Number of sets of bar difficulties the rating records.
|
Rating of the difficulty of the gems of a remix, from the gaps between consecutive gems.
The class is not polymorphic and has no RTTI. The name is inferred. A remix rates each of its tracks in turn. Each gap between two gems of a track is worth a difficulty that falls as the gap grows and that is higher when both gems lie in the same lane. The difficulty of a bar is twice the difficulty of the gap from its last gem to its end plus its three hardest gaps. The difficulty of a track is the sum of its gap and bar difficulties over its number of bars with gems.
◆ DifficultyRating()
| DifficultyRating::DifficultyRating |
( |
float | fTempo, |
|
|
int | nNumBars, |
|
|
int | nTicksPerBar ) |
Construct a rating with no tracks rated.
- Parameters
-
| fTempo | The tempo of the remix, in beats per minute. |
| nNumBars | The number of bars. |
| nTicksPerBar | The length of a bar in ticks. |
- Ghidra address:
- NTSC-U/C: 0x0013b300
- Ghidra address:
- PAL: 0x0013cbd0
◆ ~DifficultyRating()
| DifficultyRating::~DifficultyRating |
( |
| ) |
|
|
inline |
Release the rating.
- Ghidra address:
- NTSC-U/C: 0x0033f098
- Ghidra address:
- PAL: 0x003ac5d0
◆ GapDifficulty()
| float DifficultyRating::GapDifficulty |
( |
int | nTick, |
|
|
bool | bSameLane, |
|
|
float | fGapMs ) const |
Report the difficulty of a gap between two gems.
Interpolates the gap in a table of gap lengths.
- Parameters
-
| nTick | The tick of the second gem. The body does not read it. |
| bSameLane | Both gems lie in the same lane. |
| fGapMs | The gap, in milliseconds. |
- Returns
- The difficulty.
- Ghidra address:
- NTSC-U/C: 0x0013b440
- Ghidra address:
- PAL: 0x0013cd10
◆ BeginTrack()
| void DifficultyRating::BeginTrack |
( |
int | nSlot | ) |
|
Start rating a track.
- Parameters
-
| nSlot | The set of bar difficulties the track records into. |
- Ghidra address:
- NTSC-U/C: 0x0013b4e0
- Ghidra address:
- PAL: 0x0013cdb0
◆ AddGem()
| void DifficultyRating::AddGem |
( |
int | nLane, |
|
|
int | nTick ) |
Rate the next gem of the track, closing the previous bar when the gem starts a new one.
- Parameters
-
| nLane | The lane of the gem. |
| nTick | The tick of the gem. |
- Ghidra address:
- NTSC-U/C: 0x0013b510
- Ghidra address:
- PAL: 0x0013cde0
◆ EndTrack()
| int DifficultyRating::EndTrack |
( |
| ) |
|
Finish rating a track and add its mean bar difficulty to the rating.
- Returns
- Half the mean bar difficulty of the track, truncated.
- Ghidra address:
- NTSC-U/C: 0x0013b848
- Ghidra address:
- PAL: 0x0013d118
◆ RateCatchTrack()
| int DifficultyRating::RateCatchTrack |
( |
const CatchTrackData * | pData, |
|
|
int | nSlot ) |
Rate the gems of a catch track.
- Parameters
-
| pData | The gems. |
| nSlot | The set of bar difficulties the track records into. |
- Returns
- The value of EndTrack().
- Ghidra address:
- NTSC-U/C: 0x0013b8c8
- Ghidra address:
- PAL: 0x0013d198
◆ RatePitchTrack()
Rate the gems of a pitch track into the first set of bar difficulties.
- Parameters
-
- Returns
- The value of EndTrack().
- Ghidra address:
- NTSC-U/C: 0x0013b968
- Ghidra address:
- PAL: 0x0013d238
◆ GetSkillTier()
| int DifficultyRating::GetSkillTier |
( |
| ) |
|
Report the skill tier of the rating from the "skill_thresholds" entry of the "game" section of the configuration.
- Returns
- The number of thresholds the difficulty is not below, 0 to 3.
- Ghidra address:
- NTSC-U/C: 0x0013ba28
- Ghidra address:
- PAL: 0x0013d2f8
◆ IsBelowEmptyThreshold()
| bool DifficultyRating::IsBelowEmptyThreshold |
( |
| ) |
|
Report whether the fraction of bars without gems is below the "empty_threshold" entry of the "game" section of the configuration.
- Returns
- True when the fraction is below the threshold.
- Ghidra address:
- NTSC-U/C: 0x0013bb08
- Ghidra address:
- PAL: 0x0013d3d8
◆ GetDifficulty()
| float DifficultyRating::GetDifficulty |
( |
| ) |
const |
Report the sum of the mean bar difficulties of the rated tracks.
- Returns
- mDifficulty.
- Ghidra address:
- NTSC-U/C: 0x0013bb80
- Ghidra address:
- PAL: 0x0013d450
◆ GetEmptyFraction()
| float DifficultyRating::GetEmptyFraction |
( |
| ) |
const |
Report the fraction of the bars of the rated tracks without gems.
- Returns
- The fraction.
- Ghidra address:
- NTSC-U/C: 0x0013bb88
- Ghidra address:
- PAL: 0x0013d458
◆ kNumSlots
| int DifficultyRating::kNumSlots = 4 |
|
staticconstexpr |
Number of sets of bar difficulties the rating records.
The documentation for this class was generated from the following file: