base gint project

This commit is contained in:
KikooDX 2021-11-09 22:28:28 +01:00
commit 7636abbeb8
8 changed files with 76 additions and 0 deletions

9
.clang-format Normal file
View File

@ -0,0 +1,9 @@
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: AlignWithSpaces
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 80
AlignConsecutiveMacros: true
AlwaysBreakAfterReturnType: TopLevelDefinitions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
build-cg/
build-fx/
*.g3a
*.g1a
*.png~

43
CMakeLists.txt Normal file
View File

@ -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
)

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
all:
fxsdk build-cg
clean:
rm -rf build-cg/
rm -f *.g3a
.PHONY: clean

5
jle.ini Normal file
View File

@ -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

BIN
res/icon-sel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
res/icon-uns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

6
src/main.c Normal file
View File

@ -0,0 +1,6 @@
#include <gint/keyboard.h>
int main(void) {
getkey();
return 1;
}