diff --git a/CMakeLists.txt b/CMakeLists.txt index 44051a1..6aeb531 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,10 +24,18 @@ set(BIN "${CMAKE_CURRENT_BINARY_DIR}") add_compile_options(-Wall -Wextra -std=c11 -Og -g -D_GNU_SOURCE) # fxg1a -add_executable(fxg1a fxg1a/dump.c fxg1a/edit.c fxg1a/file.c fxg1a/icon.c - fxg1a/main.c fxg1a/util.c) -target_include_directories(fxg1a PUBLIC fxg1a/) +add_executable(fxg1a fxgxa/dump.c fxgxa/edit.c fxgxa/file.c fxgxa/icon.c + fxgxa/main.c fxgxa/util.c) +target_include_directories(fxg1a PUBLIC fxgxa/) target_link_libraries(fxg1a PkgConfig::libpng) +target_compile_definitions(fxg1a PRIVATE -DFXGXA_FORMAT_G1A) + +# fxg3a +add_executable(fxg3a fxgxa/dump.c fxgxa/edit.c fxgxa/file.c fxgxa/icon.c + fxgxa/main.c fxgxa/util.c) +target_include_directories(fxg3a PUBLIC fxgxa/) +target_link_libraries(fxg3a PkgConfig::libpng) +target_compile_definitions(fxg3a PRIVATE -DFXGXA_FORMAT_G3A) # fxsdk add_custom_command(OUTPUT "${BIN}/fxsdk.sh" @@ -58,6 +66,8 @@ install(DIRECTORY fxsdk/assets DESTINATION share/fxsdk) install(DIRECTORY fxsdk/cmake/ DESTINATION lib/cmake/fxsdk) # fxg1a install(TARGETS fxg1a) +# fxg3a +install(TARGETS fxg3a) # fxconv install(PROGRAMS fxconv/fxconv-main.py TYPE BIN RENAME fxconv) install(FILES fxconv/fxconv.py TYPE BIN) diff --git a/README.md b/README.md index b6ec829..62b6d36 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,12 @@ don't need to worry about it, but here are the main commands: * `fxg1a -r`: Repair control bytes and checksums for broken files * `fxg1a -x`: Extract icon into a PNG file +**G3A file generation** with `fxg3a` + +`fxg3a` is very similar to `fxg1a`, but generates and edits g3a files instead. +These files are used for fx-CG 10/20/50 programs. The main commands are +identical. + **Asset conversion** with `fxconv` `fxconv` is a programmable asset converter that converts images, fonts and diff --git a/fxg1a/dump.c b/fxgxa/dump.c similarity index 100% rename from fxg1a/dump.c rename to fxgxa/dump.c diff --git a/fxg1a/edit.c b/fxgxa/edit.c similarity index 100% rename from fxg1a/edit.c rename to fxgxa/edit.c diff --git a/fxg1a/endianness.h b/fxgxa/endianness.h similarity index 100% rename from fxg1a/endianness.h rename to fxgxa/endianness.h diff --git a/fxg1a/file.c b/fxgxa/file.c similarity index 100% rename from fxg1a/file.c rename to fxgxa/file.c diff --git a/fxg1a/fxg1a.h b/fxgxa/fxg1a.h similarity index 100% rename from fxg1a/fxg1a.h rename to fxgxa/fxg1a.h diff --git a/fxg1a/g1a.h b/fxgxa/g1a.h similarity index 100% rename from fxg1a/g1a.h rename to fxgxa/g1a.h diff --git a/fxg1a/icon.c b/fxgxa/icon.c similarity index 100% rename from fxg1a/icon.c rename to fxgxa/icon.c diff --git a/fxg1a/main.c b/fxgxa/main.c similarity index 100% rename from fxg1a/main.c rename to fxgxa/main.c diff --git a/fxg1a/util.c b/fxgxa/util.c similarity index 100% rename from fxg1a/util.c rename to fxgxa/util.c