commit 7636abbeb803359afd3bc66f8ab1065cb02532d8 Author: KikooDX Date: Tue Nov 9 22:28:28 2021 +0100 base gint project diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..57fd90a --- /dev/null +++ b/.clang-format @@ -0,0 +1,9 @@ +BasedOnStyle: LLVM +IndentWidth: 8 +UseTab: AlignWithSpaces +BreakBeforeBraces: Linux +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +ColumnLimit: 80 +AlignConsecutiveMacros: true +AlwaysBreakAfterReturnType: TopLevelDefinitions diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e02d23 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +build-cg/ +build-fx/ +*.g3a +*.g1a +*.png~ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cacd31c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +# Configure with [fxsdk build-cg], which provide the +# toolchain file and module path of the fxSDK + +cmake_minimum_required(VERSION 3.18) +project(CRYSTAL C) + +include(GenerateG3A) +include(Fxconv) + +find_package(Gint 2.6.0 REQUIRED) + +include_directories(include) + +set(SOURCES + src/main.c +) + +set(LEVELS +) + +set(ASSETS + ${LEVELS} +) + +set(FLAGS + -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum + -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes + -Wold-style-definition -Werror-implicit-function-declaration + -std=c11 -O3 +) + +fxconv_declare_assets(${ASSETS} WITH_METADATA) + +add_executable(target ${SOURCES} ${ASSETS}) +target_compile_options(target PRIVATE ${FLAGS}) +target_link_libraries(target Gint::Gint) +target_link_options(target PRIVATE -Wl,-Map=map) + +generate_g3a(TARGET target + OUTPUT "${PROJECT_NAME}.g3a" + NAME "${PROJECT_NAME}" + ICONS res/icon-uns.png res/icon-sel.png +) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..37262b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +all: + fxsdk build-cg + +clean: + rm -rf build-cg/ + rm -f *.g3a + +.PHONY: clean diff --git a/jle.ini b/jle.ini new file mode 100644 index 0000000..b6c2cd2 --- /dev/null +++ b/jle.ini @@ -0,0 +1,5 @@ +# https://git.sr.ht/~kikoodx/jle +tileset = assets/graphics/tileset.png +tile_size = 16 +new_level_width = 25 +new_level_height = 14 diff --git a/res/icon-sel.png b/res/icon-sel.png new file mode 100644 index 0000000..b2608ca Binary files /dev/null and b/res/icon-sel.png differ diff --git a/res/icon-uns.png b/res/icon-uns.png new file mode 100644 index 0000000..02ab25a Binary files /dev/null and b/res/icon-uns.png differ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..e79e87f --- /dev/null +++ b/src/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + getkey(); + return 1; +}