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:
Zed A. Shaw 2025-01-17 11:36:03 -05:00
parent c91e8fc543
commit 4d31a4daf2
9 changed files with 98 additions and 92 deletions

View file

@ -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());