first
This commit is contained in:
commit
03fac3e692
5 changed files with 180 additions and 0 deletions
115
.gitignore
vendored
Normal file
115
.gitignore
vendored
Normal file
|
|
@ -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
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "lib/arc"]
|
||||||
|
path = lib/arc
|
||||||
|
url = https://forgejo.herbglitch.cloud/herbglitch/archeus.git
|
||||||
33
CMakeLists.txt
Normal file
33
CMakeLists.txt
Normal file
|
|
@ -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"
|
||||||
|
"$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
|
||||||
|
"$<$<CONFIG:RELEASE>:-Wextra>"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(lib/arc)
|
||||||
|
|
||||||
|
add_executable(lithops
|
||||||
|
src/main.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(lithops PRIVATE
|
||||||
|
$<$<CONFIG:Debug>:ARC_DEBUG>
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(lithops
|
||||||
|
PRIVATE /src
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(lithops PUBLIC archeus)
|
||||||
|
|
||||||
1
lib/arc
Submodule
1
lib/arc
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5fba766695bcc36224988cf88ab1207ac3585f27
|
||||||
28
src/main.c
Normal file
28
src/main.c
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#include <archeus.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue