2013-06-23 07:49:34 +00:00
|
|
|
#ifndef __GL_BITMAP_H
|
|
|
|
#define __GL_BITMAP_H
|
|
|
|
|
|
|
|
#include "textures/bitmap.h"
|
|
|
|
#include "gl/textures/gl_material.h"
|
|
|
|
|
|
|
|
|
|
|
|
class FGLBitmap : public FBitmap
|
|
|
|
{
|
2014-05-11 17:44:19 +00:00
|
|
|
bool alphatex;
|
2013-06-23 07:49:34 +00:00
|
|
|
int translation;
|
|
|
|
public:
|
|
|
|
|
2014-05-11 17:44:19 +00:00
|
|
|
FGLBitmap()
|
|
|
|
{
|
|
|
|
alphatex = false;
|
|
|
|
translation = 0;
|
|
|
|
}
|
2013-06-23 07:49:34 +00:00
|
|
|
FGLBitmap(BYTE *buffer, int pitch, int width, int height)
|
|
|
|
: FBitmap(buffer, pitch, width, height)
|
2014-05-11 17:44:19 +00:00
|
|
|
{
|
|
|
|
alphatex = false;
|
|
|
|
translation = 0;
|
|
|
|
}
|
2013-06-23 07:49:34 +00:00
|
|
|
|
2014-05-11 17:44:19 +00:00
|
|
|
void SetTranslationInfo(int _trans)
|
2013-06-23 07:49:34 +00:00
|
|
|
{
|
2014-05-11 17:44:19 +00:00
|
|
|
if (_trans == -1) alphatex = true;
|
|
|
|
else if (_trans != -1337) translation = _trans;
|
|
|
|
|
|
|
|
}
|
2013-06-23 07:49:34 +00:00
|
|
|
|
2014-05-11 17:44:19 +00:00
|
|
|
void SetAlphaTex()
|
|
|
|
{
|
|
|
|
alphatex = true;
|
2013-06-23 07:49:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
|
|
|
|
int srcheight, int step_x, int step_y, int rotate, int ct, FCopyInfo *inf = NULL);
|
|
|
|
virtual void CopyPixelData(int originx, int originy, const BYTE * patch, int srcwidth, int srcheight,
|
|
|
|
int step_x, int step_y, int rotate, PalEntry * palette, FCopyInfo *inf = NULL);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|