| 605 | } |
| 606 | |
| 607 | static void ConvertCI4(const TextureDestInfo & dsti, const TextureInfo & ti) |
| 608 | { |
| 609 | #ifdef DAEDALUS_ENABLE_ASSERTS |
| 610 | DAEDALUS_ASSERT(ti.GetTlutAddress(), "No TLUT address"); |
| 611 | #endif |
| 612 | NativePf8888 temp_palette[16]; |
| 613 | |
| 614 | NativePf8888 * dst_palette = dsti.Palette ? reinterpret_cast< NativePf8888 * >( dsti.Palette ) : temp_palette; |
| 615 | const void * src_palette = reinterpret_cast< const void * >( ti.GetTlutAddress() ); |
| 616 | |
| 617 | ConvertPalette(ti.GetTLutFormat(), dst_palette, src_palette, 16); |
| 618 | |
| 619 | switch( dsti.Format ) |
| 620 | { |
| 621 | case TexFmt_8888: |
| 622 | ConvertPalettisedTo8888( dsti, ti, dst_palette, |
| 623 | ConvertCI4_Row_To_8888< 0x4 | 0x3 >, |
| 624 | ConvertCI4_Row_To_8888< 0x3 > ); |
| 625 | break; |
| 626 | |
| 627 | case TexFmt_CI4_8888: |
| 628 | ConvertPalettisedToCI( dsti, ti, |
| 629 | ConvertCI4_Row< 0x4 | 0x3 >, |
| 630 | ConvertCI4_Row< 0x3 > ); |
| 631 | break; |
| 632 | |
| 633 | #ifdef DAEDALUS_DEBUG_CONSOLE |
| 634 | default: |
| 635 | DAEDALUS_ERROR( "Unhandled format for CI4 textures" ); |
| 636 | break; |
| 637 | #endif |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | } // anonymous namespace |
| 642 |
nothing calls this directly
no test coverage detected