mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2025-07-16 12:24:13 +00:00
Parametrize the RGB palette to encode with, and support both NTSC and
IIGS palettes. Move the palette diff_matrix generation into make_data_tables.py since that is the only place it is used. Demand-load the edit distance matrices when transcoding.
This commit is contained in:
@@ -10,31 +10,15 @@ class TestMakeDataTables(unittest.TestCase):
|
||||
self.assertEqual("0FC", make_data_tables.pixel_string(pixels))
|
||||
|
||||
def test_pixels_influenced_by_byte_index(self):
|
||||
pixels = (
|
||||
DHGRColours.ORANGE,
|
||||
DHGRColours.GREEN,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
)
|
||||
pixels = "CB00000"
|
||||
self.assertEqual(
|
||||
(DHGRColours.ORANGE, DHGRColours.GREEN),
|
||||
"CB",
|
||||
make_data_tables.pixels_influenced_by_byte_index(pixels, 0)
|
||||
)
|
||||
|
||||
pixels = (
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BROWN,
|
||||
DHGRColours.YELLOW,
|
||||
DHGRColours.GREY1,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
DHGRColours.BLACK,
|
||||
)
|
||||
pixels = "CBA9000"
|
||||
self.assertEqual(
|
||||
(DHGRColours.BROWN, DHGRColours.YELLOW, DHGRColours.GREY1),
|
||||
"BA9",
|
||||
make_data_tables.pixels_influenced_by_byte_index(pixels, 1)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user