Split sdlpp into smaller files
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef SDLPP_HPP_RECT_COLIDER
|
||||
#define SDLPP_HPP_RECT_COLIDER
|
||||
|
||||
#include "sdlpp_common.hpp"
|
||||
#include "sdlpp_collision.hpp"
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace SDLPP {
|
||||
class RectColider : public CollisionPolygon {
|
||||
public:
|
||||
RectColider( double x, double y, double w, double h );
|
||||
virtual ~RectColider() {}
|
||||
virtual bool colidesWith( const CollisionPolygon &other ) const override;
|
||||
virtual bool isCircle() const override;
|
||||
virtual int topmost() const override;
|
||||
virtual int bottommost() const override;
|
||||
virtual int leftmost() const override;
|
||||
virtual int rightmost() const override;
|
||||
virtual void updateCollision( int x, int y, int w, int h ) override;
|
||||
virtual void
|
||||
render( Renderer &renderer,
|
||||
const std::tuple< int, int, int, int > &color ) override;
|
||||
virtual void render( Renderer &renderer ) override;
|
||||
|
||||
private:
|
||||
SDL_Rect getRect();
|
||||
|
||||
double w_;
|
||||
double h_;
|
||||
int pixel_w;
|
||||
int pixel_h;
|
||||
};
|
||||
} // end of namespace SDLPP
|
||||
#endif
|
||||
Reference in New Issue
Block a user