#include <Level2D.h>
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. | |
While player is is level mode, he can see number of lives, level number, timer, all displayed with 2D sprites.
| CLevel2D::CLevel2D | ( | ) |
Standard constructor.
| CLevel2D::~CLevel2D | ( | ) |
Standard destructor.
| 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.
| 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.
| 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 :) |
| void CLevel2D::OnLostDevice | ( | ) |
Its important to call this function BEFORE device is reset, like when switching to/from fullscreen mode.
| 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.
1.5.3