Move GradedNote to Data
This commit is contained in:
parent
16a689a43e
commit
8c69bed6e2
@ -14,6 +14,8 @@ sources = [
|
||||
'include/whereami/whereami++.cpp',
|
||||
'src/Data/Chart.cpp',
|
||||
'src/Data/Chart.hpp',
|
||||
'src/Data/GradedNote.cpp',
|
||||
'src/Data/GradedNote.hpp',
|
||||
'src/Data/Note.hpp',
|
||||
'src/Data/Preferences.hpp',
|
||||
'src/Data/Preferences.cpp',
|
||||
@ -66,8 +68,6 @@ sources = [
|
||||
'src/Screens/MusicSelect/SongInfo.cpp',
|
||||
'src/Screens/Gameplay/Gameplay.hpp',
|
||||
'src/Screens/Gameplay/Gameplay.cpp',
|
||||
'src/Screens/Gameplay/GradedNote.cpp',
|
||||
'src/Screens/Gameplay/GradedNote.hpp',
|
||||
'src/Screens/Gameplay/PreciseMusic.hpp',
|
||||
'src/Screens/Gameplay/PreciseMusic.cpp',
|
||||
'src/Screens/Gameplay/Silence.hpp',
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "GradedNote.hpp"
|
||||
|
||||
namespace Gameplay {
|
||||
namespace Data {
|
||||
Resources::MarkerAnimation judgement_to_animation(const Judgement& j) {
|
||||
switch (j) {
|
||||
case Judgement::Perfect:
|
@ -4,10 +4,10 @@
|
||||
|
||||
#include <SFML/System/Time.hpp>
|
||||
|
||||
#include "../../Data/Note.hpp"
|
||||
#include "../../Resources/Marker.hpp"
|
||||
#include "../Resources/Marker.hpp"
|
||||
#include "Note.hpp"
|
||||
|
||||
namespace Gameplay {
|
||||
namespace Data {
|
||||
enum class Judgement {
|
||||
Perfect,
|
||||
Great,
|
@ -21,7 +21,7 @@ namespace Gameplay {
|
||||
marker(t_resources.shared.get_selected_marker())
|
||||
{
|
||||
for (auto&& note : chart.notes) {
|
||||
notes.emplace_back(GradedNote{note});
|
||||
notes.emplace_back(Data::GradedNote{note});
|
||||
}
|
||||
auto music_path = song_selection.song.full_audio_path();
|
||||
if (music_path) {
|
||||
@ -166,7 +166,7 @@ namespace Gameplay {
|
||||
if (note.timed_judgment) {
|
||||
continue;
|
||||
}
|
||||
notes[i].store(GradedNote{note, music_time-note.timing});
|
||||
notes[i].store(Data::GradedNote{note, music_time-note.timing});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -179,7 +179,7 @@ namespace Gameplay {
|
||||
note_index = i;
|
||||
break;
|
||||
} else {
|
||||
note.timed_judgment.emplace(sf::Time::Zero, Judgement::Miss);
|
||||
note.timed_judgment.emplace(sf::Time::Zero, Data::Judgement::Miss);
|
||||
notes[i].store(note);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
#include "../../Data/Chart.hpp"
|
||||
#include "../../Data/GradedNote.hpp"
|
||||
#include "../../Data/Note.hpp"
|
||||
#include "../../Data/Song.hpp"
|
||||
#include "../../Data/Score.hpp"
|
||||
@ -15,7 +16,6 @@
|
||||
#include "../../Input/Events.hpp"
|
||||
#include "../../Toolkit/Debuggable.hpp"
|
||||
#include "AbstractMusic.hpp"
|
||||
#include "GradedNote.hpp"
|
||||
#include "Resources.hpp"
|
||||
|
||||
namespace Gameplay {
|
||||
@ -35,9 +35,9 @@ namespace Gameplay {
|
||||
const Resources::Marker& marker;
|
||||
std::unique_ptr<AbstractMusic> music;
|
||||
|
||||
std::deque<std::atomic<GradedNote>> notes;
|
||||
std::deque<std::atomic<Data::GradedNote>> notes;
|
||||
std::atomic<std::size_t> note_index;
|
||||
// moves note_cursor forward to the first note that has to be conscidered for judging
|
||||
// moves note_index forward to the first note that has to be conscidered for judging
|
||||
// marks every note between the old and the new position as missed
|
||||
void update_note_index(const sf::Time& music_time);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user