Move to pragma once
This commit is contained in:
parent
9644229061
commit
27b8d47dec
10 changed files with 10 additions and 40 deletions
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_BOARD_H
|
#pragma once
|
||||||
#define PACMAN_BOARD_H
|
|
||||||
|
|
||||||
#include "Direction.hpp"
|
#include "Direction.hpp"
|
||||||
#include "Position.hpp"
|
#include "Position.hpp"
|
||||||
|
@ -26,5 +25,3 @@ public:
|
||||||
private:
|
private:
|
||||||
uint8_t board_state[ROWS][COLUMNS]{};
|
uint8_t board_state[ROWS][COLUMNS]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_BOARD_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_DIRECTION_H
|
#pragma once
|
||||||
#define PACMAN_DIRECTION_H
|
|
||||||
|
|
||||||
enum class Direction {
|
enum class Direction {
|
||||||
NONE,
|
NONE,
|
||||||
|
@ -8,5 +7,3 @@ enum class Direction {
|
||||||
UP,
|
UP,
|
||||||
DOWN
|
DOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_DIRECTION_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_GAME_H
|
#pragma once
|
||||||
#define PACMAN_GAME_H
|
|
||||||
|
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
#include "GameWindow.hpp"
|
#include "GameWindow.hpp"
|
||||||
|
@ -28,5 +27,3 @@ private:
|
||||||
|
|
||||||
[[nodiscard]] static auto now();
|
[[nodiscard]] static auto now();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_GAME_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_GAMEWINDOW_H
|
#pragma once
|
||||||
#define PACMAN_GAMEWINDOW_H
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -79,5 +78,3 @@ private:
|
||||||
|
|
||||||
void renderTexture(SDL_Texture * texture, SDL_Rect * texture_rect, SDL_Rect * target_rect) const;
|
void renderTexture(SDL_Texture * texture, SDL_Rect * texture_rect, SDL_Rect * target_rect) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_GAMEWINDOW_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_INPUTSTATE_H
|
#pragma once
|
||||||
#define PACMAN_INPUTSTATE_H
|
|
||||||
|
|
||||||
class InputState {
|
class InputState {
|
||||||
public:
|
public:
|
||||||
|
@ -9,5 +8,3 @@ public:
|
||||||
bool left = false;
|
bool left = false;
|
||||||
bool right = false;
|
bool right = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_INPUTSTATE_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_PACMAN_H
|
#pragma once
|
||||||
#define PACMAN_PACMAN_H
|
|
||||||
|
|
||||||
#include "Direction.hpp"
|
#include "Direction.hpp"
|
||||||
#include "Position.hpp"
|
#include "Position.hpp"
|
||||||
|
@ -34,5 +33,3 @@ private:
|
||||||
|
|
||||||
void updateMazePosition(std::chrono::milliseconds time_delta, const Board & board);
|
void updateMazePosition(std::chrono::milliseconds time_delta, const Board & board);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_PACMAN_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_PACMAN_ANIMATION_HPP
|
#pragma once
|
||||||
#define PACMAN_PACMAN_ANIMATION_HPP
|
|
||||||
|
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
#include "Direction.hpp"
|
#include "Direction.hpp"
|
||||||
|
@ -33,5 +32,3 @@ private:
|
||||||
const SDL_Rect right_animation[4]{right_wide, right_narrow, closed, right_narrow};
|
const SDL_Rect right_animation[4]{right_wide, right_narrow, closed, right_narrow};
|
||||||
const SDL_Rect up_animation[4]{up_wide, up_narrow, closed, up_narrow};
|
const SDL_Rect up_animation[4]{up_wide, up_narrow, closed, up_narrow};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_PACMAN_ANIMATION_HPP
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_PELLETS_HPP
|
#pragma once
|
||||||
#define PACMAN_PELLETS_HPP
|
|
||||||
|
|
||||||
#include "Position.hpp"
|
#include "Position.hpp"
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
|
@ -22,5 +21,3 @@ private:
|
||||||
const SDL_Rect sprite = {1 * 32, 9 * 32, 32, 32};
|
const SDL_Rect sprite = {1 * 32, 9 * 32, 32, 32};
|
||||||
std::vector<SDL_Point> positions;
|
std::vector<SDL_Point> positions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_PELLETS_HPP
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_POSITION_H
|
#pragma once
|
||||||
#define PACMAN_POSITION_H
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -7,5 +6,3 @@ struct Position {
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_POSITION_H
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef PACMAN_SUPERPELLETS_HPP
|
#pragma once
|
||||||
#define PACMAN_SUPERPELLETS_HPP
|
|
||||||
|
|
||||||
#include "Position.hpp"
|
#include "Position.hpp"
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
|
@ -22,5 +21,3 @@ private:
|
||||||
const SDL_Rect sprite = {0 * 32, 9 * 32, 32, 32};
|
const SDL_Rect sprite = {0 * 32, 9 * 32, 32, 32};
|
||||||
std::vector<SDL_Point> positions;
|
std::vector<SDL_Point> positions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PACMAN_SUPERPELLETS_HPP
|
|
||||||
|
|
Loading…
Reference in a new issue