parent
f3101feca9
commit
055ba6dfd5
@ -1,44 +1,30 @@ |
||||
#include "guecs/sfml/backend.hpp" |
||||
#include "guecs/sfml/shaders.hpp" |
||||
#include "guecs/sfml/sound.hpp" |
||||
#include "guecs/sfml/textures.hpp" |
||||
#include "guecs/opengl/backend.hpp" |
||||
|
||||
namespace sfml { |
||||
guecs::SpriteTexture Backend::get_sprite(const string& name) { |
||||
auto sp = textures::get(name); |
||||
return {sp.sprite, sp.texture, sp.frame_size}; |
||||
return {}; |
||||
} |
||||
|
||||
guecs::SpriteTexture Backend::get_icon(const string& name) { |
||||
return get_sprite(name); |
||||
return {}; |
||||
} |
||||
|
||||
Backend::Backend() { |
||||
sound::init(); |
||||
shaders::init(); |
||||
textures::init(); |
||||
} |
||||
|
||||
void Backend::sound_play(const string& name) { |
||||
sound::play(name); |
||||
} |
||||
|
||||
void Backend::sound_stop(const string& name) { |
||||
sound::stop(name); |
||||
} |
||||
|
||||
std::shared_ptr<sf::Shader> Backend::get_shader(const std::string& name) { |
||||
return shaders::get(name); |
||||
std::shared_ptr<Shader> Backend::get_shader(const std::string& name) { |
||||
return nullptr; |
||||
} |
||||
|
||||
bool Backend::shader_updated() { |
||||
if(shaders::updated($shaders_version)) { |
||||
$shaders_version = shaders::version(); |
||||
return true; |
||||
} else { |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
guecs::Theme Backend::theme() { |
||||
guecs::Theme theme; |
||||
@ -1,5 +1,5 @@ |
||||
#include "guecs/ui.hpp" |
||||
#include "guecs/sfml/backend.hpp" |
||||
#include "guecs/opengl/backend.hpp" |
||||
#include <cassert> |
||||
#include <iostream> |
||||
#include <fmt/core.h> |
||||
Loading…
Reference in new issue