diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a23fcfd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "raygint"] + path = raygint + url = https://gitea.planet-casio.com/KikooDX/raygint diff --git a/CMakeLists.txt b/CMakeLists.txt index a67905e..3ef9afc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,12 +4,9 @@ cmake_minimum_required(VERSION 3.18) project(CRYSTAL C) -include(GenerateG3A) -include(Fxconv) +set(CMAKE_C_STANDARD 99) -find_package(Gint 2.6.0 REQUIRED) - -include_directories(inc) +include_directories(inc raygint/include) set(SOURCES src/main.c @@ -23,6 +20,7 @@ set(SOURCES src/particles.c src/stars.c src/results.c + raygint/src/display.c ) set(LEVELS @@ -52,18 +50,29 @@ 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 + -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 "" - ICONS res/icon-uns.png res/icon-sel.png -) +if ("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) + find_package(Gint 2.6.0 REQUIRED) + + include(GenerateG3A) + include(Fxconv) + 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 "" + ICONS res/icon-uns.png res/icon-sel.png + ) +else() + add_executable(target ${SOURCES}) + target_compile_options(target PRIVATE ${FLAGS}) + target_compile_options(target PRIVATE ${FLAGS} -DRAYLIB) + target_link_libraries(target raylib) +endif() diff --git a/raygint b/raygint new file mode 160000 index 0000000..0303e68 --- /dev/null +++ b/raygint @@ -0,0 +1 @@ +Subproject commit 0303e689f7c49b2c5dab1a69684719cb08541808