508 lines
11 KiB
C++
508 lines
11 KiB
C++
#ifndef _DDRAW_BLITEFFECTS_HPP_
|
|
#define _DDRAW_BLITEFFECTS_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _DDRAW_DDRAW_HPP_
|
|
#include <ddraw/ddraw.hpp>
|
|
#endif
|
|
|
|
class BltEffects : private DDBLTFX
|
|
{
|
|
public:
|
|
BltEffects(void);
|
|
BltEffects(const BltEffects &someBltEffects);
|
|
BltEffects(const DDBLTFX &someDDBLTFX);
|
|
virtual ~BltEffects();
|
|
BltEffects &operator=(const BltEffects &someBltEffects);
|
|
BltEffects &operator=(const DDBLTFX &someDDBLTFX);
|
|
DWORD ddFx(void)const;
|
|
void ddFx(DWORD ddFx);
|
|
DWORD rop(void)const;
|
|
void rop(DWORD rop);
|
|
DWORD ddRop(void)const;
|
|
void ddRop(DWORD ddRop);
|
|
DWORD rotationAngle(void)const;
|
|
void rotationAngle(DWORD rotationAngle);
|
|
DWORD zBufferOpCode(void)const;
|
|
void zBufferOpCode(DWORD zBufferOpCode);
|
|
DWORD zBufferLow(void)const;
|
|
void zBufferLow(DWORD zBufferLow);
|
|
DWORD zBufferHigh(void)const;
|
|
void zBufferHigh(DWORD zBufferHigh);
|
|
DWORD zBufferBaseDest(void)const;
|
|
void zBufferBaseDest(DWORD zBufferBaseDest);
|
|
DWORD zDestConstBitDepth(void)const;
|
|
void zDestConstBitDepth(DWORD zDestConstBitDepth);
|
|
DWORD zDestConst(void)const;
|
|
void zDestConst(DWORD zDestConst);
|
|
LPDIRECTDRAWSURFACE szBufferDest(void);
|
|
void szBufferDest(LPDIRECTDRAWSURFACE lpDirectDrawSurface);
|
|
DWORD zSrcConstBitDepth(void)const;
|
|
void zSrcConstBitDepth(DWORD zSrcConstBitDepth);
|
|
DWORD zSrcConst(void)const;
|
|
void zSrcConst(DWORD zSrcConst);
|
|
LPDIRECTDRAWSURFACE szBufferSrc(void);
|
|
void szBufferSrc(LPDIRECTDRAWSURFACE lpDirectDrawSurface);
|
|
DWORD alphaEdgeBlendBitDepth(void)const;
|
|
void alphaEdgeBlendBitDepth(DWORD alphaEdgeBlendBitDepth);
|
|
DWORD alphaEdgeBlend(void)const;
|
|
void alphaEdgeBlend(DWORD alphaEdgeBlend);
|
|
DWORD alphaDestConstBitDepth(void)const;
|
|
void alphaDestConstBitDepth(DWORD alphaDestConstBitDepth);
|
|
DWORD alphaDestConst(void)const;
|
|
void alphaDestConst(DWORD alphaDestConst);
|
|
LPDIRECTDRAWSURFACE lpAlphaDest(void);
|
|
void lpAlphaDest(LPDIRECTDRAWSURFACE lpAlphaConst);
|
|
DWORD alphaSrcConstBitDepth(void)const;
|
|
void alphaSrcConstBitDepth(DWORD alphaSrcConstBitDepth);
|
|
DWORD alphaSrcConst(void)const;
|
|
void alphaSrcConst(DWORD alphaSrcConst);
|
|
LPDIRECTDRAWSURFACE alphaSrc(void);
|
|
void alphaSrc(LPDIRECTDRAWSURFACE alphaSrc);
|
|
DWORD fillColor(void)const;
|
|
void fillColor(DWORD fillColor);
|
|
DWORD fillDepth(void)const;
|
|
void fillDepth(DWORD fillDepth);
|
|
DWORD fillPixel(void)const;
|
|
void fillPixel(DWORD fillPixel);
|
|
LPDIRECTDRAWSURFACE ddsPattern(void);
|
|
void ddsPattern(LPDIRECTDRAWSURFACE ddsPattern);
|
|
const DDCOLORKEY &ckDestColorKey(void)const;
|
|
void ckDestColorKey(const DDCOLORKEY &ckDestColorKey);
|
|
const DDCOLORKEY &ckSrcColorKey(void)const;
|
|
void ckSrcColorKey(const DDCOLORKEY &ckSrcColorKey);
|
|
DDBLTFX &getDDBLTFX(void);
|
|
private:
|
|
void zeroInit(void);
|
|
};
|
|
|
|
inline
|
|
BltEffects::BltEffects(void)
|
|
{
|
|
zeroInit();
|
|
}
|
|
|
|
inline
|
|
BltEffects::BltEffects(const BltEffects &someBltEffects)
|
|
{
|
|
zeroInit();
|
|
*this=someBltEffects;
|
|
}
|
|
|
|
inline
|
|
BltEffects::BltEffects(const DDBLTFX &someDDBLTFX)
|
|
{
|
|
zeroInit();
|
|
*this=someDDBLTFX;
|
|
}
|
|
|
|
inline
|
|
BltEffects::~BltEffects()
|
|
{
|
|
}
|
|
|
|
inline
|
|
BltEffects &BltEffects::operator=(const BltEffects &someBltEffects)
|
|
{
|
|
ddFx(someBltEffects.ddFx());
|
|
rop(someBltEffects.rop());
|
|
ddRop(someBltEffects.ddRop());
|
|
rotationAngle(someBltEffects.rotationAngle());
|
|
zBufferOpCode(someBltEffects.zBufferOpCode());
|
|
zBufferLow(someBltEffects.zBufferLow());
|
|
zBufferHigh(someBltEffects.zBufferHigh());
|
|
zBufferBaseDest(someBltEffects.zBufferBaseDest());
|
|
zDestConstBitDepth(someBltEffects.zDestConstBitDepth());
|
|
zDestConst(someBltEffects.zDestConst());
|
|
zSrcConstBitDepth(someBltEffects.zSrcConstBitDepth());
|
|
zSrcConst(someBltEffects.zSrcConst());
|
|
alphaEdgeBlendBitDepth(someBltEffects.alphaEdgeBlendBitDepth());
|
|
alphaEdgeBlend(someBltEffects.alphaEdgeBlend());
|
|
alphaDestConstBitDepth(someBltEffects.alphaDestConstBitDepth());
|
|
alphaDestConst(someBltEffects.alphaDestConst());
|
|
alphaSrcConstBitDepth(someBltEffects.alphaSrcConstBitDepth());
|
|
alphaSrcConst(someBltEffects.alphaSrcConst());
|
|
fillColor(someBltEffects.fillColor());
|
|
ckDestColorKey(someBltEffects.ckDestColorKey());
|
|
ckSrcColorKey(someBltEffects.ckSrcColorKey());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
BltEffects &BltEffects::operator=(const DDBLTFX &someDDBLTFX)
|
|
{
|
|
ddFx(someDDBLTFX.dwDDFX);
|
|
rop(someDDBLTFX.dwROP);
|
|
ddRop(someDDBLTFX.dwDDROP);
|
|
rotationAngle(someDDBLTFX.dwRotationAngle);
|
|
zBufferOpCode(someDDBLTFX.dwZBufferOpCode);
|
|
zBufferLow(someDDBLTFX.dwZBufferLow);
|
|
zBufferHigh(someDDBLTFX.dwZBufferHigh);
|
|
zBufferBaseDest(someDDBLTFX.dwZBufferBaseDest);
|
|
zDestConstBitDepth(someDDBLTFX.dwZDestConstBitDepth);
|
|
zDestConst(someDDBLTFX.dwZDestConst);
|
|
zSrcConstBitDepth(someDDBLTFX.dwZSrcConstBitDepth);
|
|
zSrcConst(someDDBLTFX.dwZSrcConst);
|
|
alphaEdgeBlendBitDepth(someDDBLTFX.dwAlphaEdgeBlendBitDepth);
|
|
alphaEdgeBlend(someDDBLTFX.dwAlphaEdgeBlend);
|
|
alphaDestConstBitDepth(someDDBLTFX.dwAlphaDestConstBitDepth);
|
|
alphaDestConst(someDDBLTFX.dwAlphaDestConst);
|
|
alphaSrcConstBitDepth(someDDBLTFX.dwAlphaSrcConstBitDepth);
|
|
alphaSrcConst(someDDBLTFX.dwAlphaSrcConst);
|
|
fillColor(someDDBLTFX.dwFillColor);
|
|
ckDestColorKey(someDDBLTFX.ddckDestColorkey);
|
|
ckSrcColorKey(someDDBLTFX.ddckDestColorkey);
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::ddFx(void)const
|
|
{
|
|
return DDBLTFX::dwDDFX;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::ddFx(DWORD ddFx)
|
|
{
|
|
DDBLTFX::dwDDFX=ddFx;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::rop(void)const
|
|
{
|
|
return DDBLTFX::dwROP;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::rop(DWORD rop)
|
|
{
|
|
DDBLTFX::dwROP=rop;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::ddRop(void)const
|
|
{
|
|
return DDBLTFX::dwDDROP;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::ddRop(DWORD ddRop)
|
|
{
|
|
DDBLTFX::dwDDROP=ddRop;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::rotationAngle(void)const
|
|
{
|
|
return DDBLTFX::dwRotationAngle;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::rotationAngle(DWORD rotationAngle)
|
|
{
|
|
DDBLTFX::dwRotationAngle=rotationAngle;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zBufferOpCode(void)const
|
|
{
|
|
return DDBLTFX::dwZBufferOpCode;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zBufferOpCode(DWORD zBufferOpCode)
|
|
{
|
|
DDBLTFX::dwZBufferOpCode=zBufferOpCode;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zBufferLow(void)const
|
|
{
|
|
return DDBLTFX::dwZBufferLow;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zBufferLow(DWORD zBufferLow)
|
|
{
|
|
DDBLTFX::dwZBufferLow=zBufferLow;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zBufferHigh(void)const
|
|
{
|
|
return DDBLTFX::dwZBufferHigh;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zBufferHigh(DWORD zBufferHigh)
|
|
{
|
|
DDBLTFX::dwZBufferHigh=zBufferHigh;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zBufferBaseDest(void)const
|
|
{
|
|
return DDBLTFX::dwZBufferBaseDest;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zBufferBaseDest(DWORD zBufferBaseDest)
|
|
{
|
|
DDBLTFX::dwZBufferBaseDest=zBufferBaseDest;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zDestConstBitDepth(void)const
|
|
{
|
|
return DDBLTFX::dwZDestConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zDestConstBitDepth(DWORD zDestConstBitDepth)
|
|
{
|
|
DDBLTFX::dwZDestConstBitDepth=zDestConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zDestConst(void)const
|
|
{
|
|
return DDBLTFX::dwZDestConst;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zDestConst(DWORD zDestConst)
|
|
{
|
|
DDBLTFX::dwZDestConst=zDestConst;
|
|
}
|
|
|
|
inline
|
|
LPDIRECTDRAWSURFACE BltEffects::szBufferDest(void)
|
|
{
|
|
return DDBLTFX::lpDDSZBufferDest;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::szBufferDest(LPDIRECTDRAWSURFACE lpDirectDrawSurface)
|
|
{
|
|
DDBLTFX::lpDDSZBufferDest=lpDirectDrawSurface;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zSrcConstBitDepth(void)const
|
|
{
|
|
return DDBLTFX::dwZSrcConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zSrcConstBitDepth(DWORD zSrcConstBitDepth)
|
|
{
|
|
DDBLTFX::dwZSrcConstBitDepth=zSrcConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::zSrcConst(void)const
|
|
{
|
|
return DDBLTFX::dwZSrcConst;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zSrcConst(DWORD zSrcConst)
|
|
{
|
|
DDBLTFX::dwZSrcConst;
|
|
}
|
|
|
|
inline
|
|
LPDIRECTDRAWSURFACE BltEffects::szBufferSrc(void)
|
|
{
|
|
return DDBLTFX::lpDDSZBufferSrc;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::szBufferSrc(LPDIRECTDRAWSURFACE lpDirectDrawSurface)
|
|
{
|
|
DDBLTFX::lpDDSZBufferSrc=lpDirectDrawSurface;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaEdgeBlendBitDepth(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaEdgeBlendBitDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaEdgeBlendBitDepth(DWORD alphaEdgeBlendBitDepth)
|
|
{
|
|
DDBLTFX::dwAlphaEdgeBlendBitDepth=alphaEdgeBlendBitDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaEdgeBlend(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaEdgeBlend;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaEdgeBlend(DWORD alphaEdgeBlend)
|
|
{
|
|
DDBLTFX::dwAlphaEdgeBlend=alphaEdgeBlend;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaDestConstBitDepth(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaDestConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaDestConstBitDepth(DWORD alphaDestConstBitDepth)
|
|
{
|
|
DDBLTFX::dwAlphaDestConstBitDepth=alphaDestConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaDestConst(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaDestConst;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaDestConst(DWORD alphaDestConst)
|
|
{
|
|
DDBLTFX::dwAlphaDestConst=alphaDestConst;
|
|
}
|
|
|
|
inline
|
|
LPDIRECTDRAWSURFACE BltEffects::lpAlphaDest(void)
|
|
{
|
|
return DDBLTFX::lpDDSAlphaDest;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::lpAlphaDest(LPDIRECTDRAWSURFACE lpAlphaConst)
|
|
{
|
|
DDBLTFX::lpDDSAlphaDest=lpAlphaConst;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaSrcConstBitDepth(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaSrcConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaSrcConstBitDepth(DWORD alphaSrcConstBitDepth)
|
|
{
|
|
DDBLTFX::dwAlphaSrcConstBitDepth=alphaSrcConstBitDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::alphaSrcConst(void)const
|
|
{
|
|
return DDBLTFX::dwAlphaSrcConst;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaSrcConst(DWORD alphaSrcConst)
|
|
{
|
|
DDBLTFX::dwAlphaSrcConst=alphaSrcConst;
|
|
}
|
|
|
|
inline
|
|
LPDIRECTDRAWSURFACE BltEffects::alphaSrc(void)
|
|
{
|
|
return DDBLTFX::lpDDSAlphaSrc;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::alphaSrc(LPDIRECTDRAWSURFACE alphaSrc)
|
|
{
|
|
DDBLTFX::lpDDSAlphaSrc=alphaSrc;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::fillColor(void)const
|
|
{
|
|
return DDBLTFX::dwFillColor;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::fillColor(DWORD fillColor)
|
|
{
|
|
DDBLTFX::dwFillColor=fillColor;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::fillDepth(void)const
|
|
{
|
|
return DDBLTFX::dwFillDepth;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::fillDepth(DWORD fillDepth)
|
|
{
|
|
DDBLTFX::dwFillDepth=fillDepth;
|
|
}
|
|
|
|
inline
|
|
DWORD BltEffects::fillPixel(void)const
|
|
{
|
|
return DDBLTFX::dwFillPixel;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::fillPixel(DWORD fillPixel)
|
|
{
|
|
DDBLTFX::dwFillPixel=fillPixel;
|
|
}
|
|
|
|
inline
|
|
LPDIRECTDRAWSURFACE BltEffects::ddsPattern(void)
|
|
{
|
|
return DDBLTFX::lpDDSPattern;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::ddsPattern(LPDIRECTDRAWSURFACE ddsPattern)
|
|
{
|
|
DDBLTFX::lpDDSPattern=ddsPattern;
|
|
}
|
|
|
|
inline
|
|
const DDCOLORKEY &BltEffects::ckDestColorKey(void)const
|
|
{
|
|
return DDBLTFX::ddckDestColorkey;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::ckDestColorKey(const DDCOLORKEY &ckDestColorKey)
|
|
{
|
|
DDBLTFX::ddckDestColorkey=ckDestColorKey;
|
|
}
|
|
|
|
inline
|
|
const DDCOLORKEY &BltEffects::ckSrcColorKey(void)const
|
|
{
|
|
return DDBLTFX::ddckSrcColorkey;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::ckSrcColorKey(const DDCOLORKEY &ckSrcColorKey)
|
|
{
|
|
DDBLTFX::ddckSrcColorkey=ckSrcColorKey;
|
|
}
|
|
|
|
inline
|
|
DDBLTFX &BltEffects::getDDBLTFX(void)
|
|
{
|
|
return (DDBLTFX&)*this;
|
|
}
|
|
|
|
inline
|
|
void BltEffects::zeroInit(void)
|
|
{
|
|
::memset(&getDDBLTFX(),0,sizeof(DDBLTFX));
|
|
DDBLTFX::dwSize=sizeof(DDBLTFX);
|
|
}
|
|
#endif
|