[BROKEN] This build is totally broken. DONOT USE.
This commit is contained in:
parent
8dc70ad1ed
commit
f3f2e90cd2
15 changed files with 123 additions and 81 deletions
38
src/sfml/backend.cpp
Normal file
38
src/sfml/backend.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include "sfml/backend.hpp"
|
||||
#include "sfml/shaders.hpp"
|
||||
#include "sfml/sound.hpp"
|
||||
#include "sfml/textures.hpp"
|
||||
|
||||
namespace sfml {
|
||||
guecs::SpriteTexture Backend::texture_get(const string& name) {
|
||||
auto sp = textures::get(name);
|
||||
return {sp.sprite, sp.texture};
|
||||
}
|
||||
|
||||
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::shader_get(const std::string& name) {
|
||||
return shaders::get(name);
|
||||
}
|
||||
|
||||
bool Backend::shader_updated() {
|
||||
if(shaders::updated($shaders_version)) {
|
||||
$shaders_version = shaders::version();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue