Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DSurface Class Reference

#include <dsurface.h>

Inherits XSurface.

Public Member Functions

virtual ~DSurface (void)
 
 DSurface (void)
 
 DSurface (int width, int height, bool system_memory=false, DDPIXELFORMAT *pixform=NULL)
 
 DSurface (LPDIRECTDRAWSURFACE surfaceptr)
 
HDC GetDC (void)
 
int ReleaseDC (HDC hdc)
 
virtual bool Blit_From (Rect const &dcliprect, Rect const &destrect, Surface const &source, Rect const &scliprect, Rect const &sourcerect, bool trans=false)
 
virtual bool Blit_From (Rect const &destrect, Surface const &source, Rect const &sourcerect, bool trans=false)
 
virtual bool Blit_From (Surface const &source, bool trans=false)
 
virtual bool Fill_Rect (Rect const &rect, int color)
 
virtual bool Fill_Rect (Rect const &cliprect, Rect const &fillrect, int color)
 
virtual void * Lock (Point2D point=Point2D(0, 0)) const
 
virtual bool Unlock (void) const
 
virtual int Bytes_Per_Pixel (void) const
 
virtual int Stride (void) const
 
bool In_Video_Ram (void) const
 
virtual bool Is_Direct_Draw (void) const
 
- Public Member Functions inherited from XSurface
 XSurface (int width=0, int height=0)
 
virtual ~XSurface (void)
 
virtual bool Fill (int color)
 
virtual bool Put_Pixel (Point2D const &point, int color)
 
virtual int Get_Pixel (Point2D const &point) const
 
virtual bool Draw_Line (Point2D const &startpoint, Point2D const &endpoint, int color)
 
virtual bool Draw_Line (Rect const &cliprect, Point2D const &startpoint, Point2D const &endpoint, int color)
 
virtual bool Draw_Rect (Rect const &rect, int color)
 
virtual bool Draw_Rect (Rect const &cliprect, Rect const &rect, int color)
 
virtual bool Is_Locked (void) const
 
- Public Member Functions inherited from Surface
 Surface (int width, int height)
 
virtual ~Surface (void)
 
virtual Rect Get_Rect (void) const
 
virtual int Get_Width (void) const
 
virtual int Get_Height (void) const
 

Static Public Member Functions

static DSurfaceCreate_Primary (DSurface **backsurface1=NULL)
 
static int Build_Hicolor_Pixel (int red, int green, int blue)
 
static void Build_Remap_Table (unsigned short *table, PaletteClass const &palette)
 
static unsigned short Get_Halfbright_Mask (void)
 
static unsigned short Get_Quarterbright_Mask (void)
 
static unsigned short Get_Eighthbright_Mask (void)
 
- Static Public Member Functions inherited from XSurface
static bool Prep_For_Blit (Surface &dest, Rect &drect, Surface const &source, Rect &srect, bool &overlapped, void *&dbuffer, void *&sbuffer)
 
static bool Prep_For_Blit (Surface &dest, Rect const &dcliprect, Rect &drect, Surface const &source, Rect const &scliprect, Rect &srect, bool &overlapped, void *&dbuffer, void *&sbuffer)
 
static bool Blit_Trans (Surface &dest, Rect const &destrect, Surface const &source, Rect const &sourcerect)
 
static bool Blit_Plain (Surface &dest, Rect const &destrect, Surface const &source, Rect const &sourcerect)
 

Public Attributes

int ThisRedRight
 
int ThisRedLeft
 
int ThisBlueRight
 
int ThisBlueLeft
 
int ThisGreenRight
 
int ThisGreenLeft
 

Protected Member Functions

void Restore_Check (void) const
 

Protected Attributes

int BytesPerPixel
 
void * LockPtr
 
bool IsPrimary
 
bool IsVideoRam
 
LPDIRECTDRAWSURFACE SurfacePtr
 
DDSURFACEDESC * Description
 
int DCUnlockCount
 
- Protected Attributes inherited from XSurface
int LockCount
 
- Protected Attributes inherited from Surface
int Width
 
int Height
 

