| 700 | } |
| 701 | |
| 702 | void cGraphics_PC::Load_And_Draw_Image( const std::string &pFilename, unsigned int pColors, size_t pBackColor) { |
| 703 | std::string Filename = pFilename; |
| 704 | |
| 705 | if (Filename.find('.') == std::string::npos ) |
| 706 | Filename.append( ".dat" ); |
| 707 | |
| 708 | auto fileBuffer = g_Resource->fileGet(Filename); |
| 709 | uint8* srcBuffer = fileBuffer->data(); |
| 710 | |
| 711 | uint8 *Buffer = 0; |
| 712 | |
| 713 | mSurface->clearBuffer(); |
| 714 | |
| 715 | for (unsigned int Plane = 0; Plane < 4; Plane++) { |
| 716 | Buffer = mSurface->GetSurfaceBuffer() + (16 * mSurface->GetWidth()) + 16; |
| 717 | |
| 718 | for (unsigned int Y = 0; Y < 200; ++Y) { |
| 719 | |
| 720 | for (unsigned int X = Plane; X < 320; X += 4 ) { |
| 721 | |
| 722 | Buffer[X] = *srcBuffer++; |
| 723 | } |
| 724 | |
| 725 | Buffer += mSurface->GetWidth(); |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | if(pColors) |
| 730 | PaletteLoad( fileBuffer->data() + (fileBuffer->size() - (0x100 * 3)), pColors ); |
| 731 | } |
| 732 | |
| 733 | void cGraphics_PC::Mission_Intro_DrawHelicopter( uint16 ) { |
| 734 |
no test coverage detected