=========================================================================== Paletted to True Color texture copy function ===========================================================================
| 452 | // |
| 453 | //=========================================================================== |
| 454 | void FBitmap::CopyPixelData(int originx, int originy, const uint8_t * patch, int srcwidth, int srcheight, |
| 455 | int step_x, int step_y, int rotate, const PalEntry * palette, FCopyInfo *inf) |
| 456 | { |
| 457 | if (ClipCopyPixelRect(&ClipRect, originx, originy, patch, srcwidth, srcheight, step_x, step_y, rotate)) |
| 458 | { |
| 459 | uint8_t *buffer = data + 4*originx + Pitch*originy; |
| 460 | PalEntry penew[256]; |
| 461 | |
| 462 | memset(penew, 0, sizeof(penew)); |
| 463 | if (inf) |
| 464 | { |
| 465 | if (inf->blend) |
| 466 | { |
| 467 | iCopyColors<cPalEntry, cBGRA, bCopy>((uint8_t*)penew, (const uint8_t*)palette, 256, 4, inf, 0, 0, 0); |
| 468 | palette = penew; |
| 469 | } |
| 470 | else if (inf->palette) |
| 471 | { |
| 472 | palette = inf->palette; |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | copypalettedfuncs[inf==NULL? OP_COPY : inf->op](buffer, patch, srcwidth, srcheight, Pitch, |
| 477 | step_x, step_y, rotate, palette, inf); |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | //=========================================================================== |
| 482 | // |
no test coverage detected