forked from jaildesigner-jailgames/jaildoctors_dilemma
clang-format
This commit is contained in:
@@ -74,41 +74,41 @@ struct Color {
|
||||
};
|
||||
|
||||
// COLISIONES Y GEOMETRÍA
|
||||
auto distanceSquared(int x1, int y1, int x2, int y2) -> double; // Distancia² entre dos puntos
|
||||
auto checkCollision(const Circle& a, const Circle& b) -> bool; // Colisión círculo-círculo
|
||||
auto checkCollision(const Circle& a, const SDL_FRect& rect) -> bool; // Colisión círculo-rectángulo
|
||||
auto checkCollision(const SDL_FRect& a, const SDL_FRect& b) -> bool; // Colisión rectángulo-rectángulo
|
||||
auto checkCollision(const SDL_FPoint& p, const SDL_FRect& r) -> bool; // Colisión punto-rectángulo
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FRect& r) -> bool; // Colisión línea horizontal-rectángulo
|
||||
auto checkCollision(const LineVertical& l, const SDL_FRect& r) -> bool; // Colisión línea vertical-rectángulo
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FPoint& p) -> bool; // Colisión línea horizontal-punto
|
||||
auto checkCollision(const Line& l1, const Line& l2) -> SDL_Point; // Colisión línea-línea (intersección)
|
||||
auto distanceSquared(int x1, int y1, int x2, int y2) -> double; // Distancia² entre dos puntos
|
||||
auto checkCollision(const Circle& a, const Circle& b) -> bool; // Colisión círculo-círculo
|
||||
auto checkCollision(const Circle& a, const SDL_FRect& rect) -> bool; // Colisión círculo-rectángulo
|
||||
auto checkCollision(const SDL_FRect& a, const SDL_FRect& b) -> bool; // Colisión rectángulo-rectángulo
|
||||
auto checkCollision(const SDL_FPoint& p, const SDL_FRect& r) -> bool; // Colisión punto-rectángulo
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FRect& r) -> bool; // Colisión línea horizontal-rectángulo
|
||||
auto checkCollision(const LineVertical& l, const SDL_FRect& r) -> bool; // Colisión línea vertical-rectángulo
|
||||
auto checkCollision(const LineHorizontal& l, const SDL_FPoint& p) -> bool; // Colisión línea horizontal-punto
|
||||
auto checkCollision(const Line& l1, const Line& l2) -> SDL_Point; // Colisión línea-línea (intersección)
|
||||
auto checkCollision(const LineDiagonal& l1, const LineVertical& l2) -> SDL_Point; // Colisión diagonal-vertical
|
||||
auto checkCollision(const SDL_FPoint& p, const LineDiagonal& l) -> bool; // Colisión punto-diagonal
|
||||
void normalizeLine(LineDiagonal& l); // Normaliza línea diagonal (x1 < x2)
|
||||
auto checkCollision(const SDL_FPoint& p, const LineDiagonal& l) -> bool; // Colisión punto-diagonal
|
||||
void normalizeLine(LineDiagonal& l); // Normaliza línea diagonal (x1 < x2)
|
||||
|
||||
// CONVERSIONES DE TIPOS SDL
|
||||
auto toSDLRect(const SDL_FRect& frect) -> SDL_Rect; // Convierte SDL_FRect a SDL_Rect
|
||||
auto toSDLPoint(const SDL_FPoint& fpoint) -> SDL_Point; // Convierte SDL_FPoint a SDL_Point
|
||||
auto toSDLRect(const SDL_FRect& frect) -> SDL_Rect; // Convierte SDL_FRect a SDL_Rect
|
||||
auto toSDLPoint(const SDL_FPoint& fpoint) -> SDL_Point; // Convierte SDL_FPoint a SDL_Point
|
||||
|
||||
// CONVERSIONES DE STRING
|
||||
auto stringToColor(const std::string& str) -> Uint8; // String a índice de paleta
|
||||
auto safeStoi(const std::string& value, int default_value = 0) -> int; // String a int seguro (sin excepciones)
|
||||
auto stringToBool(const std::string& str) -> bool; // String a bool (true/1/yes/on)
|
||||
auto boolToString(bool value) -> std::string; // Bool a string (1/0)
|
||||
auto toLower(const std::string& str) -> std::string; // String a minúsculas
|
||||
auto toUpper(const std::string& str) -> std::string; // String a mayúsculas
|
||||
auto stringToColor(const std::string& str) -> Uint8; // String a índice de paleta
|
||||
auto safeStoi(const std::string& value, int default_value = 0) -> int; // String a int seguro (sin excepciones)
|
||||
auto stringToBool(const std::string& str) -> bool; // String a bool (true/1/yes/on)
|
||||
auto boolToString(bool value) -> std::string; // Bool a string (1/0)
|
||||
auto toLower(const std::string& str) -> std::string; // String a minúsculas
|
||||
auto toUpper(const std::string& str) -> std::string; // String a mayúsculas
|
||||
|
||||
// OPERACIONES CON STRINGS
|
||||
auto stringInVector(const std::vector<std::string>& vec, const std::string& str) -> bool; // Busca string en vector
|
||||
auto spaceBetweenLetters(const std::string& input) -> std::string; // Añade espacios entre letras
|
||||
auto spaceBetweenLetters(const std::string& input) -> std::string; // Añade espacios entre letras
|
||||
|
||||
// OPERACIONES CON COLORES
|
||||
auto colorAreEqual(Color color1, Color color2) -> bool; // Compara dos colores RGB
|
||||
auto colorAreEqual(Color color1, Color color2) -> bool; // Compara dos colores RGB
|
||||
|
||||
// OPERACIONES CON FICHEROS
|
||||
auto getFileName(const std::string& path) -> std::string; // Extrae nombre de fichero de ruta
|
||||
auto getPath(const std::string& full_path) -> std::string; // Extrae directorio de ruta completa
|
||||
auto getFileName(const std::string& path) -> std::string; // Extrae nombre de fichero de ruta
|
||||
auto getPath(const std::string& full_path) -> std::string; // Extrae directorio de ruta completa
|
||||
|
||||
// RENDERIZADO
|
||||
void fillTextureWithColor(SDL_Renderer* renderer, SDL_Texture* texture, Uint8 r, Uint8 g, Uint8 b, Uint8 a); // Rellena textura
|
||||
|
||||
Reference in New Issue
Block a user