home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
bullets.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-09-28
|
2KB
|
72 lines
//==============================================================
#ifndef _BULLETS_H_
#define _BULLETS_H_
//==============================================================
//zasobnik striel
//------------------
//Bullet
//------------------
struct BULLET
{
VECTOR3D Pos;
VECTOR3D Sme;
bool Active;
};
//---------------------------------------------------
//CUSTOMVERTEXBULLET
//---------------------------------------------------
struct CUSTOMVERTEXBULLET
{
D3DXVECTOR3 pos; // pozicia
D3DCOLOR color; // farba
};
#define D3DFVF_CUSTOMVERTEXBULLET (D3DFVF_XYZ|D3DFVF_DIFFUSE)
#define Bullet_MaxBullets 75
#define Bullet_Speed 70.0f
#define Bullet_Size 70.0f
#define Bullet_Power 15
//--------------------------------------------------------------
// Name: Bullet System class
// Desc: praca s lietajucimi gulkami
//--------------------------------------------------------------
class BULLETSYSTEM
{
private:
//vertex buffer
LPDIRECT3DVERTEXBUFFER9 VertexBuffer;
//vseobecna koliza zo vsetkimi objektami
bool Collision(VECTOR3D P1, VECTOR3D P2);
public:
//gulky
BULLET Bullet[Bullet_MaxBullets];
int ActBullet;
//flagy
bool Friendly;
bool UnFriendly;
//zakladne funckie
void Initialize();
void Reset();
void Refresh();
void SpawnBullet(VECTOR3D Pos,VECTOR3D Rot);
//destruktor
~BULLETSYSTEM();
};
//==============================================================
#endif //_BULLETS_H_