2 #include "TileObject.h" 6 struct D3DXSpriteEntity;
17 #define SPRITE_HORIZONTAL_PLANE 0 20 #define SPRITE_Y_FACINGCAMERA 1 22 #define SPRITE_FREETRANSFORM 2 24 #define SPRITE_FACINGCAMERA 3 26 #define SPRITE_3D_SCREEN 4 35 #define SPRITE_RENDER_ALPHA 8 36 #define SPRITE_RENDER_ZBUFFER 16 38 #define SPRITE_RENDER_BATCH 32 61 virtual CBaseObject::_SceneObjectType GetType(){
return CBaseObject::SpriteObject;};
81 BOOL CheckSpriteStyleField(DWORD dwType){
82 if(dwType<=SPRITE_END1)
83 return (m_sprite_style&SPRITE_END1) == dwType;
85 return ((m_sprite_style & dwType)>0);};
103 double m_dTimeSinceLastUpdate;
110 m_dTimeSinceLastUpdate+=fTimeDelta;
111 if(m_dTimeSinceLastUpdate > m_dTimeInterval*m_num_frames)
114 m_dTimeSinceLastUpdate = 0;
116 else if(m_dTimeSinceLastUpdate > m_dTimeInterval)
118 m_nCurrentFrameOffset++;
119 m_dTimeSinceLastUpdate = 0;
122 if((m_nStartFrame+m_nCurrentFrameOffset) > m_nEndFrame)
127 m_nCurrentFrameOffset = m_nEndFrame;
138 FLOAT fWidth=1.0f, FLOAT fHeight=1.0f, DWORD sprite_style=0);
139 void SetRenderState(LPDIRECT3DDEVICE9 pd3dDevice);
140 void RestoreRenderState(LPDIRECT3DDEVICE9 pd3dDevice);
UINT m_nStartFrame
animation is looped between m_nStartFrame and m_nEndFrame
Definition: SpriteObject.h:93
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
DWORD m_sprite_style
see above macro definitions
Definition: SpriteObject.h:80
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
virtual AssetEntity * GetPrimaryAsset()
used as KEY for batch rendering
Definition: SpriteObject.h:135
RECT m_rcFirstImageRect
rect of the first image in the texture
Definition: SpriteObject.h:74
different physics engine has different winding order.
Definition: EventBinding.h:32
double m_dTimeInterval
the time to change to next frame
Definition: SpriteObject.h:100
Color m_colorkey
The ref transparent key.
Definition: SpriteObject.h:85
Definition: ManagedDef.h:18
UINT m_num_frames
how many frames are there.
Definition: SpriteObject.h:76
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
void AdvanceFrame(double fTimeDelta)
always loop between m_nStartFrame and m_nEndFrame(inclusive).
Definition: SpriteObject.h:106
bool m_bAnimate
whether to play animation
Definition: SpriteObject.h:98
HRESULT InitObject(D3DXSpriteEntity *pSprite, TextureEntity *ppTexture, Vector3 vPos, FLOAT fWidth=1.0f, FLOAT fHeight=1.0f, DWORD sprite_style=0)
– for init and delete
Definition: SpriteObject.cpp:168
UINT m_nCurrentFrameOffset
m_nStartFrame+m_nCurrentFrameOffset => current frame
Definition: SpriteObject.h:91
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
Matrix4 m_mxWorldMatrix
used in free transform style only to specify world tranform,it can be set by the user ...
Definition: SpriteObject.h:66
TextureEntity * m_ppTexture
texture
Definition: SpriteObject.h:72
Tile Object have position and bounding rect and can usually be attached to quad-tree terrain tile...
Definition: TileObject.h:10
bool m_bLoop
whether to loop the animation
Definition: SpriteObject.h:96
Definition: ParaColor.h:275
OBSOLETED Sprite object can either be used in the 3D space or 2D screen ordinates.
Definition: SpriteObject.h:58
D3DXSpriteEntity * m_pSprite
Sprite.
Definition: SpriteObject.h:68
FLOAT m_fWidth
size of the object in the world coordinates
Definition: SpriteObject.h:61
virtual HRESULT Draw(SceneState *sceneState)
– for rendering
Definition: SpriteObject.cpp:48
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25