BitmapStrip Class Reference
[Graphics]
Collection of Bitmaps (used for animation).
More...
Public Member Functions | |
| BitmapStrip () | |
| BitmapStrip (const Asset &asset) | |
| BitmapStrip (const Image &image) | |
| BitmapStrip (const Bitmap *bitmap) | |
| ~BitmapStrip () | |
| int | GetCelCount () const |
| const Bitmap & | GetCel (int index) const |
| operator const Bitmap & () const | |
Detailed Description
Collection of Bitmaps (used for animation).A bitmap strip is a collection of individual Bitmaps which are meant to be used together to form an animation sequence. A bitmap strip can either be loaded directly from a binary asset as created with the PixiePCT utility, or created from an image containing one or more cels.
Definition at line 27 of file BitmapStrip.h.
Constructor & Destructor Documentation
| BitmapStrip::BitmapStrip | ( | ) |
Definition at line 18 of file BitmapStrip.cpp.
| BitmapStrip::BitmapStrip | ( | const Asset & | asset | ) |
Creates a bitmap strip from a binary .rle file created by the Palettizer tool. This is a fast way of creating a bitmap strip, as the data in an .rle file is organized so that it can mostly just be read straight into memory with very little additional operations.
- Parameters:
-
asset Asset to create the bitmap strip from.
Definition at line 25 of file BitmapStrip.cpp.
| BitmapStrip::BitmapStrip | ( | const Image & | image | ) |
Creates a bitmap strip from an image with one or more cels. This is a slow way of creating a bitmap strip, as the data is copied several times and the image might also need to be palettized before becoming an RLE, but it can still be useful to use this method during development. Before you ship your game, you should definitely change everything over to use RLEs though, as this will practically eliminate loading times.
- Parameters:
-
image Image to create the bitmap strip from
Definition at line 260 of file BitmapStrip.cpp.
| BitmapStrip::BitmapStrip | ( | const Bitmap * | bitmap | ) |
Definition at line 284 of file BitmapStrip.cpp.
| BitmapStrip::~BitmapStrip | ( | ) |
Destructor
Definition at line 292 of file BitmapStrip.cpp.
Member Function Documentation
| int BitmapStrip::GetCelCount | ( | ) | const |
Get the number of cels in this bitmap strip
- Returns:
- Number of cels in the strip
Definition at line 324 of file BitmapStrip.cpp.
| const Bitmap & BitmapStrip::GetCel | ( | int | index | ) | const |
Get the cel at the specified index of of the bitmap strip
- Returns:
- The specified cel
- Parameters:
-
index Index of cel to get, in the range 0 to GetCelCount()-1
Definition at line 304 of file BitmapStrip.cpp.
| BitmapStrip::operator const Bitmap & | ( | ) | const |
Definition at line 332 of file BitmapStrip.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
