// DInput9Mgr.h: interface for the CDInput9Mgr class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_) #define AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include #include "Caldron.h" #include "./LogMgr.h" /* ********************************************************************* * CDInput9Mgr * ÆÄÀÏ : DInput8Mgr.h * ±â´É : Caldron Engine³» Direct Input9 À» ÀÌ¿ëÇÑ input Ű, mouse ó¸® class * ÀÛ¼ºÀÏ : 2003.10.31 * history : wizardbug ( 2003.10.31) ********************************************************************** */ namespace Caldron { namespace Base { enum DINPUT8DEVICES { DINPUT8_KEYBOARD, DINPUT8_MOUSE, }; enum DINPUT8MOUSEBUTTON // Mouse Input { MOUSE_LBUTTON, MOUSE_RBUTTON, MOUSE_BUTTONNUMS, }; enum DINPUT8MOUSEAXIS // Mouse Move Axis { MOUSE_XAXIS, MOUSE_YAXIS, MOUSE_AXISNUMS, }; class CDInput8Mgr { protected: LPDIRECTINPUT8 m_lpDirectInput; LPDIRECTINPUTDEVICE8 m_lpKeyboardDevice; static LPDIRECTINPUTDEVICE8 m_lpMouseDevice; static DIMOUSESTATE m_MouseState; static int m_iMouseMove[MOUSE_AXISNUMS]; static char m_strKeys[256]; static char m_strBackKeys[256]; static int ms_iLockKey; public: CDInput8Mgr(); ~CDInput8Mgr(); HRESULT InitInputMgr(HINSTANCE ,HWND ,DWORD dwKeyboard = DISCL_FOREGROUND,DWORD dwMouse = DISCL_FOREGROUND); HRESULT Acquire(); HRESULT Unacquire(); HRESULT Update(); static bool PushButton(int ,int iKey = -1); static bool UpButton(int ,int iKey = -1); static bool PushOnceKey(int ,int iKey = -1); static bool PushKey(int ,int iKey = -1); static bool UpKey(int ,int iKey = -1); static bool KeyStrok(char *strBuffer,int &iPos); static void GetMouseMove(int &iX,int &iY ,int iKey = -1); static void Lock(const int &iKey) { ms_iLockKey = iKey;} static void Unlock() { ms_iLockKey = -1;} }; } }; #endif // !defined(AFX_DINPUT9MGR_H__7F904814_C54A_42A0_A3F0_43B3EC33364B__INCLUDED_)