- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# CSheep Class Reference

Sheep class. More...

`#include <Sheep.h>`

Collaboration diagram for CSheep:

[legend]

List of all members.

## Public Member Functions
| CSheep ()
| Standard constructor.
| CSheep (CXFileEntity *model)
| Extended constructor. Takes preloaded skinned model to avoid multiple loading for many sheep.
| ~CSheep ()
| Standard destructor.
bool | Init (HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, IDirectSound8 *pDS)
| Init function loads skinned model (CXFileEntity) and sheep 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 sheep (position, facing, etc..).
void | PlaySoundMove ()
| Play sound when pushing sheep.
void | PlaySoundDeath ()
| Play sound when sheep dies.

## Detailed Description

Sheep class.

CSheep holds animated skinned mesh instance of a sheep, adding sound and behaviour to it. Sheep are passive game actors, they just stand until being pushed or taken by dwarfs.

Author:
  Petar Bajic

Date:
  January, 16 2007.

## Constructor & Destructor Documentation

CSheep::CSheep | ( |  | ) |

Standard constructor.

Author:
  Petar Bajic

Date:
  January, 16 2007.

CSheep::CSheep | ( | CXFileEntity * | model | ) |

Extended constructor. Takes preloaded skinned model to avoid multiple loading for many sheep.

Author:
  Petar Bajic

Date:
  January, 16 2007.

CSheep::~CSheep | ( |  | ) |

Standard destructor.

Author:
  Petar Bajic

Date:
  January, 16 2007.

## Member Function Documentation

bool CSheep::Init | ( | HWND | hWnd,
|  | LPDIRECT3DDEVICE9 | pd3dDevice,
|  | IDirectSound8 * | pDS |
| ) |  |  |

Init function loads skinned model (CXFileEntity) and sheep specific sounds.

Author:
  Petar Bajic

Date:
  January, 16 2007.

bool CSheep::InitSounds | ( | HWND | hWnd,
|  | IDirectSound8 * | pDS |
| ) |  |  |

Create sounds for dwarf instance.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CSheep::OnFrameMove | ( | LPDIRECT3DDEVICE9 | pd3dDevice,
|  | float | fElapsedTime,
|  | D3DXMATRIXA16 * | matWorld |
| ) |  |  |

Move animated model.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CSheep::OnRender | ( | LPDIRECT3DDEVICE9 | pd3dDevice | ) |

Render skinned model.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CSheep::Restart | ( |  | ) |

Restart sheep (position, facing, etc..).

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CSheep::PlaySoundMove | ( |  | ) |

Play sound when pushing sheep.

Author:
  Petar Bajic

Date:
  January, 16 2007.

void CSheep::PlaySoundDeath | ( |  | ) |

Play sound when sheep dies.

Author:
  Petar Bajic

Date:
  January, 16 2007.

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

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