MCPcopy Create free account
hub / github.com/NetHack/NetHack / vesa_SetSoftPalette

Function vesa_SetSoftPalette

sys/msdos/vidvesa.c:2021–2043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2019}
2020
2021static boolean
2022vesa_SetSoftPalette(const struct Pixel *palette)
2023{
2024 const struct Pixel *p;
2025 unsigned i;
2026
2027 /* Set the tile set and text colors */
2028#ifdef TILES_IN_GLYPHMAP
2029 if (palette != NULL) {
2030 p = palette;
2031 for (i = 0; i < FIRST_TEXT_COLOR; ++i) {
2032 vesa_palette[i] = vesa_MakeColor(*p);
2033 ++p;
2034 }
2035 }
2036#endif
2037 p = defpalette;
2038 for (i = FIRST_TEXT_COLOR; i < 256; ++i) {
2039 vesa_palette[i] = vesa_MakeColor(*p);
2040 ++p;
2041 }
2042 return TRUE;
2043}
2044
2045void
2046vesa_hide_cursor(void)

Callers 1

vesa_SetPaletteFunction · 0.85

Calls 1

vesa_MakeColorFunction · 0.85

Tested by

no test coverage detected