forked from metin2/client
Solution refactoring and restructuring, removed Boost dependency, removed unused tools
This commit is contained in:
37
src/EterImageLib/TGAImage.h
Normal file
37
src/EterImageLib/TGAImage.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef __INC_ETERIMAGELIB_TGAIMAGE_H__
|
||||
#define __INC_ETERIMAGELIB_TGAIMAGE_H__
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
class CTGAImage : public CImage
|
||||
{
|
||||
public:
|
||||
enum ETGAImageFlags
|
||||
{
|
||||
FLAG_RLE_COMPRESS = (1 << 0)
|
||||
};
|
||||
|
||||
CTGAImage();
|
||||
CTGAImage(CImage &image);
|
||||
virtual ~CTGAImage();
|
||||
|
||||
virtual void Create(int width, int height);
|
||||
virtual bool LoadFromMemory(int iSize, const BYTE * c_pbMem);
|
||||
virtual bool LoadFromDiskFile(const char * c_szFileName);
|
||||
virtual bool SaveToDiskFile(const char* c_szFileName);
|
||||
|
||||
void SetCompressed(bool isCompress = true);
|
||||
void SetAlphaChannel(bool isExist = true);
|
||||
|
||||
TGA_HEADER & GetHeader();
|
||||
protected:
|
||||
int GetRawPixelCount(const DWORD * data);
|
||||
int GetRLEPixelCount(const DWORD * data);
|
||||
|
||||
protected:
|
||||
TGA_HEADER m_Header;
|
||||
DWORD m_dwFlag;
|
||||
DWORD * m_pdwEndPtr;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user