OpenMortal Apocalypse mirror
Sourceforge mirror Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

CBackground Class Reference
[Game logic (frontend + backend connection)]

The CBackground class draws the multi-layered background of each arena. More...

#include <Background.h>

List of all members.

Public Member Functions

 CBackground ()
 ~CBackground ()
void Load (int a_iBackgroundNumber)
void AddExtraLayer (const SBackgroundLayer &a_roLayer)
 Adds a layer to the background.
void DeleteExtraLayers ()
bool IsOK ()
void Draw (int a_iXPosition, int a_iYPosition, int a_iYOffset)

Protected Attributes

int m_iNumber
int m_iFirstExtraLayer
bool m_bOK
CLayerVector m_aLayers

Private Types

typedef std::vector< SBackgroundLayerCLayerVector
typedef CLayerVector::iterator CLayerIterator

Private Member Functions

void Clear ()


struct  SBackgroundLayer

Detailed Description

The CBackground class draws the multi-layered background of each arena.

The backgrounds are identified by their number. Single-layer backgrounds do not have description files. Multi-layer backgrounds have a description file which has the following format:

Extra layers can be added to the background. These are for dead fighters in team game mode.

Member Typedef Documentation

typedef CLayerVector::iterator CBackground::CLayerIterator [private]

typedef std::vector<SBackgroundLayer> CBackground::CLayerVector [private]

Constructor & Destructor Documentation

CBackground::CBackground  ) 

CBackground::~CBackground  ) 

Member Function Documentation

void CBackground::AddExtraLayer const SBackgroundLayer a_roLayer  ) 

Adds a layer to the background.

The background object will assume ownership of the given structure, including the surface within.

void CBackground::Clear  )  [private]

void CBackground::DeleteExtraLayers  ) 

void CBackground::Draw int  a_iXPosition,
int  a_iYPosition,
int  a_iYOffset

bool CBackground::IsOK  ) 

void CBackground::Load int  a_iBackgroundNumber  ) 

Member Data Documentation

CLayerVector CBackground::m_aLayers [protected]

bool CBackground::m_bOK [protected]

int CBackground::m_iFirstExtraLayer [protected]

int CBackground::m_iNumber [protected]

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