BgmapTextureManager Class Reference

#include <BgmapTextureManager.h>

Inheritance diagram for BgmapTextureManager:
Object

# Public Member Functions

void reset ()
 Reset the manager's state.
void clearDRAM ()
 Erase the contents of BGMAP memory space.
void updateTextures (int16 maximumTextureRowsToWrite, bool defer)
void clearBgmapSegment (int32 segment)
void configure (uint32 paramTableBase)
int8 getAvailableBgmapSegmentsForTextures ()
int8 getPrintingBgmapSegment ()
void loadTextures (const TextureSpec **textureSpecs, bool removeOldTextures)
BgmapTexture getTexture (BgmapTextureSpec *bgmapTextureSpec, int16 minimumSegment, bool mustLiveAtEvenSegment, uint32 scValue)
void releaseTexture (BgmapTexture bgmapTexture)
int16 getXOffset (int32 id)
int16 getYOffset (int32 id)

# Static Public Member Functions

static void print (int32 x, int32 y)

# Private Attributes

VirtualList bgmapTextures
uint16 usedTiles [__MAX_NUMBER_OF_BGMAPS_SEGMENTS]
 Used tiles per BGMAP segment.
int8 xOffset [__MAX_NUMBER_OF_BGMAPS_SEGMENTS][__NUM_BGMAPS_PER_SEGMENT]
 Start X coordinate of free space in each BGMAP segment.
int8 yOffset [__MAX_NUMBER_OF_BGMAPS_SEGMENTS][__NUM_BGMAPS_PER_SEGMENT]
 Start Y coordinate of free space in each BGMAP segment.
int8 offset [__MAX_NUMBER_OF_BGMAPS_SEGMENTS *__NUM_BGMAPS_PER_SEGMENT][4]
 Multidimensional array to keep track of the offsets for each allocated texture.
int8 availableBgmapSegmentsForTextures
 Number of available BGMAP segments for texture allocation.
int8 printingBgmapSegment
 BGMAP segment available for printing.
- Private Attributes inherited from Object
void * vTable
 Pointer to the class's virtual table.

# Additional Inherited Members

- Private Member Functions inherited from Object
void constructor ()
 Class' constructor.
const void * getVTable ()
bool mutateTo (const void *targetClass)
- Static Private Member Functions inherited from Object
static Object getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod)

# Detailed Description

Class BgmapTextureManager

Inherits from Texture

Allocates BGMAP space for textures.

Definition at line 49 of file BgmapTextureManager.h.

# Member Function Documentation

# clearBgmapSegment()

void BgmapTextureManager::clearBgmapSegment ( int32 segment)

Clear the data in the BGMAP spaced defined by the provided segment.

Parameters
segmentIndex of the BGMAP segment to clear

Definition at line 184 of file BgmapTextureManager.c.

# clearDRAM()

secure void BgmapTextureManager::clearDRAM ( )

Erase the contents of BGMAP memory space.

Definition at line 143 of file BgmapTextureManager.c.

# configure()

secure void BgmapTextureManager::configure ( uint32 paramTableBase)

Compute the number of available BGMAP segments for texture allocation.

Parameters
paramTableBaseDisplacement in bytes to keep track of the start address of param table space

Definition at line 191 of file BgmapTextureManager.c.

# getAvailableBgmapSegmentsForTextures()

int8 BgmapTextureManager::getAvailableBgmapSegmentsForTextures ( )

Retrieve the number of available BGMAP segments to allocate textures.

Returns
Number of available BGMAP segments to allocate textures

Definition at line 205 of file BgmapTextureManager.c.

# getPrintingBgmapSegment()

int8 BgmapTextureManager::getPrintingBgmapSegment ( )

Retrieve the number of the BGMAP segment available for printing.

Returns
Number of the BGMAP segment available for printing

Definition at line 212 of file BgmapTextureManager.c.

# getTexture()

secure BgmapTexture BgmapTextureManager::getTexture ( BgmapTextureSpec * bgmapTextureSpec,
int16 minimumSegment,
bool mustLiveAtEvenSegment,
uint32 scValue )

Retrieve a texture initialized with the provided spec.

