Entities are now constructable
Added utility function to display error window Added textures Added font Added a way to choose resources location
This commit is contained in:
parent
46d26b6e61
commit
3666b9e7e9
17 changed files with 155 additions and 39 deletions
|
@ -6,7 +6,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
|||
|
||||
add_executable(gTests gTests.cpp gTests.cpp)
|
||||
|
||||
target_include_directories(gTests PRIVATE ${PROJECT_SOURCE_DIR}/../src)
|
||||
|
||||
target_link_libraries(gTests
|
||||
engine
|
||||
gtest
|
||||
pthread)
|
||||
pthread
|
||||
sfml-window
|
||||
sfml-graphics
|
||||
sfml-system
|
||||
pugixml)
|
|
@ -3,6 +3,23 @@
|
|||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <vector>
|
||||
|
||||
#include "Game.h"
|
||||
|
||||
TEST(Setup,LevelSetup)
|
||||
{
|
||||
// TODO : Think about parsing from file ? Currently cumbersome and error-prone
|
||||
std::vector<std::string> textures = {"Head_Boy.png","Head_Significant_Boy.png","Building.png"};
|
||||
std::vector<std::string> levels = {"test_level.xml"};
|
||||
|
||||
Game game(levels,textures);
|
||||
ASSERT_FALSE(game);
|
||||
game.loadLevel(0);
|
||||
ASSERT_TRUE(game);
|
||||
game.runGame();
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue