19 lines
493 B
Python
19 lines
493 B
Python
from processtileset import processTileset
|
|
from processimage import processPalette, processImage
|
|
|
|
processedAssets = []
|
|
|
|
def processAsset(assetPath):
|
|
if assetPath in processedAssets:
|
|
return
|
|
|
|
processedAssets.append(assetPath)
|
|
|
|
# Handle tiled tilesets
|
|
if assetPath.endswith('.tsx'):
|
|
return processTileset(assetPath)
|
|
elif assetPath.endswith('.png'):
|
|
if assetPath.endswith('.palette.png'):
|
|
return processPalette(assetPath)
|
|
else:
|
|
return processImage(assetPath) |