MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / PaletteLoad

Method PaletteLoad

Source/PC/Graphics_PC.cpp:240–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void cGraphics_PC::PaletteLoad( const uint8 *pBuffer, uint32 pColors, uint32 pColorID ) {
241 size_t colorStartID = pColorID;
242
243 if (pColors >= g_MaxColors)
244 pColors = g_MaxColors - 1;
245
246 for (; pColorID < pColors + colorStartID; pColorID++) {
247
248 // Get the next color values
249 mPalette[pColorID].mRed = *pBuffer++;
250 mPalette[pColorID].mGreen = *pBuffer++;
251 mPalette[pColorID].mBlue = *pBuffer++;
252 }
253}
254
255void cGraphics_PC::PaletteSetOverview() {
256

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected