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
17
tests/textures.cpp
Normal file
17
tests/textures.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include <string>
|
||||
#include "textures2.hpp"
|
||||
|
||||
using namespace fmt;
|
||||
|
||||
TEST_CASE("test texture management", "[textures]") {
|
||||
|
||||
textures::init();
|
||||
auto spider = textures::get("hairy_spider");
|
||||
|
||||
auto image = textures::load_image("assets/hairy_spider-256.png");
|
||||
|
||||
auto img_ptr = textures::get_surface(0);
|
||||
REQUIRE(img_ptr != nullptr);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue