MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetBlitterMode

Function GetBlitterMode

src/gfx.cpp:988–996  ·  view source on GitHub ↗

* Helper function to get the blitter mode for different types of palettes. * @param pal The palette to get the blitter mode for. * @return The blitter mode associated with the palette. */

Source from the content-addressed store, hash-verified

986 * @return The blitter mode associated with the palette.
987 */
988static BlitterMode GetBlitterMode(PaletteID pal)
989{
990 switch (pal) {
991 case PAL_NONE: return BlitterMode::Normal;
992 case PALETTE_CRASH: return BlitterMode::CrashRemap;
993 case PALETTE_ALL_BLACK: return BlitterMode::BlackRemap;
994 default: return BlitterMode::ColourRemap;
995 }
996}
997
998/**
999 * Draw a sprite in a viewport.

Callers 2

DrawSpriteViewportFunction · 0.85
DrawSpriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected