SVN r657 (trunk)
This commit is contained in:
parent
6872bcd3ef
commit
68e2134f70
5 changed files with 105 additions and 45 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include "r_data.h"
|
||||
#include "templates.h"
|
||||
#include "i_system.h"
|
||||
#include "r_translate.h"
|
||||
|
||||
typedef bool (*CheckFunc)(FileReader & file);
|
||||
typedef FTexture * (*CreateFunc)(FileReader & file, int lumpnum);
|
||||
|
|
@ -483,7 +484,19 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
|
|||
|
||||
int FTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y)
|
||||
{
|
||||
PalEntry * palette = screen->GetPalette();
|
||||
PalEntry *palette = screen->GetPalette();
|
||||
palette[0].a=255; // temporarily modify the first color's alpha
|
||||
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y,
|
||||
GetPixels(), Width, Height, Height, 1,
|
||||
palette);
|
||||
|
||||
palette[0].a=0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FTexture::CopyTrueColorTranslated(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, FRemapTable *remap)
|
||||
{
|
||||
PalEntry *palette = remap->Palette;
|
||||
palette[0].a=255; // temporarily modify the first color's alpha
|
||||
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y,
|
||||
GetPixels(), Width, Height, Height, 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue