Tried out 512px tiles and sprites and they actually look like crap. They just look like bad textures not better painted. With 256 they look nicely pixelated.
This commit is contained in:
parent
d397c02d38
commit
5e6f95513c
42 changed files with 41 additions and 44 deletions
14
texture.hpp
14
texture.hpp
|
@ -17,21 +17,17 @@ struct Sprite {
|
|||
int vDiv=1;
|
||||
};
|
||||
|
||||
using Image = std::vector<uint32_t>;
|
||||
|
||||
struct TexturePack {
|
||||
int NUM_SPRITES=1;
|
||||
constexpr static const int TEXTURE_WIDTH=256; // must be power of two
|
||||
constexpr static const int TEXTURE_HEIGHT=256; // must be power of two
|
||||
|
||||
std::vector<Image> images;
|
||||
std::vector<sf::Image> images;
|
||||
std::vector<Sprite> sprites;
|
||||
Image floor;
|
||||
Image ceiling;
|
||||
sf::Image floor;
|
||||
sf::Image ceiling;
|
||||
Sprite sword;
|
||||
|
||||
void load_textures();
|
||||
std::vector<uint32_t> load_image(std::string filename);
|
||||
sf::Image load_image(std::string filename);
|
||||
Sprite& get_sprite(size_t sprite_num);
|
||||
Image& get_texture(size_t num);
|
||||
const uint32_t* get_texture(size_t num);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue