home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / Chip_2002-05_cd1.bin / chplus / cpp / 3 / hra.exe / swatmain.h < prev   
C/C++ Source or Header  |  1998-02-09  |  3KB  |  78 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #ifndef swatH
  7. #define swatH
  8. //---------------------------------------------------------------------------
  9. #include <Forms.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <Controls.hpp>
  12. #include <Classes.hpp>
  13. #include <Menus.hpp>
  14. #include <StdCtrls.hpp>
  15. //---------------------------------------------------------------------------
  16.  
  17. struct THole {
  18.   int  Time;
  19.   bool Dead;
  20. };
  21.  
  22. class TSwatForm : public TForm
  23. {
  24. __published:
  25.     TImage *Image1;
  26.     TMainMenu *MainMenu1;
  27.     TMenuItem *Gamr1;
  28.     TMenuItem *New1;
  29.     TMenuItem *Options1;
  30.     TMenuItem *Stop1;
  31.     TMenuItem *Pause1;
  32.     TMenuItem *About1;
  33.     TTimer *Timer1;
  34.     TImage *GameOverImage;
  35.     TLabel *TimeLabel;
  36.     TLabel *MissLabel;
  37.     TLabel *HitsLabel;
  38.     TLabel *EscapedLabel;
  39.     TLabel *ScoreLabel;
  40.     void __fastcall FormCreate(TObject *Sender);
  41.     void __fastcall TimerTick(TObject *Sender);
  42.     void __fastcall DisplayAbout(TObject *Sender);
  43.     void __fastcall New1Click(TObject *Sender);
  44.     void __fastcall Stop1Click(TObject *Sender);
  45.     void __fastcall Pause1Click(TObject *Sender);
  46.     
  47.     void __fastcall Options1Click(TObject *Sender);
  48.     
  49.     void __fastcall WriteScore(void);
  50.     void __fastcall FormDestroy(TObject *Sender);
  51.     void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
  52.     TShiftState Shift, int X, int Y);
  53.     void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button,
  54.     TShiftState Shift, int X, int Y);
  55. private:        // private user declarations
  56.     int         Score, LiveTime, Frequence, GameTime;
  57.     int         Hits, Miss, Escaped;
  58.     bool        IsGameOver, IsPause;
  59.     Graphics::TBitmap*    Live;
  60.     Graphics::TBitmap*    Dead;
  61.     THole       HoleInfo[5];
  62. public:         // public user declarations
  63.     virtual __fastcall TSwatForm(TComponent* Owner);
  64. friend class TOptionsDlg;
  65. };
  66. //---------------------------------------------------------------------------
  67. extern TSwatForm *SwatForm;
  68. //---------------------------------------------------------------------------
  69. const int crMaletUp    = 5;
  70. const int crMaletDown  = 6;
  71.  
  72. const int MissedPoints  = -2;
  73. const int HitPoints     = 5;
  74. const int MissedCritter = -1;
  75. const int CritterSize   = 72;
  76. const int TimerId       = 1;
  77. #endif
  78.