diff --git a/assets-cg/INFO_Icon.png b/assets-cg/INFO_Icon.png index b73498a..ce5e500 100644 Binary files a/assets-cg/INFO_Icon.png and b/assets-cg/INFO_Icon.png differ diff --git a/assets-cg/NPC_Icon.png b/assets-cg/NPC_Icon.png index 06dd169..e9cc819 100644 Binary files a/assets-cg/NPC_Icon.png and b/assets-cg/NPC_Icon.png differ diff --git a/assets-cg/NPC_Icon_2.png b/assets-cg/NPC_Icon_2.png index e347bc7..6f0245a 100644 Binary files a/assets-cg/NPC_Icon_2.png and b/assets-cg/NPC_Icon_2.png differ diff --git a/assets-cg/SGN_Icon.png b/assets-cg/SGN_Icon.png index 567996c..d68b589 100644 Binary files a/assets-cg/SGN_Icon.png and b/assets-cg/SGN_Icon.png differ diff --git a/assets-cg/SignAction.png b/assets-cg/SignAction.png index 016e600..82260bb 100644 Binary files a/assets-cg/SignAction.png and b/assets-cg/SignAction.png differ diff --git a/assets-cg/demo_player.png b/assets-cg/demo_player.png index 376ade9..04c4d34 100644 Binary files a/assets-cg/demo_player.png and b/assets-cg/demo_player.png differ diff --git a/assets-cg/font.png b/assets-cg/font.png index d1dd75a..197bf42 100644 Binary files a/assets-cg/font.png and b/assets-cg/font.png differ diff --git a/assets-cg/fxconv-metadata.txt b/assets-cg/fxconv-metadata.txt index 0380e21..87de14b 100644 --- a/assets-cg/fxconv-metadata.txt +++ b/assets-cg/fxconv-metadata.txt @@ -1,44 +1,18 @@ -demo_player.png: - type: bopti-image - name: demo_player_img +*.png: + custom-type: custom-image + name_regex: (.*)\.png \1_img profile: p8 + scale: 2 -demo_PNJ.png: - type: bopti-image - name: demo_PNJ_img - profile: p8 - -player_face.png: - type: bopti-image - name: player_face_img - profile: p8 - -SignAction.png: - type: bopti-image - name: SignAction_img - profile: p8 - -INFO_Icon.png: - type: bopti-image - name: INFO_Icon_img - profile: p8 - -NPC_Icon.png: - type: bopti-image - name: NPC_Icon_img - profile: p8 - -SGN_Icon.png: - type: bopti-image - name: SGN_Icon_img - profile: p8 +demo_PNG.png: + scale: 1 font.png: name: fontRPG - type: font + custom-type: font charset: print grid.size: 10x10 grid.padding: 2 grid.border: 0 proportional: true - height: 10 \ No newline at end of file + height: 10 diff --git a/assets-cg/player_face.png b/assets-cg/player_face.png index a749649..f564e32 100644 Binary files a/assets-cg/player_face.png and b/assets-cg/player_face.png differ diff --git a/assets-fx/font.png b/assets-fx/font.png index 285cf81..83f3ad7 100644 Binary files a/assets-fx/font.png and b/assets-fx/font.png differ diff --git a/assets/converters.py b/assets/converters.py index e12b782..9fdb6be 100644 --- a/assets/converters.py +++ b/assets/converters.py @@ -1,4 +1,5 @@ from random import randint +from PIL import Image import fxconv import json import pathlib @@ -13,6 +14,12 @@ def convert(input, output, params, target): elif params["custom-type"] == "world": convert_world(input, output, params, target) return 0 + elif params["custom-type"] == "custom-image": + convert_custom_image(input, output, params, target) + return 0 + elif params["custom-type"] == "font": + convert_font(input, output, params, target) + return 0 else: return 1 @@ -307,3 +314,18 @@ def get_extra_map_data(input, output, params, target, xmin, ymin, xmax, ymax): break return nbExtraData, structData + +def convert_custom_image(input, output, params, target): + scale = int(params.get("scale", 1)) + + # Upscale image before converting + im = Image.open(input) + im = im.resize((im.width * scale, im.height * scale), + resample=Image.NEAREST) + + o = fxconv.convert_image_cg(im, params) + fxconv.elf(o, output, "_" + params["name"], **target) + +def convert_font(input, output, params, target): + o = fxconv.convert_topti(input, params) + fxconv.elf(o, output, "_" + params["name"], **target)