implements PLN-0068
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user