MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / COLORS256

Function COLORS256

src/Engine/Flc.cpp:182–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180} /* FlcCheckFrame */
181
182void COLORS256()
183{ Uint8 *pSrc;
184 Uint16 NumColorPackets;
185 Uint16 NumColors;
186 Uint8 NumColorsSkip;
187 int i;
188
189 pSrc=flc.pChunk+6;
190 ReadU16(&NumColorPackets, pSrc);
191 pSrc+=2;
192 while(NumColorPackets--) {
193 NumColorsSkip=*(pSrc++);
194 if(!(NumColors=*(pSrc++))) {
195 NumColors=256;
196 }
197 i=0;
198 while(NumColors--) {
199 flc.colors[i].r=*(pSrc++);
200 flc.colors[i].g=*(pSrc++);
201 flc.colors[i].b=*(pSrc++);
202 i++;
203 }
204 flc.realscreen->setPalette(flc.colors, NumColorsSkip, i);
205 SDL_SetColors(flc.mainscreen, flc.colors, NumColorsSkip, i);
206 flc.realscreen->getSurface(); // force palette update to really happen
207 }
208} /* COLORS256 */
209
210void SS2()
211{ Uint8 *pSrc, *pDst, *pTmpDst;

Callers 1

FlcDoOneFrameFunction · 0.85

Calls 2

setPaletteMethod · 0.45
getSurfaceMethod · 0.45

Tested by

no test coverage detected