First commit that disconnects this game from the game framework so it can be its own thing.
This commit is contained in:
parent
8073997eb3
commit
db60f75bd9
29 changed files with 37 additions and 36 deletions
|
|
@ -10,12 +10,12 @@ using namespace components;
|
|||
TEST_CASE("test the loot ui", "[loot]") {
|
||||
auto items = settings::get("assets/items.json");
|
||||
DinkyECS::World world;
|
||||
auto torch = world.entity();
|
||||
auto& data = items["TORCH_BAD"];
|
||||
auto repair_kit = world.entity();
|
||||
auto& data = items["REPAIR_KIT"];
|
||||
|
||||
components::init();
|
||||
components::configure_entity(world, torch, data["components"]);
|
||||
components::configure_entity(world, repair_kit, data["components"]);
|
||||
|
||||
auto& torch_sprite = world.get<Sprite>(torch);
|
||||
REQUIRE(torch_sprite.name == "torch_horizontal_floor");
|
||||
auto& repair_kit_sprite = world.get<Sprite>(repair_kit);
|
||||
REQUIRE(repair_kit_sprite.name == "repair_kit");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "algos/maze.hpp"
|
||||
#include "algos/stats.hpp"
|
||||
|
||||
#define DUMP 1
|
||||
#define DUMP 0
|
||||
|
||||
using std::string;
|
||||
using matrix::Matrix;
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ TEST_CASE("test texture management", "[textures]") {
|
|||
components::init();
|
||||
textures::init();
|
||||
|
||||
auto spider = textures::get_sprite("rat_with_sword");
|
||||
auto spider = textures::get_sprite("spider_bot");
|
||||
REQUIRE(spider.sprite != nullptr);
|
||||
REQUIRE(spider.texture != nullptr);
|
||||
REQUIRE(spider.frame_size.x == TEXTURE_WIDTH);
|
||||
REQUIRE(spider.frame_size.y == TEXTURE_HEIGHT);
|
||||
|
||||
auto image = textures::load_image("assets/sprites/rat_with_sword.png");
|
||||
auto image = textures::load_image("assets/sprites/spider_bot.png");
|
||||
|
||||
size_t floor_tile = textures::get_id("floor_tile");
|
||||
size_t gray_stone = textures::get_id("door_plain");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue