home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
engine.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-03
|
2KB
|
111 lines
#ifndef _ENGINE_H_
#define _ENGINE_H_
//---------------------------------------------------------------------
//Globalne PremennΘ
//---------------------------------------------------------------------
//DIRECTX
extern LPDIRECT3D9 g_pD3D ;
extern LPDIRECT3DDEVICE9 g_pd3dDevice;
//WINDOWS
extern HWND hWnd;
extern HINSTANCE hIns;
//MATICA
extern D3DXMATRIXA16 matProj; //matica projekcie
//--------------------------------------------------------------------
// Name: Engine Class
// Desc: ************
//--------------------------------------------------------------------
class ENGINE
{
private:
public:
int Height; //vyska obrazovky
int Width; //Üirka obrazovky
bool Windowed; //flag pre mod okna
D3DFORMAT Format; //format obrazovky
D3DFORMAT TextureFormat; //format textur
D3DPOOL TextureCreatingFlag; //flag vytvorenia textur
float Min; //minimalnu vzdialenost ktoru zobrazuje
float Max; //maximalnu vzdialenost ktoru zobrazuje
COLOR BackColor; //farba pozadia
D3DVIEWPORT9 Viewport; //Viewport ktory engine pouziva
//
//Features
//
bool StencilShadows;
//
//funkcie pre nastavenie vlastnosti
//
void SetFilter (int Stage, D3DTEXTUREFILTERTYPE Filter);
void SetCullMode (D3DCULL Cull);
void SetZBuffer (bool Activate);
void SetAlphaTest (bool Activate);
void SetZwrite (bool Activate);
void SetStencil (bool Activate);
void SetShadeMode (D3DSHADEMODE Shade);
void SetFillMode (D3DFILLMODE Fill);
void SetMipMapping (int Stage,bool Activate);
int MipMapLevels; //pocet mipmaplevelov
//
//funkcie pre nastavenie bledningu
//
void SetBlendNone();
void SetBlendOne();
void SetBlendTrans();
void SetBlendCustom(D3DBLEND Src, D3DBLEND Dest);
//
//svetla
//
void SetLighting(bool Activate);
void SetSpecular(bool Activate);
//
//Hmla
//
void SetFog(bool Activate);
void SetupFog(COLOR Color,float Destiny);
//
//Vseobecne
//
void ResetToDefault();
void SetProjection();
void Initialize();
void CleanUp();
void BeginScene();
void EndScene();
};
#endif //_ENGINE_H_