Intermediate refactor to move everything over to using the textures module rather than everyone using one TexturePack thing.
This commit is contained in:
parent
6c1d851e85
commit
f3e1413022
23 changed files with 129 additions and 64 deletions
|
@ -5,7 +5,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include "texture.hpp"
|
||||
#include "textures2.hpp"
|
||||
#include <functional>
|
||||
#include "events.hpp"
|
||||
#include "constants.hpp"
|
||||
|
@ -57,8 +57,8 @@ namespace guecs {
|
|||
std::shared_ptr<sf::Sprite> sprite = nullptr;
|
||||
std::shared_ptr<sf::Texture> texture = nullptr;
|
||||
|
||||
void init(lel::Cell &cell, TexturePack &textures) {
|
||||
auto sprite_texture = textures.get(name);
|
||||
void init(lel::Cell &cell) {
|
||||
auto sprite_texture = textures::get(name);
|
||||
texture = sprite_texture.texture;
|
||||
sprite = make_shared<sf::Sprite>(*texture);
|
||||
sprite->setPosition({
|
||||
|
@ -145,7 +145,7 @@ namespace guecs {
|
|||
return $world;
|
||||
}
|
||||
|
||||
void init(TexturePack& textures);
|
||||
void init();
|
||||
void render(sf::RenderWindow& window);
|
||||
void mouse(float x, float y);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue