gedi::DynABO Class Reference

#include <ABO.h>

Inherits gedi::ABO.

Inherited by gedi::FontABO, gedi::PreciseABO, and gedi::TileABO.

Inheritance diagram for gedi::DynABO:

[legend]
Collaboration diagram for gedi::DynABO:
[legend]
List of all members.

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)

Detailed Description

This class extends the base ABO class with "dynamic" (double entendre) features.

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.


Member Function Documentation

gedi::Bool32 gedi::DynABO::IsPower2 ( gedi::UInt32  iSize  )  [protected]

Return true if number is a power of 2, namely, 2^n

Parameters:
iSize Value to test.
Returns:
gedi::True if iSize == 2^n, gedi::False otherwise.

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}

Parameters:
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.

Parameters:
pkRawImage Pointer to an RGBA image.

void gedi::DynABO::SetCurrentFrame ( gedi::UInt32  iFrame  ) 

Sets the frame number.

Parameters:
iFrame Frame number.

gedi::UInt32 gedi::DynABO::GetColorKey (  )  [inline]

Return the color key as specified in the descriptor file.

Returns:
Color key value.

string& gedi::DynABO::GetTextureName (  )  [inline]

Return the texture file name.

Returns:
The texture file name.


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