From e682e199392c7bb8437bbaed598748125cb85dcd Mon Sep 17 00:00:00 2001 From: Alec Harley Date: Sun, 8 May 2022 19:38:52 -0700 Subject: [PATCH] Add Planet CRC utility --- build.xml | 7 +++++++ utils/build_planet_crc_string_tables.py | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 utils/build_planet_crc_string_tables.py diff --git a/build.xml b/build.xml index cda119b..b9741b8 100755 --- a/build.xml +++ b/build.xml @@ -397,6 +397,13 @@ + + + + + + + diff --git a/utils/build_planet_crc_string_tables.py b/utils/build_planet_crc_string_tables.py new file mode 100644 index 0000000..50c8f8e --- /dev/null +++ b/utils/build_planet_crc_string_tables.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +from os import path, makedirs +from subprocess import PIPE, Popen + +inputfile = './dsrc/sku.0/sys.shared/compiled/game/misc/planet_crc_string_table.txt' +ifffile = './data/sku.0/sys.shared/compiled/game/misc/planet_crc_string_table.iff' + +if not path.exists(path.dirname(ifffile)): + makedirs(path.dirname(ifffile)) + +crc_call = ['./tools/buildCrcStringTable.pl', ifffile, inputfile] + +p = Popen(crc_call, stdin=PIPE, stdout=PIPE) + +p.communicate()