diff --git a/CMakeLists.txt b/CMakeLists.txt index 77de2f9..0414de7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,34 +21,34 @@ set(SOURCES # Shared assets, fx-9860G-only assets and fx-CG-50-only assets set(ASSETS - assets/plague.png - assets/planes.png - assets/bground.png - assets/mutations.png - assets/cursor.png - assets/title.png - assets/dna.png - assets/explosion.png - assets/mutations_table/abilities_1.txt - assets/mutations_table/abilities_2.txt - assets/mutations_table/abilities_3.txt - assets/mutations_table/symptoms_1.txt - assets/mutations_table/symptoms_2.txt - assets/mutations_table/symptoms_3.txt - assets/mutations_table/symptoms_4.txt - assets/mutations_table/transmissions_1.txt - assets/mutations_table/transmissions_2.txt - assets/mutations_table/transmissions_3.txt + ) set(ASSETS_fx - + assets-fx/plague.png + assets-fx/planes.png + assets-fx/bground.png + assets-fx/mutations.png + assets-fx/cursor.png + assets-fx/title.png + assets-fx/dna.png + assets-fx/explosion.png + assets-fx/mutations_table/abilities_1.txt + assets-fx/mutations_table/abilities_2.txt + assets-fx/mutations_table/abilities_3.txt + assets-fx/mutations_table/symptoms_1.txt + assets-fx/mutations_table/symptoms_2.txt + assets-fx/mutations_table/symptoms_3.txt + assets-fx/mutations_table/symptoms_4.txt + assets-fx/mutations_table/transmissions_1.txt + assets-fx/mutations_table/transmissions_2.txt + assets-fx/mutations_table/transmissions_3.txt ) set(ASSETS_cg ) fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA) -fxconv_declare_converters(assets/converters.py) +fxconv_declare_converters(assets-fx/converters.py) add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}}) diff --git a/Plague.g1a b/Plague.g1a index 8e0d7ae..68c420c 100644 Binary files a/Plague.g1a and b/Plague.g1a differ diff --git a/assets-fx/bground.png b/assets-fx/bground.png new file mode 100644 index 0000000..b40d9a0 Binary files /dev/null and b/assets-fx/bground.png differ diff --git a/assets-fx/converters.py b/assets-fx/converters.py new file mode 100644 index 0000000..b31c588 --- /dev/null +++ b/assets-fx/converters.py @@ -0,0 +1,28 @@ +import fxconv + + +def convert(input_name, output, params, target): + if params["custom-type"] == "mutation-table": + convert_mt(input_name, output, params, target) + return 0 + elif params["custom-type"] == "mutation": + convert_md(input_name, output, params, target) + return 0 + else: + return 1 + + +def convert_mt(input_name, output, params, target): + with open(input_name, "r") as file: + # Extract informations + lines = file.read().splitlines() + mutation_matrix = [i.split(" | ") for i in lines] + + # Encode information into bytes + data = bytes() + for i in mutation_matrix: + for j in i: + data += fxconv.u32(int(j)) + + fxconv.elf(data, output, "_" + params["name"], **target) + diff --git a/assets-fx/cursor.png b/assets-fx/cursor.png new file mode 100644 index 0000000..c16cb9b Binary files /dev/null and b/assets-fx/cursor.png differ diff --git a/assets-fx/dna.png b/assets-fx/dna.png new file mode 100644 index 0000000..02cffb0 Binary files /dev/null and b/assets-fx/dna.png differ diff --git a/assets-fx/explosion.png b/assets-fx/explosion.png new file mode 100644 index 0000000..cd70249 Binary files /dev/null and b/assets-fx/explosion.png differ diff --git a/assets-fx/fxconv-metadata.txt b/assets-fx/fxconv-metadata.txt new file mode 100644 index 0000000..f5f6e06 --- /dev/null +++ b/assets-fx/fxconv-metadata.txt @@ -0,0 +1,13 @@ +*.png: + type: bopti-image + name_regex: (.*)\.png img_\1 + +plague.png: + type: font + name: font_plague + charset: print + grid.size: 5x5 + grid.padding: 1 + proportional: True + + diff --git a/assets-fx/mutations.png b/assets-fx/mutations.png new file mode 100644 index 0000000..8ebacb6 Binary files /dev/null and b/assets-fx/mutations.png differ diff --git a/assets-fx/mutations_table/abilities_1.txt b/assets-fx/mutations_table/abilities_1.txt new file mode 100644 index 0000000..12c4604 --- /dev/null +++ b/assets-fx/mutations_table/abilities_1.txt @@ -0,0 +1,4 @@ + 1 | 0 | 0 | 0 | 15 | 0 | 0 | 0 +15 | 15 | 0 | 15 | 0 | 0 | 0 | 0 + 0 | 0 | 0 | 0 | 15 | 0 | 0 | 0 + 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/abilities_2.txt b/assets-fx/mutations_table/abilities_2.txt new file mode 100644 index 0000000..4d9f223 --- /dev/null +++ b/assets-fx/mutations_table/abilities_2.txt @@ -0,0 +1,4 @@ +1 | 0 | 0 | 0 | 15 | 0 | 0 | 0 +2 | 15 | 0 | 3 | 0 | 0 | 0 | 0 +0 | 0 | 0 | 0 | 15 | 0 | 0 | 0 +0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/abilities_3.txt b/assets-fx/mutations_table/abilities_3.txt new file mode 100644 index 0000000..91de132 --- /dev/null +++ b/assets-fx/mutations_table/abilities_3.txt @@ -0,0 +1,4 @@ +1 | 0 | 0 | 0 | 6 | 0 | 0 | 0 +2 | 5 | 0 | 3 | 0 | 0 | 0 | 0 +0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 +0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/fxconv-metadata.txt b/assets-fx/mutations_table/fxconv-metadata.txt new file mode 100644 index 0000000..2cc3c63 --- /dev/null +++ b/assets-fx/mutations_table/fxconv-metadata.txt @@ -0,0 +1,3 @@ +*.txt: + custom-type: mutation-table + name_regex: (.*)\.txt mt_\1 \ No newline at end of file diff --git a/assets-fx/mutations_table/symptoms_1.txt b/assets-fx/mutations_table/symptoms_1.txt new file mode 100644 index 0000000..b906523 --- /dev/null +++ b/assets-fx/mutations_table/symptoms_1.txt @@ -0,0 +1,4 @@ +1 | 15 | 15 | 15 | 3 | 0 | 0 | 0 +0 | 0 | 15 | 15 | 0 | 0 | 0 | 0 +0 | 0 | 15 | 0 | 15 | 0 | 0 | 0 +0 | 10 | 15 | 6 | 15 | 15 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/symptoms_2.txt b/assets-fx/mutations_table/symptoms_2.txt new file mode 100644 index 0000000..09b0da5 --- /dev/null +++ b/assets-fx/mutations_table/symptoms_2.txt @@ -0,0 +1,4 @@ +1 | 2 | 15 | 4 | 3 | 0 | 0 | 0 +0 | 0 | 15 | 15 | 0 | 0 | 0 | 0 +0 | 0 | 15 | 0 | 15 | 0 | 0 | 0 +0 | 10 | 7 | 6 | 9 | 15 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/symptoms_3.txt b/assets-fx/mutations_table/symptoms_3.txt new file mode 100644 index 0000000..764f1bc --- /dev/null +++ b/assets-fx/mutations_table/symptoms_3.txt @@ -0,0 +1,4 @@ +1 | 2 | 5 | 4 | 3 | 0 | 0 | 0 +0 | 0 | 15 | 15 | 0 | 0 | 0 | 0 +0 | 0 | 8 | 0 | 15 | 0 | 0 | 0 +0 | 10 | 7 | 6 | 9 | 11 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/symptoms_4.txt b/assets-fx/mutations_table/symptoms_4.txt new file mode 100644 index 0000000..b7a0a65 --- /dev/null +++ b/assets-fx/mutations_table/symptoms_4.txt @@ -0,0 +1,4 @@ +1 | 2 | 5 | 4 | 3 | 0 | 0 | 0 +0 | 0 | 14 | 13 | 0 | 0 | 0 | 0 +0 | 0 | 8 | 0 | 12 | 0 | 0 | 0 +0 | 10 | 7 | 6 | 9 | 11 | 0 | 0 \ No newline at end of file diff --git a/assets-fx/mutations_table/transmissions_1.txt b/assets-fx/mutations_table/transmissions_1.txt new file mode 100644 index 0000000..2e0695b --- /dev/null +++ b/assets-fx/mutations_table/transmissions_1.txt @@ -0,0 +1,4 @@ +1 | 15 | 15 | 0 | 15 | 5 | 0 | 0 +0 | 0 | 0 | 15 | 0 | 0 | 0 | 11 +9 | 15 | 0 | 0 | 0 | 0 | 0 | 15 +0 | 0 | 0 | 7 | 15 | 0 | 0 | 15 \ No newline at end of file diff --git a/assets-fx/mutations_table/transmissions_2.txt b/assets-fx/mutations_table/transmissions_2.txt new file mode 100644 index 0000000..e23f587 --- /dev/null +++ b/assets-fx/mutations_table/transmissions_2.txt @@ -0,0 +1,4 @@ +1 | 2 | 15 | 0 | 15 | 5 | 0 | 0 +0 | 0 | 0 | 15 | 0 | 0 | 0 | 11 +9 | 10 | 0 | 0 | 0 | 0 | 0 | 12 +0 | 0 | 0 | 7 | 8 | 0 | 0 | 15 \ No newline at end of file diff --git a/assets-fx/mutations_table/transmissions_3.txt b/assets-fx/mutations_table/transmissions_3.txt new file mode 100644 index 0000000..eee8275 --- /dev/null +++ b/assets-fx/mutations_table/transmissions_3.txt @@ -0,0 +1,4 @@ +1 | 2 | 3 | 0 | 6 | 5 | 0 | 0 +0 | 0 | 0 | 4 | 0 | 0 | 0 | 11 +9 | 10 | 0 | 0 | 0 | 0 | 0 | 12 +0 | 0 | 0 | 7 | 8 | 0 | 0 | 13 \ No newline at end of file diff --git a/assets-fx/plague.png b/assets-fx/plague.png new file mode 100644 index 0000000..2c3b91d Binary files /dev/null and b/assets-fx/plague.png differ diff --git a/assets-fx/planes.png b/assets-fx/planes.png new file mode 100644 index 0000000..5995dc0 Binary files /dev/null and b/assets-fx/planes.png differ diff --git a/assets-fx/title.png b/assets-fx/title.png new file mode 100644 index 0000000..dcc8c29 Binary files /dev/null and b/assets-fx/title.png differ diff --git a/src/main.c b/src/main.c index 71809ff..2a3a8df 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /* Project name ......: Plague - Version ...........: 1.3.8 + Version ...........: 1.3.9 Last modification .: 8 June 2021 code and assets provided with licence : @@ -20,7 +20,7 @@ #include "mutation_engine.h" #include "save.h" -const char *VERSION = "1.3.8"; +const char *VERSION = "1.3.9"; // title_screen : display the title screen static void title_screen(void);