home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / game / game.hpp < prev   
Encoding:
C/C++ Source or Header  |  1993-07-09  |  1.5 KB  |  74 lines

  1. #ifndef _GAME_HPP
  2. #define _GAME_HPP
  3.  
  4. // ------------------------------------------------------------------
  5. // File:        GAME.HPP
  6. // Path:        ...\REHACK\GAME\GAME.HPP
  7. // Version:        0.01
  8. // Author:        Pat Reilly
  9. // CIS Id:        71333,2764
  10. // Created On:    6/28/93
  11. // Modified On:
  12. // Description:    Game class for REHACK. See GAME.TXT for
  13. //                more details.
  14. // Tabs:        4
  15. // ------------------------------------------------------------------
  16.  
  17. #ifndef _WINDOW_HPP
  18. #include "..\WINDOW\WINDOW.HPP"
  19. #endif
  20.  
  21. #ifndef _EVENTQ_HPP
  22. #include "..\EVENT\EVENTQ.HPP"
  23. #endif
  24.  
  25. #ifndef _MOUSE_HPP
  26. #include "..\EVENT\MOUSE.HPP"
  27. #endif
  28.  
  29. #ifndef _KEYBOARD_CPP
  30. #include "..\event\keyboard.hpp"
  31. #endif
  32.  
  33. typedef Visible* (*VisMaker)(Rect);
  34.  
  35. class GameInit
  36. {
  37. public:
  38.  
  39.     GameInit(VisMaker, VisMaker, VisMaker, VisMaker, VisMaker);
  40.  
  41.     VisMaker closeUpMaker;
  42.     VisMaker autoMapMaker;
  43.     VisMaker buttonsMaker;
  44.     VisMaker characterMaker;
  45.     VisMaker messageMaker;
  46. };
  47.  
  48. class Game : public Window, virtual public GameInit
  49. {
  50. public:
  51.  
  52.     Game(const Rect&);
  53.     virtual ~Game();
  54.  
  55.     virtual void get(Event&);
  56.     virtual void handle(Event&);
  57.     virtual void idle();
  58.  
  59.     static bool sendMessage(Visible*, word type, word id, void* info);
  60.  
  61.     static EventQueue eventQueue;
  62.     static Mouse mouse;
  63.     static Keyboard keyboard;
  64.  
  65.     static Game* game;
  66.     static Visible* closeUp;
  67.     static Visible* autoMap;
  68.     static Visible* buttons;
  69.     static Visible* character;
  70.     static Visible* message;
  71. };
  72.  
  73. #endif    // _GAME_HPP
  74.