home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / flying-6.11 / keeper.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-30  |  1.3 KB  |  71 lines

  1. #ifndef _keeper_h
  2. #define _keeper_h
  3.  
  4. #ifndef _real_h
  5. #    include "real.h"
  6. #endif
  7.  
  8. class Ball;
  9. class Wall;
  10.  
  11.  
  12. class Keeper {
  13.     public:
  14.         Keeper(const Real &size_int, const Real &frame_in, ColorId frame_col, ColorId table_col);
  15.         virtual ~Keeper();
  16.  
  17.         virtual void Draw() = 0;
  18.  
  19.         void TakeOffBoard(Ball *b);
  20.  
  21.         static int IsOffBoard(Ball *b);
  22.         static Ball *GetBack(Ball *b);
  23.  
  24.     protected:
  25.         virtual void PlaceOffBoard(Ball *b) = 0;
  26.  
  27.         int        off_count;
  28.         ColorId    frame_col;
  29.         ColorId    table_col;
  30.         Real        size;            // Hoehe oder Breite
  31.         Real        frame;        // Breite des Rahmens
  32. };
  33.  
  34.  
  35. #define    UPPER_FLAG        0x01
  36. #define    CLOSE_LEFT        0x02
  37. #define    CLOSE_RIGHT        0x04
  38.  
  39. class LineKeeper : public Keeper {
  40.     public:
  41.         LineKeeper(const Real &height, const Real &frame, ColorId frame_col, ColorId table_col=0, int mode=CLOSE_LEFT);
  42.         virtual ~LineKeeper();
  43.         virtual void Draw();
  44.  
  45.     protected:
  46.         virtual void PlaceOffBoard(Ball *b);
  47.         int mode;
  48.  
  49.         Wall    *wall1,*wall2;
  50. };
  51.  
  52.  
  53. #define    LEFT_FLAG        0x01
  54. #define    CLOSE_TOP        0x02
  55. #define    CLOSE_BOT        0x04
  56.  
  57. class StackKeeper : public Keeper {
  58.     public:
  59.         StackKeeper(const Real &width, const Real &frame, ColorId frame_col, ColorId table_col=0, int mode=CLOSE_BOT);
  60.         virtual ~StackKeeper();
  61.         virtual void Draw();
  62.  
  63.     protected:
  64.         virtual void PlaceOffBoard(Ball *b);
  65.         int mode;
  66.  
  67.         Wall    *wall1, *wall2;
  68. };
  69.  
  70. #endif
  71.