home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
input.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-16
|
1KB
|
61 lines
#ifndef _INPUT_H_
#define _INPUT_H_
#define KEYDOWN(name, key) (name[key] & 0x100)
//--------------------------------------------------------------------
// Name: INPUT Class
// Desc: ************
//--------------------------------------------------------------------
class INPUT
{
private:
LPDIRECTINPUT8 m_pDirectInput;
LPDIRECTINPUTDEVICE8 m_pKeyboard;
LPDIRECTINPUTDEVICE8 m_pMouse;
LPDIRECTINPUTDEVICE8 m_pJoystick;
public:
//konstruktor
INPUT();
//klavesnica
char KeyDown[256];
bool KeyDOWN[256];
bool KeyPRESS[256];
//mys
bool MouseLeftDown;
bool MouseRightDown;
bool MouseLeftPress;
bool MouseRightPress;
VECTOR3D Mouse;
VECTOR3D MouseRelative;
//joystick
bool JoyButton1Down;
bool JoyButton2Down;
float JoyX;
float JoyY;
//inicializacia
void Initialize();
//odstranenie z pamati
void CleanUp();
//ziska hodnoty z klavesnice alebo mysi
void RefreshKeyboard();
void RefreshMouse();
void RefreshJoystick();
};
#endif //_INPUT_H_