Refactored out the tilemap since it was mostly doing nothing useful.
This commit is contained in:
parent
ea9f6bf383
commit
3a745d492a
15 changed files with 40 additions and 187 deletions
|
@ -26,7 +26,7 @@ TEST_CASE("test texture management", "[textures]") {
|
|||
LevelManager levels;
|
||||
GameLevel level = levels.current();
|
||||
auto& tiles = level.map->tiles();
|
||||
auto map = textures::convert_char_to_texture(tiles.$tile_ids);
|
||||
REQUIRE(matrix::width(map) == matrix::width(tiles.$tile_ids));
|
||||
REQUIRE(matrix::height(map) == matrix::height(tiles.$tile_ids));
|
||||
auto& walls = level.map->walls();
|
||||
REQUIRE(matrix::width(tiles) == matrix::width(walls));
|
||||
REQUIRE(matrix::height(tiles) == matrix::height(walls));
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include "map.hpp"
|
||||
#include "levelmanager.hpp"
|
||||
#include "tilemap.hpp"
|
||||
#include "config.hpp"
|
||||
#include "rand.hpp"
|
||||
|
||||
using namespace fmt;
|
||||
using std::string;
|
||||
|
||||
TEST_CASE("tilemap can load tiles and make a map", "[tilemap]") {
|
||||
LevelManager levels;
|
||||
GameLevel level = levels.current();
|
||||
auto &map = *level.map;
|
||||
|
||||
TileMap tiles(map.width(), map.height());
|
||||
auto& walls = map.walls();
|
||||
tiles.load(walls);
|
||||
tiles.dump();
|
||||
REQUIRE(tiles.INVARIANT());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue