#include <Sprite.h>
Class Sprite
Inherits from VisualComponent
Displays a Texture on the screen.
Definition at line 124 of file Sprite.h.
# SpriteROMSpec
# addChar()
void Sprite::addChar |
( |
const Point * | texturePoint, |
|
|
const uint32 * | newChar ) |
Add the color provided color data to a CHAR in the sprite's texture.
- Parameters
-
texturePoint | Coordinate in texture's space of the CHAR to replace |
newChar | Color data array for the CHAR |
Definition at line 580 of file Sprite.c.
# constructor()
Class' constructor
- Parameters
-
owner | Entity to which the sprite attaches to |
spriteSpec | Specification that determines how to configure the sprite |
Definition at line 57 of file Sprite.c.
# createAnimationController()
void Sprite::createAnimationController |
( |
| ) |
|
|
virtual |
# doRender()
# forceChangeOfFrame()
void Sprite::forceChangeOfFrame |
( |
int16 | actualFrame | ) |
|
|
virtual |
Force the change of frame according to each child class' implementation.
- Parameters
-
actualFrame | The frame of the playing animation to skip to |
Reimplemented from VisualComponent.
Definition at line 190 of file Sprite.c.
# forceHide()
void Sprite::forceHide |
( |
| ) |
|
|
virtual |
Forcefully hide the sprite.
Definition at line 686 of file Sprite.c.
# forceShow()
void Sprite::forceShow |
( |
| ) |
|
|
virtual |
Forcefully show the sprite.
Definition at line 677 of file Sprite.c.
# getBasicType()
# getDisplacedPosition()
Retrieve the cached position plus the position displacement.
- Returns
- Cached position plus the position displacement
Definition at line 565 of file Sprite.c.
# getDisplacement()
Retrieve the position displacement.
- Returns
- Displacement added to the sprite's position
Definition at line 558 of file Sprite.c.
# getEffectiveHead()
uint32 Sprite::getEffectiveHead |
( |
| ) |
|
Retrieve the head flags written in the DRAM entries determined by index.
- Returns
- Head flags written to DRAM entries
Definition at line 371 of file Sprite.c.
# getEffectiveHeight()
uint16 Sprite::getEffectiveHeight |
( |
| ) |
|
Retrieve the height written in the DRAM entries determined by index.
- Returns
- Height written to DRAM entries
Definition at line 397 of file Sprite.c.
# getEffectiveMP()
int16 Sprite::getEffectiveMP |
( |
| ) |
|
Retrieve the MP value written in the DRAM entries determined by index.
- Returns
- MP value written to DRAM entries
Definition at line 475 of file Sprite.c.
# getEffectiveMX()
int16 Sprite::getEffectiveMX |
( |
| ) |
|
Retrieve the MX coordinate written in the DRAM entries determined by index.
- Returns
- MX coordinate written to DRAM entries
Definition at line 449 of file Sprite.c.
# getEffectiveMY()
int16 Sprite::getEffectiveMY |
( |
| ) |
|
Retrieve the MY coordinate written in the DRAM entries determined by index.
- Returns
- MY coordinate written to DRAM entries
Definition at line 462 of file Sprite.c.
# getEffectiveP()
int16 Sprite::getEffectiveP |
( |
| ) |
|
Retrieve the P value written in the DRAM entries determined by index.
- Returns
- P value written to DRAM entries
Definition at line 436 of file Sprite.c.
# getEffectiveWidth()
uint16 Sprite::getEffectiveWidth |
( |
| ) |
|
Retrieve the weight written in the DRAM entries determined by index.
- Returns
- Weight written to DRAM entries
Definition at line 384 of file Sprite.c.
# getEffectiveX()
int16 Sprite::getEffectiveX |
( |
| ) |
|
Retrieve the X coordinate written in the DRAM entries determined by index.
- Returns
- X coordinate written to DRAM entries
Definition at line 410 of file Sprite.c.
# getEffectiveY()
int16 Sprite::getEffectiveY |
( |
| ) |
|
Retrieve the Y coordinate written in the DRAM entries determined by index.
- Returns
- Y coordinate written to DRAM entries
Definition at line 423 of file Sprite.c.
# getHalfHeight()
int32 Sprite::getHalfHeight |
( |
| ) |
|
Retrieve the sprite's texture's half height.
- Returns
- Sprite's texture's half height
Definition at line 364 of file Sprite.c.
# getHalfWidth()
int32 Sprite::getHalfWidth |
( |
| ) |
|
Retrieve the sprite's texture's half weight.
- Returns
- Sprite's texture's half weight
Definition at line 357 of file Sprite.c.
# getHead()
Retrieve the head flags for DRAM entries.
- Returns
- Head flags for DRAM entries
Definition at line 350 of file Sprite.c.
# getIndex()
int16 Sprite::getIndex |
( |
| ) |
|
Retrieve the index that determines the region of DRAM that this sprite configured
- Returns
- The index that determines the region of DRAM that this sprite manages
Definition at line 343 of file Sprite.c.
# getPosition()
Retrieve the position cache.
Definition at line 543 of file Sprite.c.
# getRightBox()
Retrieve the sprite's bounding box.
- Returns
- Bounding box of the mesh
Reimplemented from Component.
Definition at line 127 of file Sprite.c.
# getTexture()
Retrieve the sprite's texture.
- Returns
- Texture displayed by the sprite
Definition at line 336 of file Sprite.c.
# getTotalPixels()
virtual int32 Sprite::getTotalPixels |
( |
| ) |
|
|
pure virtual |
# hasSpecialEffects()
bool Sprite::hasSpecialEffects |
( |
| ) |
|
|
virtual |
Check if the sprite has special effects.
- Returns
- True if the sprite has special effects
Reimplemented in BgmapSprite.
Definition at line 646 of file Sprite.c.
# invalidateRendering()
void Sprite::invalidateRendering |
( |
| ) |
|
Invalidate the flags that determine if the sprite requires rendering.
Definition at line 638 of file Sprite.c.
# isAffine()
bool Sprite::isAffine |
( |
| ) |
|
Check if the sprite displays a texture in AFFINE mode.
- Returns
- True if the sprite displays a texture in AFFINE mode; false otherwise
Definition at line 516 of file Sprite.c.
# isBgmap()
Check if the sprite displays a texture in BGMAP mode.
- Returns
- True if the sprite displays a texture in BGMAP mode; false otherwise
Definition at line 502 of file Sprite.c.
# isHBias()
Check if the sprite displays a texture in HBIAS mode.
- Returns
- True if the sprite displays a texture in HBIAS mode; false otherwise
Definition at line 523 of file Sprite.c.
# isHidden()
bool Sprite::isHidden |
( |
| ) |
|
Check if the sprite is hidden.
- Returns
- True if the sprite is hidden; false otherwise
Definition at line 495 of file Sprite.c.
# isObject()
bool Sprite::isObject |
( |
| ) |
|
Check if the sprite displays a texture in OBJECT mode.
- Returns
- True if the sprite displays a texture in OBJECT mode; false otherwise
Definition at line 509 of file Sprite.c.
# isVisible()
bool Sprite::isVisible |
( |
| ) |
|
Check if the sprite is visible.
- Returns
- True if the sprite is visible; false otherwise
Definition at line 488 of file Sprite.c.
# loadTexture()
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 in BgmapSprite, and ObjectSprite.
Definition at line 616 of file Sprite.c.
# print()
Print the sprite's properties.
- Parameters
-
x | Screen x coordinate where to print |
y | Screen y coordinate where to print |
Definition at line 721 of file Sprite.c.
# processEffects()
void Sprite::processEffects |
( |
int32 | maximumParamTableRowsToComputePerCall | ) |
|
|
virtual |
Process special effects.
- Parameters
-
maximumParamTableRowsToComputePerCall | Used to defer param table computations (-1 to compute the whole table) |
Reimplemented in BgmapSprite.
Definition at line 667 of file Sprite.c.
# putChar()
void Sprite::putChar |
( |
const Point * | texturePoint, |
|
|
const uint32 * | newChar ) |
Replace a CHAR in the sprite's texture.
- Parameters
-
texturePoint | Coordinate in texture's space of the CHAR to replace |
newChar | Color data array for the CHAR |
Definition at line 592 of file Sprite.c.
# putPixel()
void Sprite::putPixel |
( |
const Point * | texturePixel, |
|
|
const Pixel * | charSetPixel, |
|
|
BYTE | newPixelColor ) |
Replace a pixel in the sprite's texture.
- Parameters
-
texturePixel | Coordinate in texture's space of the CHAR to replace |
charSetPixel | Coordinate in CHAR space of the CHAR to replace |
newPixelColor | Color data array for the CHAR |
Definition at line 604 of file Sprite.c.
# releaseResources()
void Sprite::releaseResources |
( |
| ) |
|
|
virtual |
Called to release the component's resources.
Reimplemented from Component.
Definition at line 103 of file Sprite.c.
# releaseTexture()
void Sprite::releaseTexture |
( |
| ) |
|
|
virtual |
# render()
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 |
updateAnimation | If false, animations are not updated |
- Returns
- The index that determines the region of DRAM that this sprite manages
Definition at line 294 of file Sprite.c.
# setDisplacement()
void Sprite::setDisplacement |
( |
const PixelVector * | displacement | ) |
|
Set the position displacement.
- Parameters
-
displacement | Displacement added to the sprite's position |
Definition at line 550 of file Sprite.c.
# setMultiframe()
void Sprite::setMultiframe |
( |
uint16 | frame | ) |
|
|
virtual |
# setPosition()
void Sprite::setPosition |
( |
const PixelVector * | position | ) |
|
Set the position cache.
- Parameters
-
position | Position cache to save |
Definition at line 530 of file Sprite.c.
# setRotation()
void Sprite::setRotation |
( |
const Rotation * | rotation | ) |
|
|
virtual |
# setScale()
# transform()
void Sprite::transform |
( |
| ) |
|
|
inline |
Compute the sprite's transformation.
Definition at line 201 of file Sprite.c.
# updateAnimation()
void Sprite::updateAnimation |
( |
| ) |
|
|
virtual |
Update the animation.
Definition at line 653 of file Sprite.c.
# checkIfWithinScreenSpace
bool Sprite::checkIfWithinScreenSpace |
|
protected |
Flag to check if rendered even if outside the screen.
Definition at line 129 of file Sprite.h.
# displacement
Displacement added to the sprite's position.
Definition at line 135 of file Sprite.h.
# halfHeight
Cache of the texture's half height.
Definition at line 154 of file Sprite.h.
# halfWidth
Cache of the texture's half width.
Definition at line 151 of file Sprite.h.
# hasTextures
Flag for special sprites.
Definition at line 160 of file Sprite.h.
# head
Head flags for DRAM entries.
Definition at line 148 of file Sprite.h.
# index
Index of the block in DRAM that the sprite configures to display its texture
Definition at line 142 of file Sprite.h.
# position
Position cache.
Definition at line 132 of file Sprite.h.
# rotation
# scale
# texture
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Component/VisualComponent/Sprite/Sprite.h
- VUEngine-Core/source/Component/VisualComponent/Sprite/Sprite.c