home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
particles.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-01-22
|
1KB
|
55 lines
#ifndef _PARTICLES_H_
#define _PARTICLES_H_
//-----------------------------------
//CUSTOMVERTEX
//------------------------------------
struct CUSTOMVERTEXPARTICLE
{
D3DXVECTOR3 pos;
D3DCOLOR color;
FLOAT tu, tv;
};
//CUSTOMVERTEXT
#define D3DFVF_CUSTOMVERTEXPARTICLE (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
//------------------------------------------------------------------
// Name: PARTICLE CLASS
// Desc: **************
//------------------------------------------------------------------
class PARTICLE
{
private:
//partile
CUSTOMVERTEXPARTICLE *Vertex; //vertexy do ktorych sa uklada
LPDIRECT3DTEXTURE9 *g_pTexture; //textura
LPDIRECT3DVERTEXBUFFER9 g_pVB; //vertex buffer
int *TextureID; //id textury
int ActParticle; //aktualny partice
int ActVertex; //aktualny vertex pri budovani particlov
int MaxParticles;
int MaxFrames;
public:
PARTICLE();
~PARTICLE();
void Initialize(int MParticles,int MFrames);
void AddFrame(int FrameID,char *FileName,COLOR ColorKey);
void RenderParticle(VECTOR3D Pos,COLOR Color,float Size,float Rotation,float Frame);
void RenderParticleSprite(VECTOR3D Pos,VECTOR3D Normal,COLOR Color,float Size,float Frame);
void Render();
};
#endif // _PARTICLES_H_