| 570 | } |
| 571 | |
| 572 | static void ConvertCI8(const TextureDestInfo & dsti, const TextureInfo & ti) |
| 573 | { |
| 574 | #ifdef DAEDALUS_ENABLE_ASSERTS |
| 575 | DAEDALUS_ASSERT(ti.GetTlutAddress(), "No TLUT address"); |
| 576 | #endif |
| 577 | |
| 578 | NativePf8888 temp_palette[256]; |
| 579 | |
| 580 | NativePf8888 * dst_palette = dsti.Palette ? reinterpret_cast< NativePf8888 * >( dsti.Palette ) : temp_palette; |
| 581 | const void * src_palette = reinterpret_cast< const void * >( ti.GetTlutAddress() ); |
| 582 | |
| 583 | ConvertPalette(ti.GetTLutFormat(), dst_palette, src_palette, 256); |
| 584 | |
| 585 | switch( dsti.Format ) |
| 586 | { |
| 587 | case TexFmt_8888: |
| 588 | ConvertPalettisedTo8888( dsti, ti, dst_palette, |
| 589 | ConvertCI8_Row_To_8888< 0x4 | 0x3 >, |
| 590 | ConvertCI8_Row_To_8888< 0x3 > ); |
| 591 | break; |
| 592 | |
| 593 | case TexFmt_CI8_8888: |
| 594 | ConvertPalettisedToCI( dsti, ti, |
| 595 | ConvertCI8_Row< 0x4 | 0x3 >, |
| 596 | ConvertCI8_Row< 0x3 > ); |
| 597 | break; |
| 598 | |
| 599 | #ifdef DAEDALUS_DEBUG_CONSOLE |
| 600 | default: |
| 601 | DAEDALUS_ERROR( "Unhandled format for CI8 textures" ); |
| 602 | break; |
| 603 | #endif |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | static void ConvertCI4(const TextureDestInfo & dsti, const TextureInfo & ti) |
| 608 | { |
nothing calls this directly
no test coverage detected