MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / ConvertCI8

Function ConvertCI8

Source/HLEGraphics/ConvertImage.cpp:572–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572static 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
607static void ConvertCI4(const TextureDestInfo & dsti, const TextureInfo & ti)
608{

Callers

nothing calls this directly

Calls 5

ConvertPaletteFunction · 0.85
ConvertPalettisedTo8888Function · 0.85
ConvertPalettisedToCIFunction · 0.85
GetTlutAddressMethod · 0.80
GetTLutFormatMethod · 0.80

Tested by

no test coverage detected