commit bd1f72aac607d54f5414c0d7510ddf16d20d6c14 Author: KikooDX Date: Wed May 26 13:32:32 2021 +0200 Kimeera base diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..41565cf --- /dev/null +++ b/.clang-format @@ -0,0 +1,10 @@ +# https://clang.llvm.org/docs/ClangFormat.html +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..98a1d5c --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Build files +/build-fx +/build-cg +/*.g1a +/*.g3a + +# Python bytecode + __pycache__/ + +# Common IDE files +*.sublime-project +*.sublime-workspace +.vscode +*.swp + +# Krita backup files +*.png~ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..aa2531d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,58 @@ +# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the +# toolchain file and module path of the fxSDK + +cmake_minimum_required(VERSION 3.18) +# replace this with your project's name +project(Kimeera C) + +include(GenerateG1A) +include(GenerateG3A) +include(Fxconv) +find_package(Gint 2.5 REQUIRED) + +include_directories(include) + +set(SOURCES + src/main.c +) + +set(ASSETS +) + +set(ASSETS_fx +) + +set(ASSETS_cg +) + +# Compile flags +set(FLAGS + -std=c11 + -Wall -Wextra -pedantic + -Wshadow + -Wswitch-default -Wswitch-enum + -Wunreachable-code + -Wstrict-prototypes -Wmissing-prototypes + -Werror-implicit-function-declaration + -Os +) + +fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA) + +add_executable(Main ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) +target_compile_options(Main PRIVATE ${FLAGS}) +target_link_libraries(Main Gint::Gint) + +if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G) + generate_g1a( + TARGET Main + OUTPUT "${PROJECT_NAME}.g1a" + NAME "${PROJECT_NAME}" + ICON assets-fx/icon.png) +elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) + generate_g3a( + TARGET Main + OUTPUT "${PROJECT_NAME}.g3a" + NAME "${PROJECT_NAME}" + ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png) +endif() diff --git a/assets-cg/icon-sel.png b/assets-cg/icon-sel.png new file mode 100644 index 0000000..7137b50 Binary files /dev/null and b/assets-cg/icon-sel.png differ diff --git a/assets-cg/icon-uns.png b/assets-cg/icon-uns.png new file mode 100644 index 0000000..3c99f62 Binary files /dev/null and b/assets-cg/icon-uns.png differ diff --git a/assets-fx/icon.png b/assets-fx/icon.png new file mode 100644 index 0000000..c92f12a Binary files /dev/null and b/assets-fx/icon.png differ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..ece1f4d --- /dev/null +++ b/src/main.c @@ -0,0 +1,15 @@ +#include +#include + +int +main(void) +{ + /* init */ + disp_init(); + + dclear(C_WHITE); + dupdate(); + + getkey(); + return 1; +}