/* ==================================================================== * ÆÄ ÀÏ : InputSystem.h * ¸ñ Àû : I/O(¸¶¿ì½º, Űº¸µå)¿¡ ´ëÇÑ °ü¸® * ÀÛ ¼º ÀÚ : À̹ý¼® * ÀÛ ¼º ÀÏ : 2006.01 * ÁÖÀÇ»çÇ× : * =================================================================== */ #pragma once #include "MouseAgent.h" #include "KeyboardAgent.h" class cInputSystem { static cInputSystem* mpSingleton; public: cInputSystem(); virtual ~cInputSystem(); /// ÃʱâÈ­ ¹× Á¾·á bool Init( NiInstanceRef hi, NiWindowRef hwnd ); void Exit(); /// 󸮺Πvoid Process( unsigned long deltaTime ); /// ½ºÅ×ÀÌÁö º¯°æÀ» ÇÒ °æ¿ì ±âÁ¸ ÀÎDz Á¤º¸¸¦ ¸ðµÎ Á¦°ÅÇÑ´Ù. void InputInfoClearAll(); void KeyInfoClear(); /// Window Message Parser( ¸®ÅϰªÀÌ falseÀÎ °æ¿ì DefaultWndProc󸮸¦ ÇÏÁö ¾Ê°í ³Ñ¾î°£´Ù ) bool WindowMessageParser( HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam ); /// ¸¶¿ì½º °ü¸®ÀÚ È¹µæ inline cMouseAgent* GetMouse() { return &mMouse; } /// Űº¸µå °ü¸®ÀÚ È¹µæ inline cKeyboardAgent* GetKeyboard() { return &mKeyboard; } protected: bool UseMouseEventByUIMgr(); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cInputSystem* GetSingleton(); protected: /// DX Input Æ÷ÀÎÅÍ LPDIRECTINPUT8 mpDI; /// ¸¶¿ì½º °ü¸® cMouseAgent mMouse; /// Űº¸µå °ü¸® cKeyboardAgent mKeyboard; }; inline cInputSystem* cInputSystem::GetSingleton() { return mpSingleton; } #define INPUTSYS cInputSystem::GetSingleton() #define MOUSE INPUTSYS->GetMouse() #define KEYBOARD INPUTSYS->GetKeyboard()