Now working on the new SFML with better audio.

This commit is contained in:
Zed A. Shaw 2025-04-17 22:29:31 -04:00
parent 2d81f900be
commit c47e688b0b
15 changed files with 189 additions and 169 deletions

View file

@ -35,8 +35,8 @@ enum class Button {
class SoundQuip {
public:
sf::Sound sound;
sf::SoundBuffer buffer;
std::shared_ptr<sf::Sound> sound = nullptr;
std::shared_ptr<sf::SoundBuffer> buffer = nullptr;
bool initialized;
SoundQuip() {};
@ -49,12 +49,12 @@ public:
class SFMLBackend {
sf::ContextSettings settings;
sf::RenderWindow window;
sf::Sprite face_sprite;
sf::Texture face_texture;
sf::Sprite stop_button;
sf::Texture stop_texture;
sf::Sprite start_button;
sf::Texture start_texture;
std::shared_ptr<sf::Sprite> face_sprite = nullptr;
std::shared_ptr<sf::Texture> face_texture = nullptr;
std::shared_ptr<sf::Sprite> stop_button = nullptr;
std::shared_ptr<sf::Texture> stop_texture = nullptr;
std::shared_ptr<sf::Sprite> start_button = nullptr;
std::shared_ptr<sf::Texture> start_texture = nullptr;
std::chrono::time_point<std::chrono::system_clock> clock_start;
Button buttons = Button::STOP;
int hit_points = 50;