Initial public OpenBMH 0.1 source (by Codex)

This commit is contained in:
Codex committed 2026-10-16 19:36:32 +02:00
commit 558fbf166b
613 files changed
+168029

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Palette: `M3PC.COL`
The file contains 256 RGB triplets: 768 bytes, with each channel a six-bit VGA DAC value. `load_palette` in `src/formats/palette.cpp` requires at least that size and ignores trailing data.
A channel is masked with `0x3f` and expanded to eight bits using `(v * 255 + 31) / 63`. Rendering uses opaque alpha unless the drawing operation supplies transparency separately. No palette index is inherently transparent.
Some [VGA](VGA.md) images supply a separate palette. The same channel conversion applies. `Palette::nearest` is an implementation helper for colour matching, not an additional file field.