Going to redo assets.

This commit is contained in:
2025-08-24 13:57:12 -05:00
parent 329925ea54
commit 479aad2f06
36 changed files with 285 additions and 128 deletions

View File

@@ -0,0 +1,31 @@
import sys, os
import argparse
from assetparser import parseAsset
from header import setOutputDir
# Check if the script is run with the correct arguments
parser = argparse.ArgumentParser(description="Generate chunk header files")
parser.add_argument('--output', required=True, help='Dir to output headers')
parser.add_argument('--input', required=True, help='Input assets to process', nargs='+')
args = parser.parse_args()
# Setup headers directory.
setOutputDir(args.output)
outputHeaders = []
# Create output directory if it doesn't exist
if not os.path.exists(args.output):
os.makedirs(args.output)
# Split input assets by comma
inputAssets = []
for inputArg in args.input:
inputAssets.extend(inputArg.split(','))
# Begin processing assets
if not inputAssets:
print("Error: No input assets provided.")
sys.exit(1)
for asset in inputAssets:
outputHeaders.extend(parseAsset(asset))