Clang Tidy fixes
This commit is contained in:
parent
f69fcb6ae4
commit
5f0c03c1fa
|
@ -84,7 +84,7 @@ void Canvas::renderScore(int score) {
|
||||||
window.draw(text);
|
window.draw(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect Canvas::windowDimensions() const {
|
Rect Canvas::windowDimensions() {
|
||||||
return { 0, 0, LEFT_MARGIN + MAZE_WIDTH + SCORE_WIDTH, TOP_MARGIN + MAZE_HEIGHT + BOTTOM_MARGIN };
|
return { 0, 0, LEFT_MARGIN + MAZE_WIDTH + SCORE_WIDTH, TOP_MARGIN + MAZE_HEIGHT + BOTTOM_MARGIN };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,9 @@ private:
|
||||||
|
|
||||||
void renderScore(int score);
|
void renderScore(int score);
|
||||||
|
|
||||||
Rect windowDimensions() const;
|
static Rect windowDimensions() ;
|
||||||
|
static sf::Texture loadTexture(std::string_view path);
|
||||||
sf::Texture loadTexture(std::string_view path);
|
static sf::Font loadFont(std::string_view path);
|
||||||
sf::Font loadFont(std::string_view path);
|
|
||||||
|
|
||||||
Sprite getSprite(PositionInt rect) const;
|
Sprite getSprite(PositionInt rect) const;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
PacMan::PacMan(const Board & board)
|
PacMan::PacMan(const Board & board)
|
||||||
: pos(board.initialPacManPosition()) {}
|
: pos(Board::initialPacManPosition()) {}
|
||||||
|
|
||||||
PositionInt PacMan::currentSprite() const {
|
PositionInt PacMan::currentSprite() const {
|
||||||
return pacManAnimation.animationFrame(direction);
|
return pacManAnimation.animationFrame(direction);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
#include "Position.hpp"
|
#include "Position.hpp"
|
||||||
|
|
||||||
class SuperPellets {
|
class SuperPellets {
|
||||||
public:
|
public:
|
||||||
explicit SuperPellets(const Board & board);
|
explicit SuperPellets(const Board & board);
|
||||||
|
|
Loading…
Reference in New Issue