- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# CLevel2D Class Reference

Level helper class for drawing 2D interface. More...

`#include <Level2D.h>`

List of all members.

## Public Member Functions
| CLevel2D ()
| Standard constructor.
| ~CLevel2D ()
| Standard destructor.
bool | Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight)
| Creates sprite and fonts and loads all 2d images to be drawn as GUI.
void | Render (LPDIRECT3DDEVICE9 pd3dDevice, bool finish, int outcome, float elapsedTime, int counter, bool doubleFlower, bool harmlessFlower, int level, int lives, int countdown, bool paused, CLanguage *language)
| Render function draws remaining lives icon and number, level number, various dialogs that pop-up during game, ... everything 2D in game level is rendered here.
void | OnLostDevice ()
| Its important to call this function BEFORE device is reset, like when switching to/from fullscreen mode.
void | OnResetDevice (LPDIRECT3DDEVICE9 pd3dDevice, int screenWidth, int screenHeight)
| Its important to call this function AFTER device is reset, like when switching to/from fullscreen mode.

## Detailed Description

Level helper class for drawing 2D interface.

While player is is level mode, he can see number of lives, level number, timer, all displayed with 2D sprites.

Author:
  Petar Bajic

Date:
  January, 16 2007.

## Constructor & Destructor Documentation

CLevel2D::CLevel2D | ( |  | ) |

Standard constructor.

Author:
  Petar Bajic

Date:
  January, 16 2007.

CLevel2D::~CLevel2D | ( |  | ) |

Standard destructor.

Author:
  Petar Bajic

Date:
  January, 16 2007.

## Member Function Documentation

bool CLevel2D::Init | ( | HWND | hWnd,
|  | LPDIRECT3DDEVICE9 | pd3dDevice,
|  | int | screenWidth,
|  | int | screenHeight |
| ) |  |  |

Creates sprite and fonts and loads all 2d images to be drawn as GUI.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CLevel2D::Render | ( | LPDIRECT3DDEVICE9 | pd3dDevice,
|  | bool | finish,
|  | int | outcome,
|  | float | elapsedTime,
|  | int | framerate,
|  | bool | doubleFlower,
|  | bool | harmlessFlower,
|  | int | level,
|  | int | lives,
|  | int | countdown,
|  | bool | paused,
|  | CLanguage * | language |
| ) |  |  |

Render function draws remaining lives icon and number, level number, various dialogs that pop-up during game, ... everything 2D in game level is rendered here.

Parameters:

  | harmlessFlower | if true, flower icon is rendered
  | doubleFlower | if true, flower icon is rendered
  | elapsedTime | there is no OnFrameMove function here, so everything is moved on Render :)

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CLevel2D::OnLostDevice | ( |  | ) |

Its important to call this function BEFORE device is reset, like when switching to/from fullscreen mode.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CLevel2D::OnResetDevice | ( | LPDIRECT3DDEVICE9 | pd3dDevice,
|  | int | screenWidth,
|  | int | screenHeight |
| ) |  |  |

Its important to call this function AFTER device is reset, like when switching to/from fullscreen mode.

Author:
  Petar Bajic

Date:
  January, 16 2007.

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

- My Documents/TS2/inc/Level2D.h
- My Documents/TS2/src/Level2D.cpp