implements PLN-0068

This commit is contained in:
2026-05-23 19:19:28 +01:00
parent 1256d33a72
commit 668a061964
12 changed files with 121 additions and 121 deletions
+3 -3
View File
@@ -658,7 +658,7 @@ impl AssetManager {
let offset = (p * 16 + c) * 2;
let color_raw =
u16::from_le_bytes([palette_data[offset], palette_data[offset + 1]]);
*slot = Color(color_raw);
*slot = Color::from_rgb565_lossy(color_raw);
}
}
@@ -690,7 +690,7 @@ impl AssetManager {
let offset = (p * 16 + c) * 2;
let color_raw =
u16::from_le_bytes([palette_data[offset], palette_data[offset + 1]]);
*slot = Color(color_raw);
*slot = Color::from_rgb565_lossy(color_raw);
}
}
@@ -1313,7 +1313,7 @@ mod tests {
AssetManager::decode_glyph_bank_from_buffer(&entry, &data).expect("glyph decode");
assert_eq!(bank.pixel_indices, vec![1, 0, 2, 3]);
assert_eq!(bank.palettes[0][0], Color(0x1234));
assert_eq!(bank.palettes[0][0], Color::from_rgb565_lossy(0x1234));
}
#[test]