mirror of https://github.com/inolen/redream.git
Add missing 8bpp paletted texture conversions
This commit is contained in:
parent
3657d9f542
commit
19f93bb27d
|
@ -285,6 +285,8 @@ define_convert_pal4(RGB565, RGB565);
|
|||
define_convert_pal4(ARGB4444, RGBA4444);
|
||||
define_convert_pal4(ARGB8888, RGBA8888);
|
||||
|
||||
define_convert_pal8(ARGB1555, RGBA5551);
|
||||
define_convert_pal8(RGB565, RGB565);
|
||||
define_convert_pal8(ARGB4444, RGBA4444);
|
||||
define_convert_pal8(ARGB8888, RGBA8888);
|
||||
|
||||
|
|
|
@ -280,6 +280,20 @@ static texture_handle_t tr_demand_texture(struct tr *tr,
|
|||
CHECK(!compressed);
|
||||
output = converted;
|
||||
switch (ctx->pal_pxl_format) {
|
||||
case TA_PAL_ARGB1555:
|
||||
pixel_fmt = PXL_RGBA5551;
|
||||
convert_pal8_ARGB1555_RGBA5551(input, (uint16_t *)converted,
|
||||
(const uint32_t *)palette, width,
|
||||
height);
|
||||
break;
|
||||
|
||||
case TA_PAL_RGB565:
|
||||
pixel_fmt = PXL_RGB565;
|
||||
convert_pal8_RGB565_RGB565(input, (uint16_t *)converted,
|
||||
(const uint32_t *)palette, width,
|
||||
height);
|
||||
break;
|
||||
|
||||
case TA_PAL_ARGB4444:
|
||||
pixel_fmt = PXL_RGBA4444;
|
||||
convert_pal8_ARGB4444_RGBA4444(input, (uint16_t *)converted,
|
||||
|
|
Loading…
Reference in New Issue