18 #ifndef INC_StdSurface2
19 #define INC_StdSurface2
25 #define C4GFXBLIT_NORMAL 0
26 #define C4GFXBLIT_ADDITIVE 1
27 #define C4GFXBLIT_MOD2 2
28 #define C4GFXBLIT_CLRSFC_OWNCLR 4
29 #define C4GFXBLIT_CLRSFC_MOD2 8
30 #define C4GFXBLIT_WIREFRAME 16
32 #define C4GFXBLIT_ALL 31
33 #define C4GFXBLIT_NOADD 30
35 #define C4GFXBLIT_CUSTOM 128
36 #define C4GFXBLIT_PARENT 256
39 #define C4GFX_NOGFX_CLRDEPTH 24
62 C4Surface(
int iWdt,
int iHgt,
int iFlags);
95 void ClearBoxDw(
int iX,
int iY,
int iWdt,
int iHgt);
101 bool BltPix(
int iX,
int iY,
C4Surface *sfcSource,
int iSrcX,
int iSrcY,
bool fTransparency);
102 bool Create(
int iWdt,
int iHgt,
int iFlags = 0);
115 void Clip(
int iX,
int iY,
int iX2,
int iY2);
119 bool LoadAny(
C4Group &hGroup,
const char *szFilename,
bool fOwnPal,
bool fNoErrIfNotFound,
int iFlags);
120 bool LoadAny(
C4GroupSet &hGroupset,
const char *szFilename,
bool fOwnPal,
bool fNoErrIfNotFound,
int iFlags);
121 bool Load(
C4Group &hGroup,
const char *szFilename,
bool fOwnPal,
bool fNoErrIfNotFound,
int iFlags);
123 bool SavePNG(
C4Group &hGroup,
const char *szFilename,
bool fSaveAlpha=
true,
bool fSaveOverlayOnly=
false);
124 bool SavePNG(
const char *szFilename,
bool fSaveAlpha,
bool fSaveOverlayOnly,
bool use_background_thread);
125 bool Read(
CStdStream &hGroup,
const char * extension,
int iFlags);
135 void MapBytes(
BYTE *bpMap);
136 bool ReadBytes(
BYTE **lpbpData,
void *bpTarget,
int iSize);
146 std::unique_ptr<unsigned char[]>
pBits;
177 void CreateTexture();
std::unique_ptr< unsigned char[]> pBits
struct _LOCKED_RECT LOCKED_RECT
bool CreateColorByOwner(C4Surface *pBySurface)
bool Copy(C4Surface &fromSfc)
bool SetPixDw(int iX, int iY, DWORD dwCol)
bool Load(C4Group &hGroup, const char *szFilename, bool fOwnPal, bool fNoErrIfNotFound, int iFlags)
bool UpdateSize(int wdt, int hgt)
DWORD GetPixDw(int iX, int iY, bool fApplyModulation)
std::unique_ptr< C4TexRef > texture
bool LoadAny(C4Group &hGroup, const char *szFilename, bool fOwnPal, bool fNoErrIfNotFound, int iFlags)
bool GetSurfaceSize(int &irX, int &irY)
bool ReadBMP(CStdStream &hGroup, int iFlags)
BYTE * PrimarySurfaceLockBits
int PrimarySurfaceLockPitch
bool Read(CStdStream &hGroup, const char *extension, int iFlags)
bool IsPixTransparent(int iX, int iY)
bool Create(int iWdt, int iHgt, int iFlags=0)
bool ReadJPEG(CStdStream &hGroup, int iFlags)
bool SetAsClrByOwnerOf(C4Surface *pOfSurface)
bool ReadPNG(CStdStream &hGroup, int iFlags)
bool Save(C4Group &hGroup, const char *szFilename)
void MoveFrom(C4Surface *psfcFrom)
bool BltPix(int iX, int iY, C4Surface *sfcSource, int iSrcX, int iSrcY, bool fTransparency)
bool CreatePrimaryGLTextures()
bool PageFlip(C4Rect *pSrcRt=nullptr, C4Rect *pDstRt=nullptr)
void ClearBoxDw(int iX, int iY, int iWdt, int iHgt)
void Clip(int iX, int iY, int iX2, int iY2)
bool SavePNG(C4Group &hGroup, const char *szFilename, bool fSaveAlpha=true, bool fSaveOverlayOnly=false)
void RegTex(C4TexRef *pTex)
std::list< C4TexRef * > Textures
void UnregTex(C4TexRef *pTex)
bool LockForUpdate(C4Rect &rtUpdate)
C4TexRef(int iSizeX, int iSizeY, int iFlags)
void SetPix(int iX, int iY, DWORD v)
bool ClearRect(C4Rect &rtClear)