Fixed level_format_tests application to use correct include paths.
This commit is contained in:
@@ -87,5 +87,5 @@ add_executable(testgame testgame.cpp)
|
||||
target_link_libraries(testgame PUBLIC Editor2D)
|
||||
|
||||
|
||||
add_executable(libtest libtest.cpp)
|
||||
target_link_libraries(libtest PUBLIC Editor2D)
|
||||
add_executable(level_format_tests level_format_tests.cpp)
|
||||
target_link_libraries(level_format_tests PUBLIC Editor2D)
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
/// Destructor for the Level class.
|
||||
/// Responsible for deallocating all dynamically allocated `Layer` and `Entity` objects
|
||||
/// pointed to by the `layers` and `entities` vectors to prevent memory leaks.
|
||||
~Level();
|
||||
~Level() = default;
|
||||
|
||||
/// Constructs a Level object by loading and parsing a level definition file from the given path.
|
||||
/// This constructor typically reads a JSON file containing the level's metadata, and
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include <Tileset.hpp>
|
||||
#include <Level.hpp>
|
||||
#include <Entity.hpp>
|
||||
#include <Layer.hpp>
|
||||
#include <Data/Tileset.hpp>
|
||||
#include <Data/Level.hpp>
|
||||
#include <Data/Entity.hpp>
|
||||
#include <Data/Layer.hpp>
|
||||
|
||||
void CreateSampleLevel()
|
||||
{
|
||||
@@ -47,13 +47,14 @@ int main()
|
||||
|
||||
Level level = Level(std::filesystem::path("level.json"));
|
||||
|
||||
Layer layer(128, 128, 16, 16);
|
||||
layer.binary_path = "test.lvl";
|
||||
layer.Load();
|
||||
Layer* layer = new Layer();
|
||||
|
||||
layer.Resize(64, 64);
|
||||
layer->binary_path = "test.lvl";
|
||||
layer->Load();
|
||||
|
||||
layer.Save();
|
||||
layer->Resize(64, 64);
|
||||
|
||||
layer->Save();
|
||||
|
||||
level.layers.push_back(layer);
|
||||
|
Reference in New Issue
Block a user