From 03fac3e692f011421df381d6c149dbebd578b150 Mon Sep 17 00:00:00 2001 From: herbglitch Date: Fri, 25 Jul 2025 03:51:16 -0600 Subject: [PATCH] first --- .gitignore | 115 +++++++++++++++++++++++++++++++++++++++++++++++++ .gitmodules | 3 ++ CMakeLists.txt | 33 ++++++++++++++ lib/arc | 1 + src/main.c | 28 ++++++++++++ 5 files changed, 180 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 CMakeLists.txt create mode 160000 lib/arc create mode 100644 src/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10d2dec --- /dev/null +++ b/.gitignore @@ -0,0 +1,115 @@ +# Created by https://www.toptal.com/developers/gitignore/api/c,c++,visualstudiocode,cmake +# Edit at https://www.toptal.com/developers/gitignore?templates=c,c++,visualstudiocode,cmake + +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +### C++ ### +# Prerequisites + +# Compiled Object files +*.slo + +# Precompiled Headers + +# Compiled Dynamic libraries + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai + +# Executables + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ + +### VisualStudioCode ### +.vscode/ + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/c,c++,visualstudiocode,cmake +[Bb][Uu][Ii][Ll][Dd] +.ccls +.cache +.clangd.nvim + +ani-cli +temp \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c620a62 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/arc"] + path = lib/arc + url = https://forgejo.herbglitch.cloud/herbglitch/archeus.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6b5d561 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.14.0) + +project(lithops LANGUAGES C VERSION 0.0.1) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(ARCHEUS_WINDOW_BACKEND "SDL3" CACHE STRING "use sdl3 window") +set(ARCHEUS_INPUT_BACKEND "SDL3" CACHE STRING "use sdl3 input") +set(ARCHEUS_GRAPHICS_BACKEND "SDL3" CACHE STRING "use sdl3 input") + +#TODO: add "-Wpedantic" +add_compile_options( + "-Wall" "-Werror" "-fexceptions" + "$<$:-O0;-g3;-ggdb>" + "$<$:-Wextra>" +) + +add_subdirectory(lib/arc) + +add_executable(lithops + src/main.c +) + +target_compile_definitions(lithops PRIVATE + $<$:ARC_DEBUG> +) + +target_include_directories(lithops + PRIVATE /src +) + +target_link_libraries(lithops PUBLIC archeus) + diff --git a/lib/arc b/lib/arc new file mode 160000 index 0000000..5fba766 --- /dev/null +++ b/lib/arc @@ -0,0 +1 @@ +Subproject commit 5fba766695bcc36224988cf88ab1207ac3585f27 diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..9074eb6 --- /dev/null +++ b/src/main.c @@ -0,0 +1,28 @@ +#include + +void TEMP_State_UpdateFn(void *data){ +} + +void TEMP_State_RenderFn(void *data){ +} + +int main(){ + ARC_Point windowSize = { 1920, 1080 }; + ARC_EngineData *data; + ARC_EngineData_Create(&data, windowSize); + + ARC_State *state = (ARC_State *)malloc(sizeof(ARC_State)); + *state = (ARC_State){ + TEMP_State_UpdateFn, + TEMP_State_RenderFn, + data, + NULL + }; + + ARC_Handler_Add(data->state, state); + + ARC_Engine_RunUncapped(data); + + ARC_EngineData_Destroy(data); +} +