From f7599784dfcf91a82f51a6c5713627a54835490b Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sun, 5 Jul 2026 15:18:26 +0900 Subject: [PATCH] Validate battle UI icon PNG color mode --- scripts/verify-visual-asset-data.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/verify-visual-asset-data.mjs b/scripts/verify-visual-asset-data.mjs index c8a5615..c93f19f 100644 --- a/scripts/verify-visual-asset-data.mjs +++ b/scripts/verify-visual-asset-data.mjs @@ -54,6 +54,9 @@ function validateBattleUiIconAtlas(errors, manifest) { if (dimensions.width !== expectedWidth || dimensions.height !== expectedHeight) { errors.push(`battle UI icon atlas is ${dimensions.width}x${dimensions.height}, expected ${expectedWidth}x${expectedHeight}`); } + if (dimensions.bitDepth !== 8 || dimensions.colorType !== 6) { + errors.push(`battle UI icon atlas must be 8-bit RGBA PNG color type 6, got bitDepth=${dimensions.bitDepth} colorType=${dimensions.colorType}`); + } const frameLimit = manifest.columns * manifest.rows; Object.entries(manifest.frames).forEach(([key, frame]) => { @@ -129,7 +132,9 @@ function readPngDimensions(path) { return { width: bytes.readUInt32BE(16), - height: bytes.readUInt32BE(20) + height: bytes.readUInt32BE(20), + bitDepth: bytes[24], + colorType: bytes[25] }; }