#include <Dwarf.h>

Public Member Functions | |
| CDwarf () | |
| Standard constructor. | |
| CDwarf (CXFileEntity *model) | |
| Extended constructor. Takes preloaded skinned model to avoid multiple loading for many dwarfs. | |
| ~CDwarf () | |
| Standard destructor. | |
| bool | Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, IDirectSound8 *pDS) |
| Init function loads skinned model (CXFileEntity) and dwarf specific sounds. | |
| bool | InitSounds (HWND hWnd, IDirectSound8 *pDS) |
| Create sounds for dwarf instance. | |
| void | OnFrameMove (LPDIRECT3DDEVICE9 pd3dDevice, float fElapsedTime, D3DXMATRIXA16 *matWorld) |
| Move animated model. | |
| void | OnRender (LPDIRECT3DDEVICE9 pd3dDevice) |
| Render skinned model. | |
| void | Restart () |
| Restart dwarf (position, facing, etc..). | |
| void | StartPickAnim () |
| Dwarf goes into picking animation. | |
| void | GetInTheGame () |
| Places dwarf on the field and directs him toward closest sheep. | |
| void | DieOut () |
| Dwarf dies and dissapears. Reset his attribute for new appearance. | |
| void | Move (float chunk, double fTime) |
| While OnFrameMove animates dwarf in place, this function moves him arround depending on his condition. If dwarf is hit, he flies and dies. | |
| void | SnatchSheep () |
| Snatch sheep changes dwarf animation, direction of moving, and attaches sheep to this dwarf. | |
| void | PlaySoundRikoshetDying () |
| Play sound of dying dwarf when he flies up in the air. | |
| void | PlaySoundBouncingDying () |
| Play sound of dying dwarf when he drops down to the ground bouncing. | |
CDwarf holds animated skinned mesh instance of a dwarf, adding sound and behaviour to it. Dwarfs move toward sheep and they are trying to snatch them.
| CDwarf::CDwarf | ( | ) |
Standard constructor.
| CDwarf::CDwarf | ( | CXFileEntity * | model | ) |
Extended constructor. Takes preloaded skinned model to avoid multiple loading for many dwarfs.
| CDwarf::~CDwarf | ( | ) |
Standard destructor.
| bool CDwarf::Init | ( | HWND | hWnd, | |
| LPDIRECT3DDEVICE9 | pd3dDevice, | |||
| IDirectSound8 * | pDS | |||
| ) |
| bool CDwarf::InitSounds | ( | HWND | hWnd, | |
| IDirectSound8 * | pDS | |||
| ) |
Create sounds for dwarf instance.
| void CDwarf::OnFrameMove | ( | LPDIRECT3DDEVICE9 | pd3dDevice, | |
| float | fElapsedTime, | |||
| D3DXMATRIXA16 * | matWorld | |||
| ) |
Move animated model.
| void CDwarf::OnRender | ( | LPDIRECT3DDEVICE9 | pd3dDevice | ) |
Render skinned model.
| void CDwarf::Restart | ( | ) |
Restart dwarf (position, facing, etc..).
| void CDwarf::StartPickAnim | ( | ) |
Dwarf goes into picking animation.
| void CDwarf::GetInTheGame | ( | ) |
Places dwarf on the field and directs him toward closest sheep.
| void CDwarf::DieOut | ( | ) |
Dwarf dies and dissapears. Reset his attribute for new appearance.
| void CDwarf::Move | ( | float | chunk, | |
| double | fTime | |||
| ) |
While OnFrameMove animates dwarf in place, this function moves him arround depending on his condition. If dwarf is hit, he flies and dies.
| void CDwarf::SnatchSheep | ( | ) |
Snatch sheep changes dwarf animation, direction of moving, and attaches sheep to this dwarf.
| void CDwarf::PlaySoundRikoshetDying | ( | ) |
Play sound of dying dwarf when he flies up in the air.
| void CDwarf::PlaySoundBouncingDying | ( | ) |
Play sound of dying dwarf when he drops down to the ground bouncing.
1.5.3