Amit's code mostly converted to use the new texture.hpp but there's an error on line amt/pixel.hpp:472
This commit is contained in:
parent
c91e8fc543
commit
4d31a4daf2
9 changed files with 98 additions and 92 deletions
|
@ -4,13 +4,11 @@
|
|||
#include <fmt/core.h>
|
||||
#include "config.hpp"
|
||||
|
||||
using namespace fmt;
|
||||
|
||||
Image TexturePack::load_image(std::string filename) {
|
||||
Image texture(TEXTURE_WIDTH * TEXTURE_HEIGHT);
|
||||
sf::Image img;
|
||||
bool good = img.loadFromFile(filename);
|
||||
dbc::check(good, format("failed to load {}", filename));
|
||||
dbc::check(good, fmt::format("failed to load {}", filename));
|
||||
|
||||
uint32_t *pixbuf = (uint32_t *)img.getPixelsPtr();
|
||||
std::copy_n(pixbuf, texture.size(), texture.begin());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue