mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 03:12:01 +00:00
now following coplien form
This commit is contained in:
@@ -15,13 +15,13 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
Color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||||
|
|
||||||
Color(const Color &);
|
Color(const Color &) = default;
|
||||||
|
|
||||||
Color(int hexValue);
|
Color(int hexValue);
|
||||||
|
|
||||||
~Color() = default;
|
~Color() = default;
|
||||||
|
|
||||||
Color &operator=(const Color &);
|
Color &operator=(const Color &) = default;
|
||||||
|
|
||||||
Color &setR(unsigned char r);
|
Color &setR(unsigned char r);
|
||||||
Color &setG(unsigned char g);
|
Color &setG(unsigned char g);
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ namespace Ray {
|
|||||||
|
|
||||||
~GamePad() = default;
|
~GamePad() = default;
|
||||||
|
|
||||||
GamePad(const GamePad &);
|
GamePad(const GamePad &) = default;
|
||||||
|
|
||||||
GamePad &operator=(const GamePad &);
|
GamePad &operator=(const GamePad &) = default;
|
||||||
|
|
||||||
bool isPressed(Button);
|
bool isPressed(Button);
|
||||||
bool isDown(Button);
|
bool isDown(Button);
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ namespace Ray {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Circle(Vector2 topLeftPos, int radius, Color);
|
Circle(Vector2 topLeftPos, int radius, Color);
|
||||||
|
|
||||||
Circle(int topLeftX, int topLeftY, int radius, Color);
|
Circle(int topLeftX, int topLeftY, int radius, Color);
|
||||||
Circle(const Circle &);
|
|
||||||
|
Circle(const Circle &) = default;
|
||||||
|
|
||||||
Circle &operator=(const Circle &);
|
Circle &operator=(const Circle &) = default;
|
||||||
|
|
||||||
~Circle() = default;
|
~Circle() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Line(Vector2 position, int length, Color);
|
Line(Vector2 position, int length, Color);
|
||||||
Line(int x, int y, int length, Color);
|
Line(int x, int y, int length, Color);
|
||||||
Line(const Line &);
|
Line(const Line &) = default;
|
||||||
|
|
||||||
Line &operator=(const Line &);
|
Line &operator=(const Line &) = default;
|
||||||
|
|
||||||
~Line() = default;
|
~Line() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Point(Vector2 position, Color);
|
Point(Vector2 position, Color);
|
||||||
Point(int x, int y, Color);
|
Point(int x, int y, Color);
|
||||||
Point(const Point &);
|
Point(const Point &) = default;
|
||||||
|
|
||||||
Point &operator=(const Point &);
|
Point &operator=(const Point &) = default;
|
||||||
|
|
||||||
~Point() = default;
|
~Point() = default;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Rectangle(Vector2 position, Vector2 dimensions,int length, Color);
|
Rectangle(Vector2 position, Vector2 dimensions,int length, Color);
|
||||||
Rectangle(int x, int y, int width, int height, int length, Color);
|
Rectangle(int x, int y, int width, int height, int length, Color);
|
||||||
Rectangle(const Rectangle &);
|
Rectangle(const Rectangle &) = default;
|
||||||
|
|
||||||
Rectangle &operator=(const Rectangle &);
|
Rectangle &operator=(const Rectangle &) = default;
|
||||||
|
|
||||||
~Rectangle() = default;
|
~Rectangle() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Text(const std::string &text, int fontSize, Vector2 position, Color);
|
Text(const std::string &text, int fontSize, Vector2 position, Color);
|
||||||
Text(const std::string &text, int fontSize, int x, int y, Color);
|
Text(const std::string &text, int fontSize, int x, int y, Color);
|
||||||
Text(const Text &);
|
Text(const Text &) = default;
|
||||||
|
|
||||||
Text &operator=(const Text &);
|
Text &operator=(const Text &) = default;
|
||||||
|
|
||||||
~Text() = default;
|
~Text() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
Drawable(Vector2 position, Color color);
|
Drawable(Vector2 position, Color color);
|
||||||
Drawable(int x, int y, Color color);
|
Drawable(int x, int y, Color color);
|
||||||
|
|
||||||
|
Drawable(const Drawable &) = default;
|
||||||
virtual ~Drawable() = 0;
|
virtual ~Drawable() = 0;
|
||||||
|
|
||||||
const Vector2 &getPosition(void) const;
|
const Vector2 &getPosition(void) const;
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ namespace Ray
|
|||||||
Image(const Image &);
|
Image(const Image &);
|
||||||
Image();
|
Image();
|
||||||
|
|
||||||
Image &operator=(const Image &);
|
Image &operator=(const Image &) = default;
|
||||||
|
|
||||||
|
~Image();
|
||||||
|
|
||||||
bool load(const std::string &filename);
|
bool load(const std::string &filename);
|
||||||
bool exportTo(const std::string &outputPath);
|
bool exportTo(const std::string &outputPath);
|
||||||
bool unload();
|
bool unload();
|
||||||
|
|
||||||
const ::Image &getImage(void) const;
|
const ::Image &getImage(void) const;
|
||||||
|
|
||||||
~Image();
|
|
||||||
|
|
||||||
void draw(const Rectangle &);
|
void draw(const Rectangle &);
|
||||||
void draw(const Line &);
|
void draw(const Line &);
|
||||||
void draw(const Point &);
|
void draw(const Point &);
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ namespace Ray {
|
|||||||
public:
|
public:
|
||||||
// Creates window, and opens it if openNow is set to true
|
// Creates window, and opens it if openNow is set to true
|
||||||
Window(int width, int height, const std::string title, bool openNow = false);
|
Window(int width, int height, const std::string title, bool openNow = false);
|
||||||
|
|
||||||
|
Window(const Window &) = default;
|
||||||
|
|
||||||
|
Window &operator=(const Window &) = default;
|
||||||
|
|
||||||
//Closes window if still open
|
//Closes window if still open
|
||||||
~Window() = default;
|
~Window() = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user