Static Protected Attributes

static LPDIRECTDRAWCLIPPER Clipper = NULL
 
static DDPIXELFORMAT PixelFormat
 
static int RedRight = 0
 
static int RedLeft = 0
 
static int BlueRight = 0
 
static int BlueLeft = 0
 
static int GreenRight = 0
 
static int GreenLeft = 0
 
static unsigned short HalfbrightMask = 0
 
static unsigned short QuarterbrightMask = 0
 
static unsigned short EighthbrightMask = 0
 

Detailed Description

Definition at line 49 of file dsurface.h.

Constructor & Destructor Documentation

◆ ~DSurface()

DSurface::~DSurface ( void )
virtual

Definition at line 214 of file dsurface.cpp.

◆ DSurface() [1/3]

DSurface::DSurface ( void )

Definition at line 256 of file dsurface.cpp.

◆ DSurface() [2/3]

DSurface::DSurface ( int width,
int height,
bool system_memory = false,
DDPIXELFORMAT * pixform = NULL )

Definition at line 100 of file dsurface.cpp.

◆ DSurface() [3/3]

DSurface::DSurface ( LPDIRECTDRAWSURFACE surfaceptr)

Definition at line 520 of file dsurface.cpp.

Member Function Documentation

◆ Blit_From() [1/3]

bool DSurface::Blit_From ( Rect const & dcliprect,
Rect const & destrect,
Surface const & source,
Rect const & scliprect,
Rect const & sourcerect,
bool trans = false )
virtual

Reimplemented from XSurface.

Definition at line 741 of file dsurface.cpp.

◆ Blit_From() [2/3]

bool DSurface::Blit_From ( Rect const & destrect,
Surface const & source,
Rect const & sourcerect,
bool trans = false )
virtual

Reimplemented from XSurface.

Definition at line 707 of file dsurface.cpp.

◆ Blit_From() [3/3]

virtual bool DSurface::Blit_From ( Surface const & source,
bool trans = false )
inlinevirtual

Reimplemented from XSurface.

Definition at line 87 of file dsurface.h.

◆ Build_Hicolor_Pixel()

int DSurface::Build_Hicolor_Pixel ( int red,
int green,
int blue )
static

Definition at line 895 of file dsurface.cpp.

◆ Build_Remap_Table()

void DSurface::Build_Remap_Table ( unsigned short * table,
PaletteClass const & palette )
static

Definition at line 919 of file dsurface.cpp.

◆ Bytes_Per_Pixel()

int DSurface::Bytes_Per_Pixel ( void ) const
virtual

Implements XSurface.

Definition at line 556 of file dsurface.cpp.

◆ Create_Primary()

DSurface * DSurface::Create_Primary ( DSurface ** backsurface1 = NULL)
static

Definition at line 373 of file dsurface.cpp.

◆ Fill_Rect() [1/2]

bool DSurface::Fill_Rect ( Rect const & cliprect,
Rect const & fillrect,
int color )
virtual

Reimplemented from XSurface.

Definition at line 828 of file dsurface.cpp.

◆ Fill_Rect() [2/2]

bool DSurface::Fill_Rect ( Rect const & rect,
int color )
virtual

Reimplemented from XSurface.

Definition at line 800 of file dsurface.cpp.

◆ Get_Eighthbright_Mask()

static unsigned short DSurface::Get_Eighthbright_Mask ( void )
inlinestatic

Definition at line 117 of file dsurface.h.

◆ Get_Halfbright_Mask()

static unsigned short DSurface::Get_Halfbright_Mask ( void )
inlinestatic

Definition at line 115 of file dsurface.h.

◆ Get_Quarterbright_Mask()

static unsigned short DSurface::Get_Quarterbright_Mask ( void )
inlinestatic

Definition at line 116 of file dsurface.h.

◆ GetDC()

HDC DSurface::GetDC ( void )

Definition at line 282 of file dsurface.cpp.

◆ In_Video_Ram()

bool DSurface::In_Video_Ram ( void ) const
inline

Definition at line 106 of file dsurface.h.

