KbdManager.h
上传用户:royluo
上传日期:2007-01-05
资源大小:1584k
文件大小:2k
源码类别:

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   KbdManager.h
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Module description: Handles the setting of the tanks keyboard controls.
  11. *                       
  12. *                                                                             
  13. *   Authors: Eran Yariv - 28484475                                           
  14. *            Moshe Zur  - 24070856                                           
  15. *                                                                            
  16. *                                                                            
  17. *   Date: 23/09/98                                                           
  18. *                                                                            
  19. ******************************************************************************/
  20. #ifndef _KBD_MANAGER_H_
  21. #define _KBD_MANAGER_H_
  22. #include <ManouverSet.h>
  23. #include <KeysTable.h>
  24. class CKbdManager
  25. {
  26. public:
  27.     CKbdManager();
  28.     ~CKbdManager();
  29.     
  30.     void SetKbdMapping (void);  // Launch the dialog to let the user set key mappings
  31.     void SetManouverSet(CManouverSet *pManouverSet);
  32.     void InitKeysTable();       // Read settings from registry / game consts
  33.     void RefreshManouverSet(); // Called after local tank received the current
  34.                                 // manouver set, to unset keys when window is no longer in
  35.                                 // focus.
  36.     
  37.     BOOL SetKey(UINT);
  38.     BOOL UnsetKey(UINT);
  39.     
  40. private:
  41.     CManouverSet *m_pManouverSet;
  42.     CKeysTable m_Keys;   // Holds the virtual code for every manouver
  43. };
  44. #include "KbdManager.inl"
  45. #endif