forked from jaildesigner-jailgames/jaildoctors_dilemma
linter
This commit is contained in:
@@ -80,73 +80,73 @@ struct Color {
|
||||
};
|
||||
|
||||
// Calcula el cuadrado de la distancia entre dos puntos
|
||||
double distanceSquared(int x1, int y1, int x2, int y2);
|
||||
auto distanceSquared(int x1, int y1, int x2, int y2) -> double;
|
||||
|
||||
// Detector de colisiones entre dos circulos
|
||||
bool checkCollision(const Circle& a, const Circle& b);
|
||||
auto checkCollision(const Circle& a, const Circle& b) -> bool;
|
||||
|
||||
// Detector de colisiones entre un circulo y un rectangulo
|
||||
bool checkCollision(const Circle& a, const SDL_FRect& rect);
|
||||
auto checkCollision(const Circle& a, const SDL_FRect& rect) -> bool;
|
||||
|
||||
// Detector de colisiones entre un dos rectangulos
|
||||
bool checkCollision(const SDL_FRect& a, const SDL_FRect& b);
|
||||
auto checkCollision(const SDL_FRect& a, const SDL_FRect& b) -> bool;
|
||||
|
||||
// Detector de colisiones entre un punto y un rectangulo
|
||||
bool checkCollision(const SDL_FPoint& p, const SDL_FRect& r);
|
||||
auto checkCollision(const SDL_FPoint& p, const SDL_FRect& r) -> bool;
|
||||
|
||||
// Detector de colisiones entre una linea horizontal y un rectangulo
|
||||
bool checkCollision(const LineHorizontal& l, const SDL_FRect& r);
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FRect& r) -> bool;
|
||||
|
||||
// Detector de colisiones entre una linea vertical y un rectangulo
|
||||
bool checkCollision(const LineVertical& l, const SDL_FRect& r);
|
||||
auto checkCollision(const LineVertical& l, const SDL_FRect& r) -> bool;
|
||||
|
||||
// Detector de colisiones entre una linea horizontal y un punto
|
||||
bool checkCollision(const LineHorizontal& l, const SDL_FPoint& p);
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FPoint& p) -> bool;
|
||||
|
||||
// Detector de colisiones entre dos lineas
|
||||
SDL_Point checkCollision(const Line& l1, const Line& l2);
|
||||
auto checkCollision(const Line& l1, const Line& l2) -> SDL_Point;
|
||||
|
||||
// Detector de colisiones entre dos lineas
|
||||
SDL_Point checkCollision(const LineDiagonal& l1, const LineVertical& l2);
|
||||
auto checkCollision(const LineDiagonal& l1, const LineVertical& l2) -> SDL_Point;
|
||||
|
||||
// Detector de colisiones entre un punto y una linea diagonal
|
||||
bool checkCollision(const SDL_FPoint& p, const LineDiagonal& l);
|
||||
auto checkCollision(const SDL_FPoint& p, const LineDiagonal& l) -> bool;
|
||||
|
||||
// Normaliza una linea diagonal
|
||||
void normalizeLine(LineDiagonal& l);
|
||||
|
||||
// Devuelve un Color a partir de un string
|
||||
Uint8 stringToColor(const std::string& str);
|
||||
auto stringToColor(const std::string& str) -> Uint8;
|
||||
|
||||
// Convierte una cadena a un entero de forma segura
|
||||
int safeStoi(const std::string& value, int default_value = 0);
|
||||
auto safeStoi(const std::string& value, int default_value = 0) -> int;
|
||||
|
||||
// Convierte una cadena a un booleano
|
||||
bool stringToBool(const std::string& str);
|
||||
auto stringToBool(const std::string& str) -> bool;
|
||||
|
||||
// Convierte un booleano a una cadena
|
||||
std::string boolToString(bool value);
|
||||
auto boolToString(bool value) -> std::string;
|
||||
|
||||
// Compara dos colores
|
||||
bool colorAreEqual(Color color1, Color color2);
|
||||
auto colorAreEqual(Color color1, Color color2) -> bool;
|
||||
|
||||
// Convierte una cadena a minusculas
|
||||
std::string toLower(const std::string& str);
|
||||
auto toLower(const std::string& str) -> std::string;
|
||||
|
||||
// Convierte una cadena a mayúsculas
|
||||
std::string toUpper(const std::string& str);
|
||||
auto toUpper(const std::string& str) -> std::string;
|
||||
|
||||
// Obtiene el nombre de un fichero a partir de una ruta
|
||||
std::string getFileName(const std::string& path);
|
||||
auto getFileName(const std::string& path) -> std::string;
|
||||
|
||||
// Obtiene la ruta eliminando el nombre del fichero
|
||||
std::string getPath(const std::string& full_path);
|
||||
auto getPath(const std::string& full_path) -> std::string;
|
||||
|
||||
// Imprime por pantalla una linea de texto de tamaño fijo rellena con puntos
|
||||
void printWithDots(const std::string& text1, const std::string& text2, const std::string& text3);
|
||||
|
||||
// Comprueba si una vector contiene una cadena
|
||||
bool stringInVector(const std::vector<std::string>& vec, const std::string& str);
|
||||
auto stringInVector(const std::vector<std::string>& vec, const std::string& str) -> bool;
|
||||
|
||||
// Hace sonar la música
|
||||
void playMusic(const std::string& music_path);
|
||||
@@ -154,7 +154,7 @@ void playMusic(const std::string& music_path);
|
||||
// Rellena una textura de un color
|
||||
void fillTextureWithColor(SDL_Renderer* renderer, SDL_Texture* texture, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
|
||||
|
||||
inline SDL_Rect toSDLRect(const SDL_FRect& frect) {
|
||||
inline auto toSDLRect(const SDL_FRect& frect) -> SDL_Rect {
|
||||
SDL_Rect rect;
|
||||
rect.x = static_cast<int>(frect.x);
|
||||
rect.y = static_cast<int>(frect.y);
|
||||
@@ -163,7 +163,7 @@ inline SDL_Rect toSDLRect(const SDL_FRect& frect) {
|
||||
return rect;
|
||||
}
|
||||
|
||||
inline SDL_Point toSDLPoint(const SDL_FPoint& fpoint) {
|
||||
inline auto toSDLPoint(const SDL_FPoint& fpoint) -> SDL_Point {
|
||||
SDL_Point point;
|
||||
point.x = static_cast<int>(fpoint.x);
|
||||
point.y = static_cast<int>(fpoint.y);
|
||||
|
||||
Reference in New Issue
Block a user