Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------
- // Game File
- // C++ Source - Pong.h - version v2_12 jan 2013
- // Copyright Kevin Hoefman - kevin.hoefman@howest.be
- // http://www.digitalartsandentertainment.be/
- //-----------------------------------------------------------------
- //-----------------------------------------------------------------
- // Student data
- // Name: Wolf Van Herreweghe
- // Group: DAE 1
- //-----------------------------------------------------------------
- #pragma once
- //-----------------------------------------------------------------
- // Include Files
- //-----------------------------------------------------------------
- #include "Resource.h"
- #include "GameEngine.h"
- #include "AbstractGame.h"
- //-----------------------------------------------------------------
- // Pong Class
- //-----------------------------------------------------------------
- class Pong : public AbstractGame, public Callable
- {
- public:
- //---------------------------
- // Constructor(s)
- //---------------------------
- Pong();
- //---------------------------
- // Destructor
- //---------------------------
- virtual ~Pong();
- //---------------------------
- // General Methods
- //---------------------------
- void GameInitialize(HINSTANCE hInstance);
- void GameStart();
- void GameEnd();
- void AI();
- void AIMove();
- //void MouseButtonAction(bool isLeft, bool isDown, int x, int y, WPARAM wParam);
- //void MouseMove(int x, int y, WPARAM wParam);
- void CheckKeyboard();
- //void KeyPressed(TCHAR cKey);
- void GameTick(double deltaTime);
- void GamePaint(RECT rect);
- void CallAction(Caller* callerPtr);
- // -------------------------
- // Member functions
- // -------------------------
- private:
- // -------------------------
- // Member functions
- // -------------------------
- // -------------------------
- // Datamembers
- // -------------------------
- int m_xpos, m_ypos; //Variables used for the coordinates of the ball
- double d_xspeed, d_yspeed, d_pspeed; //Variables used for the speed of the ball and the speed of the paddel
- int m_p1movXpos, m_p1movYpos; //Variables used for the location of player 1 his pedal
- int m_p2movXpos, m_p2movYpos; //Variables used for the location of player 2 his pedal
- int m_p1points, m_p2points; //Variables used for the point system
- int m_counter; //Varible used for the global game progress, speed up over time
- int m_yguess; //Varible used for the guess of the y-pos of the ball (see AI code)
- int m_red, m_green, m_blue; //Varibles used for the randomization of the inner ball collour
- int m_tempY, m_tempX; //Varibles used for the calcultaion of the AI system
- int m_ballRadius; //Variable used for the size of the ball, not really used
- long m_height, m_width; //Variables used for detection of the screen resolution
- // -------------------------
- // Disabling default copy constructor and default assignment operator.
- // If you get a linker error from one of these functions, your class is internally trying to use them. This is
- // an error in your class, these declarations are deliberately made without implementation because they should never be used.
- // -------------------------
- Pong(const Pong& tRef);
- Pong& operator=(const Pong& tRef);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement