diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8265f76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build/ +.cache/ +.git/ +.compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 7520cdd..7b7d4a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,5 +10,13 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Add both projects -# add_subdirectory(craft) -# add_subdirectory(NotZelda) +add_subdirectory(external/craft) + +add_executable(PongCraft + include/Pong.h + src/Pong.cpp +) + +target_include_directories(PongCraft PRIVATE include) + +target_link_libraries(PongCraft PUBLIC CraftEngine) diff --git a/compile_commands.json b/compile_commands.json new file mode 120000 index 0000000..25eb4b2 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1 @@ +build/compile_commands.json \ No newline at end of file diff --git a/external/craft b/external/craft index 301e862..d71f3bf 160000 --- a/external/craft +++ b/external/craft @@ -1 +1 @@ -Subproject commit 301e8624389edb2609664c9a053841968b3d6450 +Subproject commit d71f3bfab71baa9c86c100b63c6e798dbd69d5c9 diff --git a/include/Pong.h b/include/Pong.h new file mode 100644 index 0000000..de2f3d8 --- /dev/null +++ b/include/Pong.h @@ -0,0 +1,7 @@ +#pragma once +#include + +class PongWorld : public craft::World { + void Begin() override; + void Tick(float deltaTime) override; +}; diff --git a/src/Pong.cpp b/src/Pong.cpp new file mode 100644 index 0000000..e3c2d31 --- /dev/null +++ b/src/Pong.cpp @@ -0,0 +1,10 @@ +#include "Pong.h" + +CRAFT_INITIALIZE(PongWorld); + +void PongWorld::Begin() { + World::Begin(); + LOG("The PongWorld has BEGUN!"); +} + +void PongWorld::Tick(float deltaTime) { World::Tick(deltaTime); }