2022-03-02 23:59:19 +01:00
|
|
|
#pragma once
|
2019-04-06 22:35:17 +02:00
|
|
|
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
#include <imgui-SFML.h>
|
2020-05-22 11:02:47 +02:00
|
|
|
#include <string>
|
|
|
|
|
2021-12-31 14:59:39 +01:00
|
|
|
#include "../ln_marker.hpp"
|
|
|
|
#include "../marker.hpp"
|
|
|
|
#include "../note.hpp"
|
2019-04-06 22:35:17 +02:00
|
|
|
|
|
|
|
class Playfield {
|
|
|
|
public:
|
2022-01-04 01:31:17 +01:00
|
|
|
Playfield(std::filesystem::path assets_folder);
|
2019-04-06 22:35:17 +02:00
|
|
|
sf::Texture base_texture;
|
|
|
|
sf::Sprite button;
|
|
|
|
sf::Sprite button_pressed;
|
|
|
|
sf::Sprite note_selected;
|
|
|
|
sf::Sprite note_collision;
|
|
|
|
|
|
|
|
sf::RenderTexture markerLayer;
|
|
|
|
sf::Sprite markerSprite;
|
|
|
|
|
|
|
|
LNMarker longNoteMarker;
|
|
|
|
sf::RenderTexture longNoteLayer;
|
|
|
|
sf::Sprite LNSquareBackgroud;
|
|
|
|
sf::Sprite LNSquareOutline;
|
|
|
|
sf::Sprite LNSquareHighlight;
|
|
|
|
sf::Sprite LNTail;
|
|
|
|
sf::Sprite LNTriangle;
|
|
|
|
|
|
|
|
void resize(unsigned int width);
|
|
|
|
|
|
|
|
void drawLongNote(
|
|
|
|
const Note& note,
|
|
|
|
const sf::Time& playbackPosition,
|
|
|
|
const float& ticksAtPlaybackPosition,
|
|
|
|
const float& BPM,
|
2021-12-31 14:59:39 +01:00
|
|
|
const int& resolution);
|
2019-04-06 22:35:17 +02:00
|
|
|
|
|
|
|
void drawLongNote(
|
|
|
|
const Note& note,
|
|
|
|
const sf::Time& playbackPosition,
|
|
|
|
const float& ticksAtPlaybackPosition,
|
|
|
|
const float& BPM,
|
|
|
|
const int& resolution,
|
|
|
|
Marker& marker,
|
2021-12-31 14:59:39 +01:00
|
|
|
MarkerEndingState& markerEndingState);
|
2019-04-06 22:35:17 +02:00
|
|
|
|
|
|
|
private:
|
2022-01-04 01:31:17 +01:00
|
|
|
const std::filesystem::path texture_path;
|
2019-04-06 22:35:17 +02:00
|
|
|
};
|