CDisplay Class Reference

#include <CDisplay.h>

Collaboration diagram for CDisplay:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CDisplay (void)
 Initialize some members.
 ~CDisplay (void)
 Does nothing.
void SetWindowHandle (HWND hWnd)
 Set the handle of the window DirectDraw/SDLVideo has to work with.
void SetModuleHandle (HMODULE hModule)
 Set the handle of the module linked to the resources.
bool Create (EDisplayMode DisplayMode)
 (Re)Create the DirectDraw/SDLVideo interface and (re)load the sprite tables given the display mode
void Destroy (void)
 Destroy the DirectDraw/SDLVideo interface and the sprite tables.
void OnWindowMove (void)
 Has to be called when the window moves (WM_MOVE).
void OnPaint (void)
 Has to be called when the window has to be repainted (WM_PAINT).
void Clear (void)
 Make the window's client area black.
void Update (void)
 Draw the sprites that DrawSprite recorded and update the window's client area.
void SetOrigin (int OriginX, int OriginY)
 Set the origin to draw from the game view origin.
void DrawSprite (int PositionX, int PositionY, RECT *pZone, RECT *pClip, int SpriteTable, int Sprite, int SpriteLayer, int PriorityInLayer)
 Record a drawing request that will be executed on next call to Update.
void DrawDebugRectangle (int PositionX, int PositionY, int w, int h, BYTE r, BYTE g, BYTE b, int SpriteLayer, int PriorityInLayer)
 Record a drawing request for debug purposes.
void RemoveAllDebugRectangles (void)
CSDLVideoGetSDLVideo (void)
bool IsDisplayModeAvailable (EDisplayMode DisplayMode)

Private Member Functions

bool Create (int Width, int Height, bool FullScreen)
 (Re)Create the DirectDraw/SDLVideo interface and (re)load the sprite tables given the resolution
bool LoadSprites (int SpriteTableWidth, int SpriteTableHeight, int SpriteWidth, int SpriteHeight, bool Transparent, int BMP_ID)
 Load a sprite table given its bitmap data and its properties.

Private Attributes

HMODULE m_hModule
 Connection to the resources.
CSDLVideo m_SDLVideo
 Object used for display.
int m_ViewOriginX
 Top left corner of the game view.
int m_ViewOriginY


Constructor & Destructor Documentation

CDisplay::CDisplay ( void   ) 

Initialize some members.

CDisplay::~CDisplay ( void   ) 

Does nothing.


Member Function Documentation

bool CDisplay::Create ( int  Width,
int  Height,
bool  FullScreen 
) [private]

(Re)Create the DirectDraw/SDLVideo interface and (re)load the sprite tables given the resolution

Here is the call graph for this function:

Here is the caller graph for this function:

bool CDisplay::LoadSprites ( int  SpriteTableWidth,
int  SpriteTableHeight,
int  SpriteWidth,
int  SpriteHeight,
bool  Transparent,
int  BMP_ID 
) [private]

Load a sprite table given its bitmap data and its properties.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::SetWindowHandle ( HWND  hWnd  )  [inline]

Set the handle of the window DirectDraw/SDLVideo has to work with.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::SetModuleHandle ( HMODULE  hModule  )  [inline]

Set the handle of the module linked to the resources.

Here is the caller graph for this function:

bool CDisplay::Create ( EDisplayMode  DisplayMode  ) 

(Re)Create the DirectDraw/SDLVideo interface and (re)load the sprite tables given the display mode

Here is the call graph for this function:

void CDisplay::Destroy ( void   ) 

Destroy the DirectDraw/SDLVideo interface and the sprite tables.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::OnWindowMove ( void   )  [inline]

Has to be called when the window moves (WM_MOVE).

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::OnPaint ( void   )  [inline]

Has to be called when the window has to be repainted (WM_PAINT).

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::Clear ( void   )  [inline]

Make the window's client area black.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::Update ( void   )  [inline]

Draw the sprites that DrawSprite recorded and update the window's client area.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::SetOrigin ( int  OriginX,
int  OriginY 
) [inline]

Set the origin to draw from the game view origin.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::DrawSprite ( int  PositionX,
int  PositionY,
RECT pZone,
RECT pClip,
int  SpriteTable,
int  Sprite,
int  SpriteLayer,
int  PriorityInLayer 
) [inline]

Record a drawing request that will be executed on next call to Update.

Here is the call graph for this function:

void CDisplay::DrawDebugRectangle ( int  PositionX,
int  PositionY,
int  w,
int  h,
BYTE  r,
BYTE  g,
BYTE  b,
int  SpriteLayer,
int  PriorityInLayer 
) [inline]

Record a drawing request for debug purposes.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDisplay::RemoveAllDebugRectangles ( void   )  [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

CSDLVideo & CDisplay::GetSDLVideo ( void   )  [inline]

Here is the caller graph for this function:

bool CDisplay::IsDisplayModeAvailable ( EDisplayMode  DisplayMode  ) 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Connection to the resources.

Object used for display.

int CDisplay::m_ViewOriginX [private]

Top left corner of the game view.

int CDisplay::m_ViewOriginY [private]


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

Generated on Sat Oct 18 12:26:44 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo