Advertisement
ToastyStoemp

Pong Header File by Wolf Van Herreweghe

Sep 12th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.24 KB | None | 0 0
  1. //-----------------------------------------------------------------
  2. // Game File
  3. // C++ Source - Pong.h - version v2_12 jan 2013
  4. // Copyright Kevin Hoefman - kevin.hoefman@howest.be
  5. // http://www.digitalartsandentertainment.be/
  6. //-----------------------------------------------------------------
  7.  
  8. //-----------------------------------------------------------------
  9. // Student data
  10. // Name: Wolf Van Herreweghe
  11. // Group: DAE 1
  12. //-----------------------------------------------------------------
  13.  
  14. #pragma once
  15.  
  16. //-----------------------------------------------------------------
  17. // Include Files
  18. //-----------------------------------------------------------------
  19.  
  20. #include "Resource.h"  
  21. #include "GameEngine.h"
  22. #include "AbstractGame.h"
  23.  
  24. //-----------------------------------------------------------------
  25. // Pong Class                                                              
  26. //-----------------------------------------------------------------
  27. class Pong : public AbstractGame, public Callable
  28. {
  29. public:            
  30.     //---------------------------
  31.     // Constructor(s)
  32.     //---------------------------
  33.     Pong();
  34.  
  35.     //---------------------------
  36.     // Destructor
  37.     //---------------------------
  38.     virtual ~Pong();
  39.  
  40.     //---------------------------
  41.     // General Methods
  42.     //---------------------------
  43.  
  44.  
  45.     void GameInitialize(HINSTANCE hInstance);
  46.     void GameStart();              
  47.     void GameEnd();
  48.     void AI();
  49.     void AIMove();
  50.     //void MouseButtonAction(bool isLeft, bool isDown, int x, int y, WPARAM wParam);
  51.     //void MouseMove(int x, int y, WPARAM wParam);
  52.     void CheckKeyboard();
  53.     //void KeyPressed(TCHAR cKey);
  54.     void GameTick(double deltaTime);
  55.     void GamePaint(RECT rect);
  56.  
  57.     void CallAction(Caller* callerPtr);
  58.  
  59.     // -------------------------
  60.     // Member functions
  61.     // -------------------------
  62.  
  63. private:
  64.     // -------------------------
  65.     // Member functions
  66.     // -------------------------
  67.  
  68.     // -------------------------
  69.     // Datamembers
  70.     // -------------------------
  71.     int m_xpos, m_ypos; //Variables used for the coordinates of the ball
  72.     double d_xspeed, d_yspeed, d_pspeed; //Variables used for the speed of the ball and the speed of the paddel
  73.     int m_p1movXpos, m_p1movYpos; //Variables used for the location of player 1 his pedal
  74.     int m_p2movXpos, m_p2movYpos; //Variables used for the location of player 2 his pedal
  75.     int m_p1points, m_p2points; //Variables used for the point system
  76.     int m_counter; //Varible used for the global game progress, speed up over time
  77.     int m_yguess; //Varible used for the guess of the y-pos of the ball (see AI code)
  78.     int m_red, m_green, m_blue; //Varibles used for the randomization of the inner ball collour
  79.     int m_tempY, m_tempX; //Varibles used for the calcultaion of the AI system
  80.     int m_ballRadius; //Variable used for the size of the ball, not really used
  81.     long m_height, m_width; //Variables used for detection of the screen resolution
  82.     // -------------------------
  83.     // Disabling default copy constructor and default assignment operator.
  84.     // If you get a linker error from one of these functions, your class is internally trying to use them. This is
  85.     // an error in your class, these declarations are deliberately made without implementation because they should never be used.
  86.     // -------------------------
  87.     Pong(const Pong& tRef);
  88.     Pong& operator=(const Pong& tRef);
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement