2019-04-06 22:35:17 +02:00
|
|
|
#ifndef FEIS_PLAYFIELD_H
|
|
|
|
#define FEIS_PLAYFIELD_H
|
|
|
|
|
|
|
|
#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:
|
|
|
|
Playfield();
|
|
|
|
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:
|
2021-12-31 14:59:39 +01:00
|
|
|
const std::string texture_path =
|
|
|
|
"assets/textures/edit_textures/game_front_edit_tex_1.tex.png";
|
2019-04-06 22:35:17 +02:00
|
|
|
};
|
|
|
|
|
2021-12-31 14:59:39 +01:00
|
|
|
#endif // FEIS_PLAYFIELD_H
|