SAGE
A Simple Academic Game Engine
Loading...
Searching...
No Matches
Sage::CSpriteDesc Class Reference

The base sprite descriptor. More...

#include <SageSpriteDesc.h>

Inheritance diagram for Sage::CSpriteDesc:

Public Member Functions

 CSpriteDesc ()
 Constructor.
 
 CSpriteDesc (UINT, float=0)
 Constructor.
 

Public Attributes

UINT m_nSpriteIndex = 0
 Sprite index.
 
UINT m_nCurrentFrame = 0
 Current animation frame.
 
float m_fXScale = 1.0f
 Horizontal scale.
 
float m_fYScale = 1.0f
 Vertical scale.
 
float m_fRoll = 0.0f
 Z-axis rotation.
 
XMFLOAT4 m_f4Tint = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f)
 Color tint.
 
float m_fAlpha = 1.0f
 Alpha, 0 for transparent, 1 for opaque.
 

Detailed Description

Describes the sprite draw parameters shared by 2D and 3D sprites, even the obscure ones that aren't used very often (such as alpha and tint).

Constructor & Destructor Documentation

◆ CSpriteDesc() [1/2]

CSpriteDesc::CSpriteDesc ( )

Default constructor.

Here is the caller graph for this function:

◆ CSpriteDesc() [2/2]

CSpriteDesc::CSpriteDesc ( UINT n,
float a = 0 )

Constructor.

Parameters
nSprite index.
aInitial roll angle.