Map saving first pass

This commit is contained in:
2025-09-18 17:01:10 -05:00
parent a45a2a5bd7
commit 2f40724258
22 changed files with 355 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ from PIL import Image
from args import args
import sys
import datetime
from assetcache import assetCache, assetGetCache
palettes = []
@@ -22,6 +23,9 @@ def extractPaletteFromImage(image):
def processPalette(asset):
print(f"Processing palette: {asset['path']}")
cache = assetGetCache(asset['path'])
if cache is not None:
return cache
paletteIndex = len(palettes)
image = Image.open(asset['path'])
@@ -72,7 +76,7 @@ def processPalette(asset):
}
palettes.append(palette)
return palette
return assetCache(asset['path'], palette)
def processPaletteList():
data = f"// Auto-generated palette list\n"