BgmapTextureManager Class Reference
#include <BgmapTextureManager.h>
![](../class_bgmap_texture_manager.png)
# 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. | |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
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
-
segment Index 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
-
paramTableBase Displacement 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
-
bgmapTextureSpec Spec to use to initilize the desired texture minimumSegment Minimum BGMAP segment where to allocate the texture mustLiveAtEvenSegment Required BGMAP segment where to allocate the texture scValue SC configuration value for multi segment textures
- Returns
- Texture initialized with the provided spec
Definition at line 300 of file BgmapTextureManager.c.
# getXOffset()
Retrieve the X coordinate in BGMAP space for the texture ID provided.
- Parameters
-
id Texture's id
- Returns
- X coordinate in BGMAP space for the texture ID provided
Definition at line 376 of file BgmapTextureManager.c.
# getYOffset()
Retrieve the Y coordinate in BGMAP space for the texture ID provided.
- Parameters
-
id Texture'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
-
textureSpecs Array of texture specs in function of which to load textures removeOldTextures If true, previously loaded texturered are first destroyed and deallocated
Definition at line 219 of file BgmapTextureManager.c.
# print()
Print the manager's status.
- Parameters
-
x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 41 of file BgmapTextureManager.c.
# releaseTexture()
secure void BgmapTextureManager::releaseTexture | ( | BgmapTexture | bgmapTexture | ) |
Release a texture.
- Parameters
-
bgmapTexture Texture 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()
Update texture pending rewriting of data in DRAM.
- Parameters
-
maximumTextureRowsToWrite Number of texture rows to write during this call defer If 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
|
private |
Number of available BGMAP segments for texture allocation.
Definition at line 67 of file BgmapTextureManager.h.
# bgmapTextures
|
private |
Definition at line 52 of file BgmapTextureManager.h.
# offset
|
private |
Multidimensional array to keep track of the offsets for each allocated texture.
Definition at line 64 of file BgmapTextureManager.h.
# printingBgmapSegment
|
private |
BGMAP segment available for printing.
Definition at line 70 of file BgmapTextureManager.h.
# usedTiles
|
private |
Used tiles per BGMAP segment.
Definition at line 55 of file BgmapTextureManager.h.
# xOffset
|
private |
Start X coordinate of free space in each BGMAP segment.
Definition at line 58 of file BgmapTextureManager.h.
# yOffset
|
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:
- VUEngine-Core/source/Component/VisualComponent/Sprite/Texture/BgmapTexture/BgmapTextureManager.h
- VUEngine-Core/source/Component/VisualComponent/Sprite/Texture/BgmapTexture/BgmapTextureManager.c