5#ifndef RHYTHMGAME_BMSGAMEREFEREE_H
6#define RHYTHMGAME_BMSGAMEREFEREE_H
28 using BgmType = std::pair<std::chrono::nanoseconds, sounds::Sound*>;
30 std::array<std::vector<rules::HitRules::Note>,
33 std::array<std::vector<rules::HitRules::Mine>,
36 std::vector<BgmType> bgms;
37 std::span<BgmType> currentBgms;
38 std::vector<charts::BmsNotesData::BpmChangeValues> bpmChanges;
39 std::vector<charts::BmsNotesData::SpeedChange> speedChanges;
40 std::unordered_map<uint64_t, std::shared_ptr<sounds::Sound>>
sounds;
43 std::shared_ptr<sounds::Sound> mineHitSound;
44 static constexpr auto inputKeyCount =
46 std::array<bool, inputKeyCount> pressedKeys{};
47 std::array<int, charts::BmsNotesData::columnNumber> pressedState{};
58 void addNote(
decltype(notes)::value_type&
column,
59 decltype(mines)::value_type& minesColumn,
65 std::array<std::vector<charts::BmsNotesData::Note>,
67 const std::vector<std::pair<charts::BmsNotesData::Time, uint64_t>>&
69 std::vector<charts::BmsNotesData::BpmChangeValues> bpmChanges,
70 std::vector<charts::BmsNotesData::SpeedChange> speedChanges,
71 std::shared_ptr<sounds::Sound> mineHitSound,
73 std::unordered_map<uint64_t, std::shared_ptr<sounds::Sound>>
sounds,
86 bool lastUpdate =
false);
int column
Definition BmsReplayData.cpp:41
int64_t offsetFromStart
Definition BmsReplayData.cpp:38
zip_uint64_t index
Definition SongAssetStore.cpp:436
The update manager of notes and sounds during gameplay.
Definition BmsGameReferee.h:27
BmsGameReferee(const BmsGameReferee &)=delete
auto getBpm(std::chrono::nanoseconds offsetFromStart) const -> charts::BmsNotesData::BpmChangeValues
Definition BmsGameReferee.cpp:168
void update(std::chrono::nanoseconds offsetFromStart, bool lastUpdate=false)
Update the internal state of the referee.
Definition BmsGameReferee.cpp:127
auto getSpeedMultiplier(std::chrono::nanoseconds offsetFromStart) const -> double
Definition BmsGameReferee.cpp:60
static auto getPosition(charts::BmsNotesData::BpmChangeValues bpm, std::chrono::nanoseconds offsetFromStart) -> PositionInfo
Get the position in the chart, expressed in beats.
Definition BmsGameReferee.cpp:208
auto hasSpeedChanges() const -> bool
Definition BmsGameReferee.h:93
BmsGameReferee(BmsGameReferee &&)=default
BmsGameReferee & operator=(const BmsGameReferee &)=delete
BmsGameReferee & operator=(BmsGameReferee &&)=default
auto passPressed(std::chrono::nanoseconds offsetFromStart, input::BmsKey key) -> void
Handle a key press event.
Definition BmsGameReferee.cpp:185
auto passReleased(std::chrono::nanoseconds offsetFromStart, input::BmsKey key) -> void
Handle a key press event.
Definition BmsGameReferee.cpp:227
double Position
Definition BmsGameReferee.h:50
The score that gets updated during gameplay.
Definition BmsLiveScore.h:57
The class that determines which notes get hit or missed.
Definition HitRules.h:36
Classes and functions mostly related to gameplay.
Definition ArenaGameplaySource.h:10
The namespace for all sound related classes.
Definition HitRules.h:16
Definition BmsNotesData.h:81
Definition BmsNotesData.h:67
static constexpr auto columnNumber
Definition BmsNotesData.h:101
The position at which we are in the chart.
Definition BmsGameReferee.h:99
Position beatPosition
Definition BmsGameReferee.h:101
Position position
Definition BmsGameReferee.h:100