| 342 | } /* DECODE_LC */ |
| 343 | |
| 344 | void DECODE_COLOR() |
| 345 | { Uint8 *pSrc; |
| 346 | Uint16 NumColors, NumColorPackets; |
| 347 | Uint8 NumColorsSkip; |
| 348 | int i; |
| 349 | |
| 350 | pSrc=flc.pChunk+6; |
| 351 | ReadU16(&NumColorPackets, pSrc); |
| 352 | pSrc+=2; |
| 353 | while(NumColorPackets--) { |
| 354 | NumColorsSkip=*(pSrc++); |
| 355 | if(!(NumColors=*(pSrc++))) { |
| 356 | NumColors=256; |
| 357 | } |
| 358 | i=0; |
| 359 | while(NumColors--) { |
| 360 | flc.colors[i].r=*(pSrc++)<<2; |
| 361 | flc.colors[i].g=*(pSrc++)<<2; |
| 362 | flc.colors[i].b=*(pSrc++)<<2; |
| 363 | i++; |
| 364 | } |
| 365 | flc.realscreen->setPalette(flc.colors, NumColorsSkip, i); |
| 366 | SDL_SetColors(flc.mainscreen, flc.colors, NumColorsSkip, i); |
| 367 | flc.realscreen->getSurface(); // force palette update to really happen |
| 368 | } |
| 369 | } /* DECODE_COLOR */ |
| 370 | |
| 371 | |
| 372 | void DECODE_COPY() |
no test coverage detected