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

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   ManouverSet.inl
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Contents: Inline functions implementations.
  11. *                                                                             
  12. *   Authors: Eran Yariv - 28484475                                           
  13. *            Moshe Zur  - 24070856                                           
  14. *                                                                            
  15. *                                                                            
  16. *   Date: 23/09/98                                                           
  17. *                                                                            
  18. ******************************************************************************/
  19. inline
  20. CManouverSet::CManouverSet () : 
  21.     m_uManouverSet(0)                          // Clear set
  22.     {}
  23. inline
  24. CManouverSet::~CManouverSet ()
  25.     {}
  26. inline void 
  27. CManouverSet::SetAll (BYTE NewManouverSet) 
  28.     m_uManouverSet = BYTE(NewManouverSet & BYTE(MANOUVER_SET_MASK));    // Mask input to retain bounds
  29. }
  30. inline BYTE
  31. CManouverSet::GetAll()
  32. {
  33.     return m_uManouverSet;
  34. }
  35.     
  36. inline void 
  37. CManouverSet::Clear ()
  38. {
  39.     m_uManouverSet = 0;
  40. }
  41. inline void
  42. CManouverSet::UnsetBit(UINT uInd)
  43. {
  44.     UINT uMask = ~(1 << uInd);
  45.     m_uManouverSet &= uMask;
  46. }