#include <ABO.h>
Inherits gedi::ABO.
Inherited by gedi::FontABO, gedi::PreciseABO, and gedi::TileABO.
Inheritance diagram for gedi::DynABO:
Public Member Functions | |
void | LoadFromFile (LPSTR lpszFilename) |
void | SetRawImage (gedi::DynRGBAImage *pkRawImage) |
void | SetCurrentFrame (gedi::UInt32 iFrame) |
gedi::UInt32 | GetColorKey () |
string & | GetTextureName () |
Protected Member Functions | |
gedi::Bool32 | IsPower2 (gedi::UInt32 iSize) |
This class differs from the base ABO in a couple of significant ways. First, it uses the nouveau-style of ABO descriptor file that has the field labels in it. Secondly, it can "dynamically" update the image.
gedi::Bool32 gedi::DynABO::IsPower2 | ( | gedi::UInt32 | iSize | ) | [protected] |
Return true if number is a power of 2, namely, 2^n
iSize | Value to test. |
void gedi::DynABO::LoadFromFile | ( | LPSTR | lpszFilename | ) |
Load animation from descriptor file. Overrides base, gedi::ABO, method.
The keywords and syntax of the descripter file are as follows:
Line 1: ImageFile [bitmap|targa] {file-path}
Line 2: ColorKey {Red} {Green} {Blue}
Line 3: CellSize {width} {height}
Line 4: Animations {n}
Line 5: Frames {k0}
Line 6: Cell {X0} {Y0}
Line 7: Cell {X1} {Y1} Line 8: ...
Line 5+k0: Cell {Xk-1} {Yk-1}
lpszFilename | Descriptor file which references the 2D image. |
Reimplemented from gedi::ABO.
Reimplemented in gedi::PreciseABO.
void gedi::DynABO::SetRawImage | ( | gedi::DynRGBAImage * | pkRawImage | ) |
Set a new RGBA image in the ABO.
pkRawImage | Pointer to an RGBA image. |
void gedi::DynABO::SetCurrentFrame | ( | gedi::UInt32 | iFrame | ) |
Sets the frame number.
iFrame | Frame number. |
gedi::UInt32 gedi::DynABO::GetColorKey | ( | ) | [inline] |
Return the color key as specified in the descriptor file.
string& gedi::DynABO::GetTextureName | ( | ) | [inline] |
Return the texture file name.