ObjectSprite Class Reference
#include <ObjectSprite.h>
![](../class_object_sprite.png)
# Public Types | |
typedef const ObjectSpriteSpec | ObjectSpriteROMSpec |
# Public Member Functions | |
void | constructor (Entity owner, const ObjectSpriteSpec *objectSpriteSpec) |
override ClassPointer | getBasicType () |
override void | loadTexture (ClassPointer textureClass, bool listenForRewriting) |
override int16 | doRender (int16 index) |
override void | setMultiframe (uint16 frame) |
override void | setRotation (const Rotation *rotation) |
override int32 | getTotalPixels () |
void | resetTotalObjects () |
Force the computation of the number of OBJECTs that the sprite uses. | |
int16 | getTotalObjects () |
# Protected Attributes | |
int16 | totalObjects |
The number of OBJECTs that the sprite uses. | |
ObjectTextureSource | objectTextureSource |
Texture's displacement in the map array. | |
uint16 | fourthWordValue |
Cache the computed value for the 4th entry of OBJECTs. | |
uint8 | cols |
Cache of the number of cols for the sprite's texture. | |
uint8 | rows |
Cache of the number of cols for the sprite's texture. | |
int8 | xDisplacementIncrement |
Cache of the x displacamente used to flip horizontally the image. | |
int8 | yDisplacementIncrement |
Cache of the y displacamente used to flip vertically the image. | |
int8 | xDisplacementDelta |
int8 | yDisplacementDelta |
# 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 bool | hasSpecialEffects () |
virtual void | updateAnimation () |
Update the animation. | |
virtual void | processEffects (int32 maximumParamTableRowsToComputePerCall) |
virtual void | forceShow () |
Forcefully show the sprite. | |
virtual void | forceHide () |
Forcefully hide the sprite. | |
virtual void | setScale (const PixelScale *scale) |
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 ObjectSprite
Inherits from Sprite
Displays a texture in OBJECT space.
Definition at line 58 of file ObjectSprite.h.
# Member Typedef Documentation
# ObjectSpriteROMSpec
typedef const ObjectSpriteSpec ObjectSpriteROMSpec |
A ObjectSprite spec that is stored in ROM
Definition at line 47 of file ObjectSprite.h.
# Member Function Documentation
# constructor()
void ObjectSprite::constructor | ( | Entity | owner, |
const ObjectSpriteSpec * | objectSpriteSpec ) |
Class' constructor
- Parameters
-
owner Entity to which the sprite attaches to objectSpriteSpec Specification that determines how to configure the sprite
Definition at line 32 of file ObjectSprite.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 TextObjectSprite.
Definition at line 106 of file ObjectSprite.c.
# getBasicType()
|
virtual |
Retrieve the basic class of this kind of sprite.
- Returns
- ClassPointer the basic class
Implements Sprite.
Definition at line 85 of file ObjectSprite.c.
# getTotalObjects()
int16 ObjectSprite::getTotalObjects | ( | ) |
Retrieve the number of OBJECTs that the sprite uses.
- Returns
- Number of OBJECTs that the sprite uses
Definition at line 266 of file ObjectSprite.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 242 of file ObjectSprite.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 92 of file ObjectSprite.c.
# resetTotalObjects()
void ObjectSprite::resetTotalObjects | ( | ) |
Force the computation of the number of OBJECTs that the sprite uses.
Definition at line 254 of file ObjectSprite.c.
# setMultiframe()
|
virtual |
Set the current multiframe.
- Parameters
-
frame Current animation frame
Reimplemented from Sprite.
Definition at line 176 of file ObjectSprite.c.
# setRotation()
|
virtual |
Set the sprite's rotation.
- Parameters
-
rotation Rotation to apply to the sprite
Reimplemented from Sprite.
Definition at line 183 of file ObjectSprite.c.
# Member Data Documentation
# cols
|
protected |
Cache of the number of cols for the sprite's texture.
Definition at line 74 of file ObjectSprite.h.
# fourthWordValue
|
protected |
Cache the computed value for the 4th entry of OBJECTs.
Definition at line 71 of file ObjectSprite.h.
# objectTextureSource
|
protected |
Texture's displacement in the map array.
Definition at line 66 of file ObjectSprite.h.
# rows
|
protected |
Cache of the number of cols for the sprite's texture.
Definition at line 77 of file ObjectSprite.h.
# totalObjects
|
protected |
The number of OBJECTs that the sprite uses.
Definition at line 63 of file ObjectSprite.h.
# xDisplacementDelta
|
protected |
Cache of a displacement that is necessary to flip images horizontally while keeping their center at the same position on the screen
Definition at line 87 of file ObjectSprite.h.
# xDisplacementIncrement
|
protected |
Cache of the x displacamente used to flip horizontally the image.
Definition at line 80 of file ObjectSprite.h.
# yDisplacementDelta
|
protected |
Cache of a displacement that is necessary to flip images vertically while keeping their center at the same position on the screen
Definition at line 91 of file ObjectSprite.h.
# yDisplacementIncrement
|
protected |
Cache of the y displacamente used to flip vertically the image.
Definition at line 83 of file ObjectSprite.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Component/VisualComponent/Sprite/ObjectSprite/ObjectSprite.h
- VUEngine-Core/source/Component/VisualComponent/Sprite/ObjectSprite/ObjectSprite.c