You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
831 B
39 lines
831 B
2 weeks ago
|
#include "textures2.hpp"
|
||
|
|
||
|
namespace textures {
|
||
|
static TextureManager textures;
|
||
|
static bool initialized = false;
|
||
|
|
||
|
void init() {
|
||
|
if(!initialized) {
|
||
|
textures.load_tiles();
|
||
|
textures.load_sprites();
|
||
|
initialized = true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
SpriteTexture get(std::string name) {
|
||
|
return textures.get(name);
|
||
|
}
|
||
|
|
||
|
sf::Image load_image(std::string filename) {
|
||
|
return textures.load_image(filename);
|
||
|
}
|
||
|
|
||
|
const uint32_t* get_surface(size_t num) {
|
||
|
return textures.get_surface(num);
|
||
|
}
|
||
|
|
||
|
matrix::Matrix convert_char_to_texture(matrix::Matrix &from) {
|
||
|
return textures.convert_char_to_texture(from);
|
||
|
}
|
||
|
|
||
|
const uint32_t* get_floor() {
|
||
|
return (const uint32_t *)textures.floor.getPixelsPtr();
|
||
|
}
|
||
|
|
||
|
const uint32_t* get_ceiling() {
|
||
|
return (const uint32_t *)textures.ceiling.getPixelsPtr();
|
||
|
}
|
||
|
};
|