home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
messerschmitt.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-16
|
4KB
|
154 lines
//===============================================================
#ifndef _MESSERSCHMITT_H_
#define _MESSERSCHMITT_H_
//===============================================================
//nepriatelske lietadlo
//rychlos¥
#define MesserSchmitt_Speed 10.5f
//kolizne a gulometove body
#define MesserSchmitt_Left Get3D(-40.0f,0.0f,0.0f)
#define MesserSchmitt_Right Get3D(40.0f,0.0f,0.0f)
#define MesserSchmitt_Up Get3D(0.0f,6.0f,0.0f)
#define MesserSchmitt_Down Get3D(0.0f,-6.0f,0.0f)
#define MesserSchmitt_Front Get3D(0.0f,0.0f,20.0f)
#define MesserSchmitt_Back Get3D(0.0f,0.0f,-43.0f)
#define MesserSchmitt_BulletLeft Get3D(-15.0f,-5.0f,0.0f)
#define MesserSchmitt_BulletRight Get3D(15.0f,-5.0f,0.0f)
//pozicia vrtule
#define MesserSchmitt_VrtulaPoint Get3D(0.0f,2.0f,20.0f)
//frekvencia strielania
#define MesserSchmitt_BulletFreq 130.0f
//hlasitost zvuku
#define MesserSchmitt_SoundScale 125.0f
//kedy po zostreleni zmizne
#define MesserSchmitt_DestroyTime 15000.0f
//Ai mody
#define MesserSchmitt_SledovanieMaxTime 12000.0f
#define MesserSchmitt_VyhybanieMaxTime 500.0f
#define MesserSchmitt_UhybanieMaxTime 3500.0f
//advanced mode - Mode 1
#define MesserSchmitt_AdSteerZ1 0.008f //vodorovne
#define MesserSchmitt_AdSteerZ2 0.028f //vodorovne - rychlo
#define MesserSchmitt_AdSteerZ3 0.07f //vodorovne - velmy rychlo - pri uhybani
#define MesserSchmitt_AdSteerX1 0.007f //vertikalne
#define MesserSchmitt_AdSteerX2 0.02f //vertikalne - rychlo
#define MesserSchmitt_AdSteerX3 0.05f //vertikalne - velmy rychlo - pri uhybani
#define MesserSchmitt_AdMaxSteerZ 1.0f //maximalny zatocenie vodorovne
#define MesserSchmitt_AdMaxSteerX 1.0f //maximalne zatocenie vertikalne
//benginer mode - Mode 0
#define MesserSchmitt_BeSteerZ1 0.003f //vodorovne
#define MesserSchmitt_BeSteerZ2 0.01f //vodorovne - rychlo
#define MesserSchmitt_BeSteerZ3 0.03f //vodorovne - velmy rychlo - pri uhybani
#define MesserSchmitt_BeSteerX1 0.003f //vertikalne
#define MesserSchmitt_BeSteerX2 0.01f //vertikalne - rychlo
#define MesserSchmitt_BeSteerX3 0.05f //vertikalne - velmy rychlo - pri uhybani
#define MesserSchmitt_BeMaxSteerZ 0.6f //maximalny zatocenie vodorovne
#define MesserSchmitt_BeMaxSteerX 1.0f //maximalne zatocenie vertikalne
//--------------------------------------------------------------
// Name: MESSERSCHMITT class
// Desc: nemecke nepriatelske lietadlo Messerschmitt
//--------------------------------------------------------------
class MESSERSCHMITT
{
private:
//zisti koliziu zeme
bool GetGroundCollision();
//zvuk
SOUND Sound;
bool SoundPlay;
//AI
void ProcessSledovanie();
void ProcessVyhybanie();
void ProcessUhybanie();
public:
//vlastnosti
int Life;
//aktivacia
bool Active;
float ActiveTime;
//mod umelej inteligencie
int Mode;
//premenne Ai
float SteerZ1;
float SteerZ2;
float SteerZ3;
float SteerX1;
float SteerX2;
float SteerX3;
float MaxSteerZ;
float MaxSteerX;
//m≤dy
bool NormalMode;
bool CrazyMode;
bool DestroyedMode;
//AI mody
bool Sledovanie; //utocny mod
bool Vyhybanie; //vyhnutie sa zemi
bool Uhybanie; //ked dostal zasah tak sa uhne
float AITime;
//vrtula
float VrtulaRotation;
VECTOR3D PV;
//pozicia a matica
VECTOR3D Pos;
VECTOR3D Rot;
D3DXMATRIX Matrix;
//kolizne body
VECTOR3D PL,PR,PU,PD,PF,PB ;
//AI
VECTOR3D SpitFirePoint;
float Distance;
//strely
BULLETSYSTEM Bullet;
VECTOR3D BL,BR;
float BulletTime;
//zastav zvuk
void StopSound();
//inicializacia
void Initialize();
//system
void Reset();
//refresh & render
void Refresh();
//kolizia s lietadlom
bool CollisionDetail(VECTOR3D P1, VECTOR3D P2);
bool CollisionBox(VECTOR3D P1, VECTOR3D P2);
};
//===============================================================
#endif //_MESSERSCHMITT_H_