CLevelManager Class Reference

Manages levels. Used for switching between levels (maps). More...

#include <class.levelmanager.hh>

List of all members.

Public Member Functions

 CLevelManager (SDL_Surface *pTargetSurface)
 ~CLevelManager ()
void SetLevel (int iLevelID)
 Set the next level ID used for CheckAndSwitchLevel().
int SetLevelAndSwitch (int iLevelID)
 Set the next level ID and switch to it.
int CheckAndSwitchLevel ()
 Check if the level changed and switch to it.
int GetPreviousLevelID ()
 Get previous level ID.
int GetNextLevelID ()
 Get next level ID.

Public Attributes

SDL_Surface * mpTargetSurface
int miCurrentLevelID
int miNextLevelID


Detailed Description

Manages levels. Used for switching between levels (maps).

Constructor & Destructor Documentation

CLevelManager::CLevelManager ( SDL_Surface *  pTargetSurface  ) 

CLevelManager::~CLevelManager (  ) 


Member Function Documentation

void CLevelManager::SetLevel ( int  iLevelID  ) 

Set the next level ID used for CheckAndSwitchLevel().

int CLevelManager::SetLevelAndSwitch ( int  iLevelID  ) 

Set the next level ID and switch to it.

int CLevelManager::CheckAndSwitchLevel (  ) 

Check if the level changed and switch to it.

Remarks:
Possible return values: LVLMAN_SWITCHLEVEL_SUCCESS when a new level was set and the function succeeded to change the level. LVLMAN_SWITCHLEVEL_ERROR when a new level was set but the function failed to change the level. LVLMAN_SWITCHLEVEL_NOCHANGE when no new level was set.

int CLevelManager::GetPreviousLevelID (  ) 

Get previous level ID.

int CLevelManager::GetNextLevelID (  ) 

Get next level ID.


Member Data Documentation


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

Generated on Fri Feb 22 09:36:53 2008 for Mega Maryo by  doxygen 1.5.5