mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2024-11-15 11:33:24 +01:00
28 lines
848 B
C++
28 lines
848 B
C++
//
|
|
// Created by Syméon on 28/03/2019.
|
|
//
|
|
|
|
#include "ChartWithHistory.h"
|
|
|
|
Chart_with_History::Chart_with_History(Chart &c) : ref(c) {
|
|
history.push(std::make_shared<OpenChart>(c));
|
|
}
|
|
|
|
std::optional<Note> Chart_with_History::makeLongNoteDummy(int current_tick) const {
|
|
if (creatingLongNote and longNoteBeingCreated) {
|
|
Note long_note = Note(longNoteBeingCreated->first, longNoteBeingCreated->second);
|
|
Note dummy_long_note = Note(long_note.getPos(), current_tick, ref.getResolution(), long_note.getTail_pos());
|
|
return dummy_long_note;
|
|
} else {
|
|
return {};
|
|
}
|
|
}
|
|
|
|
std::optional<Note> Chart_with_History::makeCurrentLongNote() const {
|
|
if (creatingLongNote and longNoteBeingCreated) {
|
|
return Note(longNoteBeingCreated->first, longNoteBeingCreated->second);
|
|
} else {
|
|
return {};
|
|
}
|
|
}
|