# Sprite Class Reference

`#include <Sprite.h>`

Inheritance diagram for Sprite:

List of all members.

## Public Member Functions
| Sprite (const SpriteID &id)
| ~Sprite ()
void | InitFromFile (char *filename)
void | Draw (const unsigned int &x, const unsigned int &y, unsigned int frame=0)
void | Shutdown ()
SpriteID | GetID ()
unsigned int | GetNumFrames ()
unsigned int | GetWidth ()
unsigned int | GetHeight ()
ColourRGB | GetColour ()
## Protected Member Functions
void | WritePixel (SDL_Surface *surface, int x, int y, const ColourRGB &colour)
## Protected Attributes
unsigned int | m_numFrames
unsigned int | m_width
unsigned int | m_height
SDL_Surface * | m_pFrames
ColourRGB | m_colour
SpriteID | m_ID

## Detailed Description

Definition at line 8 of file Sprite.h.

## Constructor & Destructor Documentation

Sprite::Sprite | ( | const SpriteID & | id | ) |

Definition at line 11 of file Sprite.cpp.

Sprite::~Sprite | ( |  | ) |

Definition at line 16 of file Sprite.cpp.

## Member Function Documentation

void Sprite::Draw | ( | const unsigned int & | x,
|  | const unsigned int & | y,
|  | unsigned int | frame = `0` |
| ) |  |  |

Definition at line 26 of file Sprite.cpp.

ColourRGB Sprite::GetColour | ( |  | ) | `[inline]`

Definition at line 23 of file Sprite.h.

unsigned int Sprite::GetHeight | ( |  | ) | `[inline]`

Definition at line 22 of file Sprite.h.

SpriteID Sprite::GetID | ( |  | ) | `[inline]`

Definition at line 18 of file Sprite.h.

unsigned int Sprite::GetNumFrames | ( |  | ) | `[inline]`

Definition at line 20 of file Sprite.h.

unsigned int Sprite::GetWidth | ( |  | ) | `[inline]`

Definition at line 21 of file Sprite.h.

void Sprite::InitFromFile | ( | char * | filename | ) |

Definition at line 21 of file Sprite.cpp.

void Sprite::Shutdown | ( |  | ) |

Definition at line 33 of file Sprite.cpp.

void Sprite::WritePixel | ( | SDL_Surface * | surface,
|  | int | x,
|  | int | y,
|  | const ColourRGB & | colour |
| ) |  |  | `[protected]`

Definition at line 39 of file Sprite.cpp.

## Member Data Documentation

ColourRGB Sprite::m_colour`[protected]`

Definition at line 30 of file Sprite.h.

unsigned int Sprite::m_height`[protected]`

Definition at line 28 of file Sprite.h.

SpriteID Sprite::m_ID`[protected]`

Definition at line 31 of file Sprite.h.

unsigned int Sprite::m_numFrames`[protected]`

Definition at line 28 of file Sprite.h.

SDL_Surface* Sprite::m_pFrames`[protected]`

Definition at line 29 of file Sprite.h.

unsigned int Sprite::m_width`[protected]`

Definition at line 28 of file Sprite.h.

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

- C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Sprite.h
- C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Sprite.cpp