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,17 @@
import os
import sys
from tilesetparser import parseTileset
from imageparser import parseImage
def parseAsset(assetPath):
if not os.path.isfile(assetPath):
print(f"Error: Input asset '{assetPath}' does not exist.")
sys.exit(1)
if assetPath.endswith(".tsx"):
return parseTileset(assetPath)
elif assetPath.endswith(".png"):
return parseImage(assetPath)
else:
print(f"Warning: Unsupported asset type for '{assetPath}'. Skipping.")
return []