Add flecs ECS
This commit is contained in:
@@ -5,10 +5,11 @@ project(HansTheGatherer)
|
||||
# Option to switch real platform vs. SDL implementation...
|
||||
|
||||
find_package(SDL3 REQUIRED)
|
||||
find_package(flecs REQUIRED)
|
||||
find_package(spdlog REQUIRED)
|
||||
|
||||
add_executable(HansTheGatherer main.cpp)
|
||||
|
||||
target_link_libraries(HansTheGatherer SDL3::SDL3 spdlog::spdlog)
|
||||
target_link_libraries(HansTheGatherer SDL3::SDL3 flecs::flecs spdlog::spdlog)
|
||||
|
||||
set_property(TARGET HansTheGatherer PROPERTY CXX_STANDARD 20)
|
||||
|
||||
6
main.cpp
6
main.cpp
@@ -1,10 +1,10 @@
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_error.h>
|
||||
#include <SDL3/SDL_render.h>
|
||||
#include <flecs.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
const uint8_t image_data[] =
|
||||
{
|
||||
const uint8_t image_data[] = {
|
||||
#embed "main.cpp"
|
||||
};
|
||||
|
||||
@@ -27,6 +27,8 @@ auto main() -> int {
|
||||
SDL_GetError());
|
||||
}
|
||||
|
||||
flecs::world world;
|
||||
|
||||
bool exit_gameloop = false;
|
||||
while (!exit_gameloop) {
|
||||
SDL_Event event;
|
||||
|
||||
8
vcpkg.json
Normal file
8
vcpkg.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"spdlog",
|
||||
"sdl3",
|
||||
"spdlog",
|
||||
"flecs"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user