BgmapSprite Class Reference
#include <BgmapSprite.h>
![](../class_bgmap_sprite.png)
# Public Types | |
typedef const BgmapSpriteSpec | BgmapSpriteROMSpec |
# Public Member Functions | |
void | constructor (Entity owner, const BgmapSpriteSpec *bgmapSpriteSpec) |
override bool | onEvent (ListenerObject eventFirer, uint16 eventCode) |
override ClassPointer | getBasicType () |
override void | loadTexture (ClassPointer textureClass, bool listenForRewriting) |
override bool | hasSpecialEffects () |
override void | processEffects (int32 maximumParamTableRowsToComputePerCall) |
override int16 | doRender (int16 index) |
override void | setMultiframe (uint16 frame) |
override void | setRotation (const Rotation *rotation) |
override void | setScale (const PixelScale *scale) |
override int32 | getTotalPixels () |
void | configureTexture () |
Configure the sprite's texture. | |
void | setMode (uint16 display, uint16 mode) |
void | setParam (uint32 param) |
uint32 | getParam () |
int16 | getParamTableRow () |
void | invalidateParamTable () |
Force the rewrite of the sprite's param table during the next rendering cycle. | |
bool | onTextureRewritten (ListenerObject eventFirer) |
void | applyAffineTransformations () |
Start rewriting the sprite's param table for affine transformations. | |
void | applyHbiasEffects () |
Start rewriting the sprite's param table for hbias effects. |
# Protected Attributes | |
int16 | paramTableRow |
Offset that keeps track of where to continue writing in param table. | |
uint32 | param |
ParamTableEffectMethod | applyParamTableEffect |
Pointer to function that implements the param table based effects. | |
BgmapTextureSource | bgmapTextureSource |
Texture's configuration in BGMAP space. |
# Additional Inherited Members | |
![]() | |
typedef const SpriteSpec | SpriteROMSpec |
![]() | |
void | constructor (Entity owner, const SpriteSpec *spriteSpec) |
override void | releaseResources () |
Called to release the component's resources. | |
override RightBox | getRightBox () |
override void | createAnimationController () |
Create an animation controller for this sprite. | |
override void | forceChangeOfFrame (int16 actualFrame) |
void | transform () |
Compute the sprite's transformation. | |
int16 | render (int16 index, bool updateAnimation) |
Texture | getTexture () |
int16 | getIndex () |
uint16 | getHead () |
int32 | getHalfWidth () |
int32 | getHalfHeight () |
uint32 | getEffectiveHead () |
uint16 | getEffectiveWidth () |
uint16 | getEffectiveHeight () |
int16 | getEffectiveX () |
int16 | getEffectiveY () |
int16 | getEffectiveP () |
int16 | getEffectiveMX () |
int16 | getEffectiveMY () |
int16 | getEffectiveMP () |
bool | isVisible () |
bool | isHidden () |
bool | isBgmap () |
bool | isObject () |
bool | isAffine () |
bool | isHBias () |
void | setPosition (const PixelVector *position) |
const PixelVector * | getPosition () |
Retrieve the position cache. | |
void | setDisplacement (const PixelVector *displacement) |
const PixelVector * | getDisplacement () |
PixelVector | getDisplacedPosition () |
void | addChar (const Point *texturePoint, const uint32 *newChar) |
void | putChar (const Point *texturePoint, const uint32 *newChar) |
void | putPixel (const Point *texturePixel, const Pixel *charSetPixel, BYTE newPixelColor) |
void | invalidateRendering () |
Invalidate the flags that determine if the sprite requires rendering. | |
virtual void | releaseTexture () |
Release the sprite's texture(s) | |
virtual void | updateAnimation () |
Update the animation. | |
virtual void | forceShow () |
Forcefully show the sprite. | |
virtual void | forceHide () |
Forcefully hide the sprite. | |
virtual void | print (int32 x, int32 y) |
![]() | |
bool | checkIfWithinScreenSpace |
Flag to check if rendered even if outside the screen. | |
PixelVector | position |
Position cache. | |
PixelVector | displacement |
Displacement added to the sprite's position. | |
Rotation | rotation |
Rotation cache. | |
int16 | index |
PixelScale | scale |
Scale cache. | |
uint16 | head |
Head flags for DRAM entries. | |
int16 | halfWidth |
Cache of the texture's half width. | |
int16 | halfHeight |
Cache of the texture's half height. | |
Texture | texture |
Texture to display. | |
bool | hasTextures |
Flag for special sprites. |
# Detailed Description
Class BgmapSprite
Inherits from Sprite
Displays a texture that is allocated in BGMAP space.
Definition at line 72 of file BgmapSprite.h.
# Member Typedef Documentation
# BgmapSpriteROMSpec
typedef const BgmapSpriteSpec BgmapSpriteROMSpec |
A BgmapSprite spec that is stored in ROM
Definition at line 61 of file BgmapSprite.h.
# Member Function Documentation
# applyAffineTransformations()
void BgmapSprite::applyAffineTransformations | ( | ) |
Start rewriting the sprite's param table for affine transformations.
Definition at line 565 of file BgmapSprite.c.
# applyHbiasEffects()
void BgmapSprite::applyHbiasEffects | ( | ) |
Start rewriting the sprite's param table for hbias effects.
Definition at line 574 of file BgmapSprite.c.
# configureTexture()
void BgmapSprite::configureTexture | ( | ) |
Configure the sprite's texture.
Definition at line 457 of file BgmapSprite.c.
# constructor()
void BgmapSprite::constructor | ( | Entity | owner, |
const BgmapSpriteSpec * | bgmapSpriteSpec ) |
Class' constructor
- Parameters
-
owner Entity to which the sprite attaches to bgmapSpriteSpec Specification that determines how to configure the sprite
Definition at line 78 of file BgmapSprite.c.
# doRender()
Render the sprite by configuring the DRAM assigned to it by means of the provided index.
- Parameters
-
index Determines the region of DRAM that this sprite is allowed to configure
- Returns
- The index that determines the region of DRAM that this sprite manages
Implements Sprite.
Reimplemented in FrameBlendBgmapSprite, MBgmapSprite, and PrintingSprite.
Definition at line 186 of file BgmapSprite.c.
# getBasicType()
|
virtual |
Retrieve the basic class of this kind of sprite.
- Returns
- ClassPointer the basic class
Implements Sprite.
Definition at line 140 of file BgmapSprite.c.
# getParam()
uint32 BgmapSprite::getParam | ( | ) |
Retrieve the offset within param table space that determines the area where this sprite is allowed to write
- Returns
- Offset within param table space
Definition at line 535 of file BgmapSprite.c.
# getParamTableRow()
int16 BgmapSprite::getParamTableRow | ( | ) |
Retrieve the offset that keeps track of where to continue writing in param table
- Returns
- Offset within param table space
Definition at line 542 of file BgmapSprite.c.
# getTotalPixels()
|
virtual |
Retrieve the sprite's total number of pixels actually displayed.
- Returns
- Sprite's total number of pixels actually displayed
Implements Sprite.
Definition at line 445 of file BgmapSprite.c.
# hasSpecialEffects()
|
virtual |
Check if the sprite has affine or hbias effects.
- Returns
- True if the sprite's mode of display is (__WORLD_AFFINE or __WORLD_HBIAS)
Reimplemented from Sprite.
Definition at line 156 of file BgmapSprite.c.
# invalidateParamTable()
void BgmapSprite::invalidateParamTable | ( | ) |
Force the rewrite of the sprite's param table during the next rendering cycle.
Definition at line 549 of file BgmapSprite.c.
# loadTexture()
|
virtual |
Load a texture.
- Parameters
-
textureClass Class of the texture to load listenForRewriting If true, a listener is added for the texture's rewriting event
Reimplemented from Sprite.
Definition at line 147 of file BgmapSprite.c.
# onEvent()
|
virtual |
Process an event that the instance is listen for.
- Parameters
-
eventFirer ListenerObject that signals the event eventCode Code of the firing event
- Returns
- False if the listener has to be removed; true to keep it
Reimplemented from ListenerObject.
Definition at line 120 of file BgmapSprite.c.
# onTextureRewritten()
bool BgmapSprite::onTextureRewritten | ( | ListenerObject | eventFirer | ) |
Callback for when the sprite's texture is rewriten.
- Parameters
-
eventFirer The rewrite texture
- Returns
- True if the listener must be kept; false to remove after the current call
# processEffects()
|
virtual |
Process affine and hbias effects
- Parameters
-
maximumParamTableRowsToComputePerCall Used to defer param table computations (-1 to compute the whole table)
Reimplemented from Sprite.
Definition at line 163 of file BgmapSprite.c.
# setMode()
Configure the displays on which to show the sprite and how it will be displayed
- Parameters
-
display Displays on which to show the sprite (__WORLD_ON, __WORLD_LON or __WORLD_RON) mode The mode to use to display the sprite (__WORLD_BGMAP | __WORLD_AFFINE | __WORLD_HBIAS)
Definition at line 476 of file BgmapSprite.c.
# setMultiframe()
|
virtual |
Set the current multiframe
- Parameters
-
frame Current animation frame
Reimplemented from Sprite.
Reimplemented in MBgmapSprite.
Definition at line 295 of file BgmapSprite.c.
# setParam()
void BgmapSprite::setParam | ( | uint32 | param | ) |
Set the offset within param table space that determines the area where this sprite is allowed to write.
- Parameters
-
param Offset within param table space
Definition at line 525 of file BgmapSprite.c.
# setRotation()
|
virtual |
Set the sprite's rotation.
- Parameters
-
rotation Rotation to apply to the sprite
Reimplemented from Sprite.
Definition at line 323 of file BgmapSprite.c.
# setScale()
|
virtual |
Set the sprite's scale.
- Parameters
-
scale Scale to apply to the sprite
Reimplemented from Sprite.
Definition at line 370 of file BgmapSprite.c.
# Member Data Documentation
# applyParamTableEffect
|
protected |
Pointer to function that implements the param table based effects.
Definition at line 84 of file BgmapSprite.h.
# bgmapTextureSource
|
protected |
Texture's configuration in BGMAP space.
Definition at line 87 of file BgmapSprite.h.
# param
|
protected |
Offset within param table space that determines the area where this sprite is allowed to write
Definition at line 81 of file BgmapSprite.h.
# paramTableRow
|
protected |
Offset that keeps track of where to continue writing in param table.
Definition at line 77 of file BgmapSprite.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Component/VisualComponent/Sprite/BgmapSprite/BgmapSprite.h
- VUEngine-Core/source/Component/VisualComponent/Sprite/BgmapSprite/BgmapSprite.c