Ecran fin + feuille

This commit is contained in:
Crizomb 2025-06-17 18:47:07 +02:00
parent 5a1423d8db
commit 33bda6381d
11 changed files with 53 additions and 9 deletions

View file

@ -8,16 +8,15 @@
class AudioEmitter {
private:
FMOD::System* system{ nullptr };
FMOD::Sound* metronome_Sound{ nullptr };
FMOD::System *system{nullptr};
FMOD::Sound *metronome_Sound{nullptr};
FMOD::Channel *timer{nullptr};
std::vector<FMOD::Sound*> chords;
std::vector<FMOD::Sound*> drums;
std::vector<FMOD::Sound*> notes;
std::vector<FMOD::Sound *> chords;
std::vector<FMOD::Sound *> drums;
std::vector<FMOD::Sound *> notes;
std::vector<std::vector<float>> markov_matrix_chords;
std::vector<std::vector<float>> markov_matrix_melody;
int nbr_melo_max{4};
int nbr_melo_total{ 64 };
int current_beat{0};
std::vector<std::vector<float>> rythmes;
int index_note;
@ -25,7 +24,8 @@ private:
std::vector<FMOD::Channel *> activeChannels;
public:
int tempo{ 170 };
int nbr_melo_total{48};
int tempo{170};
AudioEmitter();
~AudioEmitter();
std::vector<std::pair<float, int>> generateMusic();

View file

@ -3,6 +3,7 @@
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/Texture.hpp>
#ifndef BOOK_GAME_HPP
#define BOOK_GAME_HPP
@ -48,6 +49,8 @@ private:
int score_multiplier = 1; // number of good press without misses
sf::Sprite backGround;
sf::Sprite paper;
sf::Sprite endScreen;
Carrot carrot;
};

View file

@ -13,6 +13,8 @@ static constexpr unsigned int NOTE_PLACE_X_POS[3] = {
SCREEN_WIDTH * 6 / 10, SCREEN_WIDTH * 7 / 10, SCREEN_WIDTH * 8 / 10};
static constexpr unsigned int FLOWER_SIZE = SCREEN_WIDTH * 0.05;
static const sf::Vector2f PAPER_POS =
sf::Vector2f(SCREEN_WIDTH * 0.19, SCREEN_HEIGHT * 0.17);
static const sf::Vector2f CARROT_POS =
sf::Vector2f(SCREEN_WIDTH * 9 / 20, SCREEN_HEIGHT * 0.4);

View file

@ -46,4 +46,5 @@ public:
static const std::vector<std::unique_ptr<NoteTile>> &getExistingTiles() {
return existing_tiles;
};
static bool isFinished() { return existing_tiles.size() == 0; }
};