◆ Is_Direct_Draw()

virtual bool DSurface::Is_Direct_Draw ( void ) const
inlinevirtual

Reimplemented from XSurface.

Definition at line 111 of file dsurface.h.

◆ Lock()

void * DSurface::Lock ( Point2D point = Point2D(0, 0)) const
virtual

Reimplemented from XSurface.

Definition at line 605 of file dsurface.cpp.

◆ ReleaseDC()

int DSurface::ReleaseDC ( HDC hdc)

Definition at line 329 of file dsurface.cpp.

◆ Restore_Check()

void DSurface::Restore_Check ( void ) const
protected

Definition at line 669 of file dsurface.cpp.

◆ Stride()

int DSurface::Stride ( void ) const
virtual

Implements XSurface.

Definition at line 578 of file dsurface.cpp.

◆ Unlock()

bool DSurface::Unlock ( void ) const
virtual

Reimplemented from XSurface.

Definition at line 639 of file dsurface.cpp.

Member Data Documentation

◆ BlueLeft

int DSurface::BlueLeft = 0
staticprotected

Definition at line 170 of file dsurface.h.

◆ BlueRight

int DSurface::BlueRight = 0
staticprotected

Definition at line 169 of file dsurface.h.

◆ BytesPerPixel

int DSurface::BytesPerPixel
mutableprotected

Definition at line 126 of file dsurface.h.

◆ Clipper

LPDIRECTDRAWCLIPPER DSurface::Clipper = NULL
staticprotected

Definition at line 156 of file dsurface.h.

◆ DCUnlockCount

int DSurface::DCUnlockCount
protected

Definition at line 194 of file dsurface.h.

◆ Description

DDSURFACEDESC* DSurface::Description
protected

Definition at line 150 of file dsurface.h.

◆ EighthbrightMask

unsigned short DSurface::EighthbrightMask = 0
staticprotected

Definition at line 188 of file dsurface.h.

◆ GreenLeft

int DSurface::GreenLeft = 0
staticprotected

Definition at line 172 of file dsurface.h.

◆ GreenRight

int DSurface::GreenRight = 0
staticprotected

Definition at line 171 of file dsurface.h.

◆ HalfbrightMask

unsigned short DSurface::HalfbrightMask = 0
staticprotected

Definition at line 186 of file dsurface.h.

◆ IsPrimary

bool DSurface::IsPrimary
protected

Definition at line 139 of file dsurface.h.

◆ IsVideoRam

bool DSurface::IsVideoRam
protected

Definition at line 144 of file dsurface.h.

◆ LockPtr

void* DSurface::LockPtr
mutableprotected

Definition at line 133 of file dsurface.h.

◆ PixelFormat

DDPIXELFORMAT DSurface::PixelFormat
staticprotected

Definition at line 161 of file dsurface.h.

◆ QuarterbrightMask

unsigned short DSurface::QuarterbrightMask = 0
staticprotected

Definition at line 187 of file dsurface.h.

◆ RedLeft

int DSurface::RedLeft = 0
staticprotected

Definition at line 168 of file dsurface.h.

◆ RedRight

int DSurface::RedRight = 0
staticprotected

Definition at line 167 of file dsurface.h.

◆ SurfacePtr

LPDIRECTDRAWSURFACE DSurface::SurfacePtr
protected

Definition at line 149 of file dsurface.h.

◆ ThisBlueLeft

int DSurface::ThisBlueLeft

Definition at line 181 of file dsurface.h.

◆ ThisBlueRight

int DSurface::ThisBlueRight

Definition at line 180 of file dsurface.h.

◆ ThisGreenLeft

int DSurface::ThisGreenLeft

Definition at line 183 of file dsurface.h.

◆ ThisGreenRight

int DSurface::ThisGreenRight

Definition at line 182 of file dsurface.h.

◆ ThisRedLeft

int DSurface::ThisRedLeft

Definition at line 179 of file dsurface.h.

◆ ThisRedRight

int DSurface::ThisRedRight

Definition at line 178 of file dsurface.h.


The documentation for this class was generated from the following files: