#if !defined(_BALL_) #define _BALL_ #include "directx.h" #include "2dvector.h" #include "sprite.h" class CPlayingField; class CBall { private: CPlayingField* parent; CSprite* BallSprite; long x; long y; C2DVector Velocity; int SpriteXOffset; int SpriteYOffset; void HitBoundary( C2DVector* BoundaryNormal ); public: CBall(); CBall(long Xin, long Yin, C2DVector Vin ); ~CBall(); void SetParent( CPlayingField* newparent ); void SetVelocity( long speed, int angle ); void draw( LPDIRECTDRAWSURFACE Surface ); void move(); }; #endif