Started asset refact

This commit is contained in:
2025-11-04 10:15:19 -06:00
parent 7d46b98310
commit 7c11a7e5bc
25 changed files with 362 additions and 208 deletions

View File

@@ -36,7 +36,6 @@ def processPalette(asset):
# PSP requires that the palette size be a power of two, so we will pad the
# palette with transparent colors if needed.
# if args.platform == "psp":
def mathNextPowTwo(x):
return 1 << (x - 1).bit_length()
@@ -53,7 +52,7 @@ def processPalette(asset):
data += f"static const color_t PALETTE_{paletteIndex}_COLORS[PALETTE_{paletteIndex}_COLOR_COUNT] = {{\n"
for pixel in pixels:
data += f" {{ 0x{pixel[0]:02X}, 0x{pixel[1]:02X}, 0x{pixel[2]:02X}, 0x{pixel[3]:02X} }},\n"
data += f"}};\n\n"
data += f"}};\n"
data += f"#pragma pack(pop)\n\n"
data += f"static const palette_t PALETTE_{paletteIndex} = {{\n"
data += f" .colorCount = PALETTE_{paletteIndex}_COLOR_COUNT,\n"