Parameters
bgmapTextureSpecSpec to use to initilize the desired texture
minimumSegmentMinimum BGMAP segment where to allocate the texture
mustLiveAtEvenSegmentRequired BGMAP segment where to allocate the texture
scValueSC configuration value for multi segment textures
Returns
Texture initialized with the provided spec

Definition at line 300 of file BgmapTextureManager.c.

# getXOffset()

int16 BgmapTextureManager::getXOffset ( int32 id)

Retrieve the X coordinate in BGMAP space for the texture ID provided.

Parameters
idTexture's id
Returns
X coordinate in BGMAP space for the texture ID provided

Definition at line 376 of file BgmapTextureManager.c.

# getYOffset()

int16 BgmapTextureManager::getYOffset ( int32 id)

Retrieve the Y coordinate in BGMAP space for the texture ID provided.

Parameters
idTexture's id
Returns
Y coordinate in BGMAP space for the texture ID provided

Definition at line 383 of file BgmapTextureManager.c.

# loadTextures()

secure void BgmapTextureManager::loadTextures ( const TextureSpec ** textureSpecs,
bool removeOldTextures )

Load textures in function of the provided array of specs.

Parameters
textureSpecsArray of texture specs in function of which to load textures
removeOldTexturesIf true, previously loaded texturered are first destroyed and deallocated

Definition at line 219 of file BgmapTextureManager.c.

# print()

static void BgmapTextureManager::print ( int32 x,
int32 y )
static

Print the manager's status.

Parameters
xScreen x coordinate where to print
yScreen y coordinate where to print

Definition at line 41 of file BgmapTextureManager.c.

# releaseTexture()

secure void BgmapTextureManager::releaseTexture ( BgmapTexture bgmapTexture)

Release a texture.

Parameters
bgmapTextureTexture to release

Definition at line 366 of file BgmapTextureManager.c.

# reset()

secure void BgmapTextureManager::reset ( )

Reset the manager's state.

Definition at line 113 of file BgmapTextureManager.c.

# updateTextures()

secure void BgmapTextureManager::updateTextures ( int16 maximumTextureRowsToWrite,
bool defer )

Update texture pending rewriting of data in DRAM.

Parameters
maximumTextureRowsToWriteNumber of texture rows to write during this call
deferIf true, the texture data is written overtime; otherwise all is written in a single pass

Definition at line 162 of file BgmapTextureManager.c.

# Member Data Documentation

# availableBgmapSegmentsForTextures

int8 BgmapTextureManager::availableBgmapSegmentsForTextures
private

Number of available BGMAP segments for texture allocation.

Definition at line 67 of file BgmapTextureManager.h.

# bgmapTextures

VirtualList BgmapTextureManager::bgmapTextures
private

Definition at line 52 of file BgmapTextureManager.h.

# offset

int8 BgmapTextureManager::offset[__MAX_NUMBER_OF_BGMAPS_SEGMENTS *__NUM_BGMAPS_PER_SEGMENT][4]
private

Multidimensional array to keep track of the offsets for each allocated texture.

Definition at line 64 of file BgmapTextureManager.h.

# printingBgmapSegment

int8 BgmapTextureManager::printingBgmapSegment
private

BGMAP segment available for printing.

Definition at line 70 of file BgmapTextureManager.h.

# usedTiles

uint16 BgmapTextureManager::usedTiles[__MAX_NUMBER_OF_BGMAPS_SEGMENTS]
private

Used tiles per BGMAP segment.

Definition at line 55 of file BgmapTextureManager.h.

# xOffset

int8 BgmapTextureManager::xOffset[__MAX_NUMBER_OF_BGMAPS_SEGMENTS][__NUM_BGMAPS_PER_SEGMENT]
private

Start X coordinate of free space in each BGMAP segment.

Definition at line 58 of file BgmapTextureManager.h.

# yOffset

int8 BgmapTextureManager::yOffset[__MAX_NUMBER_OF_BGMAPS_SEGMENTS][__NUM_BGMAPS_PER_SEGMENT]
private

Start Y coordinate of free space in each BGMAP segment.

Definition at line 61 of file BgmapTextureManager.h.


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