diff --git a/.gitignore b/.gitignore index 0b997e9a28..dd95dccf9b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /subprojects/constgen/ /subprojects/SDATTool/ /subprojects/knarc/ +/subprojects/narc/ # CLion folders .idea/ diff --git a/res/battle/moves/meson.build b/res/battle/moves/meson.build index ad9a250ca3..d3afe83a5e 100644 --- a/res/battle/moves/meson.build +++ b/res/battle/moves/meson.build @@ -484,11 +484,11 @@ pl_waza_tbl_narc = custom_target('pl_waza_tbl.narc', depends: [ py_consts_generators ], command: [ movedata_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', ] ) -nitrofs_files += pl_waza_tbl_narc \ No newline at end of file +nitrofs_files += pl_waza_tbl_narc diff --git a/res/battle/scripts/meson.build b/res/battle/scripts/meson.build index db56f3379a..9e6d9ae984 100644 --- a/res/battle/scripts/meson.build +++ b/res/battle/scripts/meson.build @@ -22,9 +22,9 @@ be_seq_narc = custom_target(be_seq_target_name, extra_args: ['--out-dir', be_seq_private_dir] ), command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT@' + narc_exe, 'create', + '--output', '@OUTPUT@', + '@PRIVATE_DIR@', ] ) @@ -38,11 +38,11 @@ sub_seq_narc = custom_target(sub_seq_narc_name, extra_args: ['--out-dir', sub_seq_private_dir] ), command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '-o', sub_seq_narc_order, - '-n' + narc_exe, 'create', + '--naix', + '--order', sub_seq_narc_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) @@ -53,9 +53,9 @@ waza_seq_narc = custom_target(waza_seq_target_name, extra_args: ['--out-dir', waza_seq_private_dir] ), command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT@' + narc_exe, 'create', + '--output', '@OUTPUT@', + '@PRIVATE_DIR@', ] ) diff --git a/res/field/encounters/meson.build b/res/field/encounters/meson.build index a744b3fcaa..a0479d2471 100644 --- a/res/field/encounters/meson.build +++ b/res/field/encounters/meson.build @@ -200,10 +200,10 @@ pl_enc_tbl_narc = custom_target('pl_enc_data.narc', ], depends: [ py_consts_generators ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT@', - '-o', pl_enc_data_order, + narc_exe, 'create', + '--order', pl_enc_data_order, + '--output', '@OUTPUT@', + '@PRIVATE_DIR@', ] ) @@ -258,10 +258,10 @@ encdata_ex_narc = custom_target('encdata_ex.narc', env: json2bin_env, depends: [ py_consts_generators ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT@', - '-o', encdata_ex_order, + narc_exe, 'create', + '--order', encdata_ex_order, + '--output', '@OUTPUT@', + '@PRIVATE_DIR@', ] ) @@ -278,7 +278,7 @@ pokedex_enc_platinum_narc = custom_target('zukan_enc_platinum.narc', depends: [ py_consts_generators ], command: [ make_pokedex_enc_platinum_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', diff --git a/res/field/events/meson.build b/res/field/events/meson.build index 5c7d795b29..8ae1b69a37 100644 --- a/res/field/events/meson.build +++ b/res/field/events/meson.build @@ -550,11 +550,11 @@ events_narc = custom_target('zone_event.narc', input: event_bin_gen.process(events_files, env: json2bin_env), depends: [ py_consts_generators ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', events_order, + narc_exe, 'create', '--naix', + '--order', events_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/field/scripts/meson.build b/res/field/scripts/meson.build index e38bf70be2..12b00ba878 100644 --- a/res/field/scripts/meson.build +++ b/res/field/scripts/meson.build @@ -1143,11 +1143,11 @@ scr_seq_narc = custom_target('scr_seq.narc', extra_args: ['--out-dir', scr_seq_private_dir] ), command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '-o', scr_seq_narc_order, - '-n' + narc_exe, 'create', + '--naix', + '--order', scr_seq_narc_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ], depends: [ trdata_narc, diff --git a/res/fonts/meson.build b/res/fonts/meson.build index 9a787408f4..622b5f8424 100644 --- a/res/fonts/meson.build +++ b/res/fonts/meson.build @@ -100,12 +100,12 @@ pl_font_narc = custom_target('pl_font.narc', pl_font_ignore, ], command: [ - knarc_exe, - '-d', current_build_dir, - '-p', '@OUTPUT0@', + narc_exe, 'create', + '--naix', '--order', pl_font_order, '--ignore', pl_font_ignore, - '--naix', + '--output', '@OUTPUT0@', + '@OUTDIR@', ], ) diff --git a/res/graphics/options_menu/meson.build b/res/graphics/options_menu/meson.build index 50c15dd1cf..b558bc7cad 100644 --- a/res/graphics/options_menu/meson.build +++ b/res/graphics/options_menu/meson.build @@ -20,11 +20,11 @@ config_gra_narc = custom_target('config_gra.narc', config_gra_order, ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', config_gra_order, + narc_exe, 'create', '--naix', + '--order', config_gra_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/graphics/pokemon_summary_screen/meson.build b/res/graphics/pokemon_summary_screen/meson.build index 0e9ae3e940..2be4c67707 100644 --- a/res/graphics/pokemon_summary_screen/meson.build +++ b/res/graphics/pokemon_summary_screen/meson.build @@ -227,11 +227,11 @@ pokemon_summary_screen_narc = custom_target('pl_pst_gra.narc', pokemon_summary_screen_order, ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', pokemon_summary_screen_order, + narc_exe, 'create', '--naix', + '--order', pokemon_summary_screen_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/graphics/signposts/meson.build b/res/graphics/signposts/meson.build index 49bf6e1825..8fb35de0ac 100644 --- a/res/graphics/signposts/meson.build +++ b/res/graphics/signposts/meson.build @@ -80,11 +80,11 @@ field_board_narc = custom_target('field_board.narc', field_board_order, ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', field_board_order, + narc_exe, 'create', '--naix', + '--order', field_board_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/graphics/windows/meson.build b/res/graphics/windows/meson.build index 5df081a0aa..72ae931ee4 100644 --- a/res/graphics/windows/meson.build +++ b/res/graphics/windows/meson.build @@ -78,11 +78,11 @@ pl_winframe_narc = custom_target('pl_winframe.narc', pl_winframe_order, ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', pl_winframe_order, + narc_exe, 'create', '--naix', + '--order', pl_winframe_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/pokemon/meson.build b/res/pokemon/meson.build index 29db4c4452..c528cc5e02 100644 --- a/res/pokemon/meson.build +++ b/res/pokemon/meson.build @@ -628,7 +628,7 @@ wotbl_narc = custom_target('wotbl.narc', depends: [ py_consts_generators ], command: [ pokemon_wotbl_data_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -642,7 +642,7 @@ pl_personal_narc = custom_target('pl_personal.narc', depends: [ py_consts_generators ], command: [ pokemon_personal_data_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -656,7 +656,7 @@ evo_narc = custom_target('evo.narc', depends: [ py_consts_generators ], command: [ evo_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -672,7 +672,7 @@ pl_poke_icon_narc = custom_target('pl_poke_icon.narc', command: [ make_pl_poke_icon_py, '--nitrogfx', nitrogfx_exe, - '--knarc', knarc_exe, + '--narc', narc_exe, '--shared-dir', '@CURRENT_SOURCE_DIR@/.shared', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -686,7 +686,7 @@ pl_pokegra_narc = custom_target('pl_pokegra.narc', command: [ make_pl_pokegra_py, '--nitrogfx', nitrogfx_exe, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -703,7 +703,7 @@ pl_otherpoke_narc = custom_target('pl_otherpoke.narc', command: [ make_pl_otherpoke_py, '--nitrogfx', nitrogfx_exe, - '--knarc', knarc_exe, + '--narc', narc_exe, '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', '--sprite-entries', '154', @@ -720,7 +720,7 @@ height_narc = custom_target('height.narc', depends: [ py_consts_generators ], command: [ make_height_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -735,7 +735,7 @@ pl_poke_data_narc = custom_target('pl_poke_data.narc', depends: [ py_consts_generators ], command: [ pl_poke_data_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -748,7 +748,7 @@ pl_pokezukan_narc = custom_target('pl_pokezukan.narc', env: json2bin_env, command: [ make_pl_pokezukan_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -762,7 +762,7 @@ shinzukan_narc = custom_target('shinzukan.narc', env: json2bin_env, command: [ make_shinzukan_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -775,7 +775,7 @@ pl_growtbl_narc = custom_target('pl_growtbl.narc', input: pl_growtbl_files, command: [ make_pl_growtbl_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -795,7 +795,7 @@ pokedex_data_narc = custom_target('zukan_data.narc', depends: [ py_consts_generators ], command: [ make_pokedex_data_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', @@ -811,7 +811,7 @@ pokedex_data_giratina_altered_narc = custom_target('zukan_data_gira.narc', depends: [ py_consts_generators ], command: [ make_pokedex_data_py, - '--knarc', knarc_exe, + '--narc', narc_exe, '--source-dir', '@CURRENT_SOURCE_DIR@', '--private-dir', '@PRIVATE_DIR@', '--output-dir', '@OUTDIR@', diff --git a/res/prebuilt/data/mmodel/meson.build b/res/prebuilt/data/mmodel/meson.build index 9c997b9fa5..b5864950cb 100644 --- a/res/prebuilt/data/mmodel/meson.build +++ b/res/prebuilt/data/mmodel/meson.build @@ -4,9 +4,9 @@ mmodel_narc = custom_target('mmodel.narc', output: 'mmodel.narc', input: mmodel_files_targets, command: [ - knarc_exe, - '-d', '@OUTDIR@/mmodel', - '-p', '@OUTPUT0@' + narc_exe, 'create', + '--output', '@OUTPUT0@', + '@OUTDIR@/mmodel', ] ) diff --git a/res/text/meson.build b/res/text/meson.build index 0715478cb8..f0bba3c1d4 100644 --- a/res/text/meson.build +++ b/res/text/meson.build @@ -773,11 +773,11 @@ message_banks_narc = custom_target('pl_msg.narc', output: 'pl_msg.narc', input: gmm_to_bin_gen.process(message_bank_files), command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '-o', message_banks_narc_order, - '-n' + narc_exe, 'create', + '--naix', + '--order', message_banks_narc_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/res/trainers/meson.build b/res/trainers/meson.build index 8124e7e57c..c84e20a650 100644 --- a/res/trainers/meson.build +++ b/res/trainers/meson.build @@ -951,11 +951,12 @@ trdata_narc = custom_target('trdata.narc', input: trainer_data_gen.process(trainer_data_files, env: json2bin_env), depends: [ py_consts_generators ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', + narc_exe, + 'create', '--order', trainers_order, + '--output', '@OUTPUT0@', '--naix', + '@PRIVATE_DIR@', ], ) @@ -967,11 +968,11 @@ trpoke_narc = custom_target('trpoke.narc', input: trainer_party_gen.process(trainer_data_files, env: json2bin_env), depends: [ py_consts_generators ], command: [ - knarc_exe, - '-d', '@PRIVATE_DIR@', - '-p', '@OUTPUT0@', - '--order', trainers_order, + narc_exe, 'create', '--naix', + '--order', trainers_order, + '--output', '@OUTPUT0@', + '@PRIVATE_DIR@', ] ) diff --git a/subprojects/knarc.wrap b/subprojects/knarc.wrap deleted file mode 100644 index 42f81fe1ba..0000000000 --- a/subprojects/knarc.wrap +++ /dev/null @@ -1,7 +0,0 @@ -[wrap-git] -url = https://github.com/lhearachel/knarc.git -revision = 2.0 -depth = 1 - -[provide] -program_names = knarc diff --git a/subprojects/narc.wrap b/subprojects/narc.wrap new file mode 100644 index 0000000000..ef3480dc71 --- /dev/null +++ b/subprojects/narc.wrap @@ -0,0 +1,8 @@ +[wrap-git] +url = https://github.com/lhearachel/narc.git +revision = v0.1.0 +depth = 1 + +[provide] +program_names = narc +dependency_names = libnarc diff --git a/tools/json2bin/evo.py b/tools/json2bin/evo.py index bc44711d12..f3e35d0ff4 100644 --- a/tools/json2bin/evo.py +++ b/tools/json2bin/evo.py @@ -129,4 +129,4 @@ def indexer(file_path: pathlib.Path) -> int: indexer, glob_pattern='**/data.json', narc_name='evo', - narc_packer=args.knarc) + narc_packer=args.narc) diff --git a/tools/json2bin/json2bin.py b/tools/json2bin/json2bin.py index 193a02465c..cf0844b292 100644 --- a/tools/json2bin/json2bin.py +++ b/tools/json2bin/json2bin.py @@ -14,7 +14,7 @@ prog='json2bin.py', description='Tool for converting a collection of JSON documents into\na NARC via a constructed parsing schema' ) -ARGPARSER.add_argument('--knarc', required=True, +ARGPARSER.add_argument('--narc', required=True, help='Path to the knarc executable') ARGPARSER.add_argument('--source-dir', required=True, help='Source directory with subdirs for each data element') @@ -236,7 +236,7 @@ def json2bin(target: str, _write(merged, 0, private_dir) subprocess.run([ - pathlib.Path(narc_packer), - '-d', private_dir, - '-p', output_dir / f'{narc_name}.narc' + pathlib.Path(narc_packer), 'create', + '--output', output_dir / f'{narc_name}.narc', + private_dir, ]) diff --git a/tools/json2bin/movedata.py b/tools/json2bin/movedata.py index a8143b8f36..971aeae52a 100644 --- a/tools/json2bin/movedata.py +++ b/tools/json2bin/movedata.py @@ -42,4 +42,4 @@ def indexer(file_path: pathlib.Path) -> int: indexer, glob_pattern='**/data.json', narc_name='pl_waza_tbl', - narc_packer=args.knarc) \ No newline at end of file + narc_packer=args.narc) diff --git a/tools/json2bin/pl_poke_data.py b/tools/json2bin/pl_poke_data.py index 2464297c02..826af1fc0a 100644 --- a/tools/json2bin/pl_poke_data.py +++ b/tools/json2bin/pl_poke_data.py @@ -52,6 +52,6 @@ def indexer(file_path: pathlib.Path) -> int: indexer, glob_pattern='**/sprite_data.json', narc_name='pl_poke_data', - narc_packer=args.knarc, + narc_packer=args.narc, output_mode=j2b.OutputMode.SINGLE_FILE, skip_stems=['forms']) diff --git a/tools/json2bin/pokemon_personal_data.py b/tools/json2bin/pokemon_personal_data.py index 6ba543bfe7..004ef7bfe9 100644 --- a/tools/json2bin/pokemon_personal_data.py +++ b/tools/json2bin/pokemon_personal_data.py @@ -102,4 +102,4 @@ def indexer(file_path: pathlib.Path) -> int: indexer, glob_pattern='**/data.json', narc_name='pl_personal', - narc_packer=args.knarc) + narc_packer=args.narc) diff --git a/tools/json2bin/pokemon_wotbl_data.py b/tools/json2bin/pokemon_wotbl_data.py index 35487436e7..8f0ba0cb8d 100644 --- a/tools/json2bin/pokemon_wotbl_data.py +++ b/tools/json2bin/pokemon_wotbl_data.py @@ -81,4 +81,4 @@ def indexer(file_path: pathlib.Path) -> int: indexer, glob_pattern='**/data.json', narc_name='wotbl', - narc_packer=args.knarc) + narc_packer=args.narc) diff --git a/tools/meson.build b/tools/meson.build index ae80914f7b..bcafc78169 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -19,6 +19,6 @@ arm_none_eabi_objcopy_exe = find_program('arm-none-eabi-objcopy', native: true) # External tools nitrogfx_exe = find_program('nitrogfx', native: true) -knarc_exe = find_program('knarc', native: true) +narc_exe = find_program('narc', native: true) constgen_py = find_program('constgen_py', native: true) SDATTool_py = find_program('SDATTool_py', native: true) diff --git a/tools/scripts/make_height.py b/tools/scripts/make_height.py index 641a81ce74..394555c3f8 100644 --- a/tools/scripts/make_height.py +++ b/tools/scripts/make_height.py @@ -11,9 +11,9 @@ prog='pl_poke_icon.narc packer', description='Packs the archive containing Pokemon icons' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-n', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/pokemon)') @@ -65,4 +65,4 @@ j += 1 -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'height.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'height.narc', private_dir]) diff --git a/tools/scripts/make_pl_growtbl.py b/tools/scripts/make_pl_growtbl.py index b0d84da123..a68dfa2168 100644 --- a/tools/scripts/make_pl_growtbl.py +++ b/tools/scripts/make_pl_growtbl.py @@ -9,9 +9,9 @@ prog='make_pl_growtbl', description='Packs the archive containing pokemon exp tables' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/pokemon)') @@ -48,4 +48,4 @@ target_file.write(out) count += 1 -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_growtbl.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_growtbl.narc', private_dir]) diff --git a/tools/scripts/make_pl_otherpoke.py b/tools/scripts/make_pl_otherpoke.py index 0ae8ff198e..2470db69f9 100644 --- a/tools/scripts/make_pl_otherpoke.py +++ b/tools/scripts/make_pl_otherpoke.py @@ -11,9 +11,9 @@ argparser.add_argument('-n', '--nitrogfx', required=True, help='Path to nitrogfx executable') -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-k', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-p', '--private-dir', required=True, help='Path to the private directory (where binaries will be made)') @@ -103,4 +103,4 @@ '-comp', '10' ]) -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_otherpoke.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_otherpoke.narc', private_dir]) diff --git a/tools/scripts/make_pl_poke_icon.py b/tools/scripts/make_pl_poke_icon.py index e31778653a..0abde1e76c 100644 --- a/tools/scripts/make_pl_poke_icon.py +++ b/tools/scripts/make_pl_poke_icon.py @@ -2,7 +2,6 @@ import argparse import pathlib -import shutil import subprocess argparser = argparse.ArgumentParser( @@ -12,9 +11,9 @@ argparser.add_argument('-n', '--nitrogfx', required=True, help='Path to nitrogfx executable') -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-k', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--shared-dir', required=True, help='Path to the .shared directory') @@ -56,4 +55,4 @@ '-version101' ]) -subprocess.run([args.knarc, '-d', bin_dest_dir, '-p', output_dir / 'pl_poke_icon.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_poke_icon.narc', bin_dest_dir]) diff --git a/tools/scripts/make_pl_pokegra.py b/tools/scripts/make_pl_pokegra.py index 358015982a..6eb0e2a274 100644 --- a/tools/scripts/make_pl_pokegra.py +++ b/tools/scripts/make_pl_pokegra.py @@ -12,9 +12,9 @@ argparser.add_argument('-n', '--nitrogfx', required=True, help='Path to nitrogfx executable') -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-k', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/pokemon)') @@ -83,4 +83,4 @@ '-comp', '10' ]) -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_pokegra.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_pokegra.narc', private_dir]) diff --git a/tools/scripts/make_pl_pokezukan.py b/tools/scripts/make_pl_pokezukan.py index e2d58f01d8..994cf74634 100644 --- a/tools/scripts/make_pl_pokezukan.py +++ b/tools/scripts/make_pl_pokezukan.py @@ -11,9 +11,9 @@ prog='make_pl_pokezukan_py', description='Packs the archive containing NatDex->SinnohDex number mapping' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-n', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/pokemon)') @@ -42,7 +42,7 @@ for i, mon in enumerate(dex_data): pokedex[PokemonSpecies[mon].value] = i -target_fname = private_dir / f'pl_pokezukan_0.bin' +target_fname = private_dir / 'pl_pokezukan_0.bin' with open(target_fname, 'wb+') as target_file: pl_pokezukan = [0 for i in range(NUM_POKEMON * 2)] for i in range(NUM_POKEMON): @@ -50,4 +50,4 @@ pl_pokezukan[i*2 + 1] = (pokedex[i] >> 8) & 0xff target_file.write(bytes(pl_pokezukan)) -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'pl_pokezukan.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'pl_pokezukan.narc', private_dir]) diff --git a/tools/scripts/make_pokedex_data.py b/tools/scripts/make_pokedex_data.py index b301ae1c11..8b3b9ef13c 100644 --- a/tools/scripts/make_pokedex_data.py +++ b/tools/scripts/make_pokedex_data.py @@ -13,9 +13,9 @@ prog='make_pokedex_data_py', description='Packs the archive containing Pokedex sorting' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-n', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/pokemon)') @@ -80,7 +80,7 @@ def DataSize(num): if pk_name == 'giratina': if args.giratina_form == 'giratina_origin': pkdexdata = pkdexdata[0] - if args.giratina_form == 'giratina_altered': + else: pkdexdata = pkdexdata[1] for j in range(11): @@ -154,7 +154,7 @@ def DataSize(num): # save data if args.giratina_form == 'giratina_origin': output_name = 'zukan_data' -if args.giratina_form == 'giratina_altered': +else: output_name = 'zukan_data_gira' numDigits = len(str(NUM_FILES)) @@ -164,4 +164,4 @@ def DataSize(num): with open(target_fname, 'wb+') as target_file: target_file.write(binData[i]) -subprocess.run([args.knarc, '-d', private_dir, '-p', str(output_dir / output_name) + '.narc']) +subprocess.run([args.narc, 'create', '--output', str(output_dir / output_name) + '.narc', private_dir]) diff --git a/tools/scripts/make_pokedex_enc_platinum.py b/tools/scripts/make_pokedex_enc_platinum.py index 367debec57..ff1f177ce7 100644 --- a/tools/scripts/make_pokedex_enc_platinum.py +++ b/tools/scripts/make_pokedex_enc_platinum.py @@ -11,9 +11,9 @@ prog='make_pokedex_enc_platinum_py', description='Packs the archive containing Pokedex encounter data' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-n', '--narc', required=True, - help='Path to knarc executable') + help='Path to narc executable') argparser.add_argument('-s', '--source-dir', required=True, help='Path to the source directory (res/field/encounters)') @@ -438,4 +438,4 @@ with open(target_fname, 'wb+') as target_file: target_file.write(bin_data) -subprocess.run([args.knarc, '-d', private_dir, '-p', str(output_dir / output_name) + '.narc']) +subprocess.run([args.narc, 'create', '--output', str(output_dir / output_name) + '.narc', private_dir]) diff --git a/tools/scripts/make_shinzukan.py b/tools/scripts/make_shinzukan.py index 8709972d19..d9115bbbb4 100644 --- a/tools/scripts/make_shinzukan.py +++ b/tools/scripts/make_shinzukan.py @@ -11,7 +11,7 @@ prog='make_shinzukan_py', description='Packs the archive containing SinnohDex->NatDex number mapping' ) -argparser.add_argument('-k', '--knarc', +argparser.add_argument('-n', '--narc', required=True, help='Path to knarc executable') argparser.add_argument('-s', '--source-dir', @@ -42,7 +42,7 @@ for i, mon in enumerate(dex_data): pokedex[i] = PokemonSpecies[mon].value -target_fname = private_dir / f'shinzukan_0.bin' +target_fname = private_dir / 'shinzukan_0.bin' with open(target_fname, 'wb+') as target_file: shinzukan = [0 for i in range(NUM_SINNOH * 2)] for i in range(NUM_SINNOH): @@ -50,4 +50,4 @@ shinzukan[i*2 + 1] = (pokedex[i] >> 8) & 0xff target_file.write(bytes(shinzukan)) -subprocess.run([args.knarc, '-d', private_dir, '-p', output_dir / 'shinzukan.narc']) +subprocess.run([args.narc, 'create', '--output', output_dir / 'shinzukan.narc', private_dir])