Move everything under the guecs/ directory in src/ so that it meshes better with other projects.

This commit is contained in:
Zed A. Shaw 2025-05-08 11:20:00 -04:00
parent f520f0bade
commit 3bc05ad164
30 changed files with 74 additions and 73 deletions

View file

@ -1,38 +0,0 @@
#include "sfmlbackend/backend.hpp"
#include "sfmlbackend/shaders.hpp"
#include "sfmlbackend/sound.hpp"
#include "sfmlbackend/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;
}
}
}