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

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   AmmoStatus.h
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Module description: Interface of the CAmmoStatus class.
  11. *                       
  12. *                                                                             
  13. *   Authors: Eran Yariv - 28484475                                           
  14. *            Moshe Zur  - 24070856                                           
  15. *                                                                            
  16. *                                                                            
  17. *   Date: 23/09/98                                                           
  18. *                                                                            
  19. ******************************************************************************/
  20. #if !defined(AFX_AMMOSTATUS_H__B239E761_E897_11D1_9738_A0C11B38D128__INCLUDED_)
  21. #define AFX_AMMOSTATUS_H__B239E761_E897_11D1_9738_A0C11B38D128__INCLUDED_
  22. #if _MSC_VER >= 1000
  23. #pragma once
  24. #endif // _MSC_VER >= 1000
  25. // AmmoStatus.h : header file
  26. //
  27. #include <DIB.h>
  28. #include <GameConsts.h>
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CAmmoStatus window
  31. class CAmmoStatus : public CButton
  32. {
  33. // Construction
  34. public:
  35. CAmmoStatus();
  36.     void Create ();
  37. virtual ~CAmmoStatus() {}
  38.     void SetShellsCount (UINT);
  39.     void SetBulletsCount (UINT);
  40.     void SetMinesCount (UINT);
  41.     
  42.     CDIB *GetImage ();
  43. private:
  44.     void WriteNumber (UINT u, UINT x, UINT y);
  45.     UINT m_uPrevShellsCount,
  46.          m_uCurShellsCount,
  47.          m_uPrevBulletsCount,
  48.          m_uCurBulletsCount,
  49.          m_uPrevMinesCount,
  50.          m_uCurMinesCount,
  51.          m_uShellIconYPos,
  52.          m_uBulletIconYPos,
  53.          m_uMineIconYPos;
  54.     CDIB m_DIB,
  55.          m_DIBDigits;
  56. // Generated message map functions
  57. protected:
  58. //{{AFX_MSG(CAmmoStatus)
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. };
  62. #endif // !defined(AFX_AMMOSTATUS_H__B239E761_E897_11D1_9738_A0C11B38D128__INCLUDED_)