migrant a SDL3
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <SDL3/SDL_rect.h> // Para SDL_FRect, SDL_Point
|
||||
#include <SDL3/SDL_rect.h> // Para SDL_FRect, SDL_FPoint
|
||||
#include <SDL3/SDL_render.h> // Para SDL_Renderer
|
||||
#include <SDL3/SDL_stdinc.h> // Para Uint8
|
||||
#include <stdint.h> // Para int32_t
|
||||
@@ -116,13 +117,13 @@ struct Demo
|
||||
// Posiciones dentro de un rectangulo
|
||||
struct Zone
|
||||
{
|
||||
SDL_FRect rect; // Rectangulo que define la zona
|
||||
int center_x; // Anclaje al 50% del eje X
|
||||
int first_quarter_x; // Anclaje al 25% del eje X
|
||||
int third_quarter_x; // Anclaje al 75% del eje X
|
||||
int center_y; // Anclaje al 50% del eje Y
|
||||
int first_quarter_y; // Anclaje al 25% del eje Y
|
||||
int third_quarter_y; // Anclaje al 75% del eje X
|
||||
SDL_FRect rect; // Rectangulo que define la zona
|
||||
float center_x; // Anclaje al 50% del eje X
|
||||
float first_quarter_x; // Anclaje al 25% del eje X
|
||||
float third_quarter_x; // Anclaje al 75% del eje X
|
||||
float center_y; // Anclaje al 50% del eje Y
|
||||
float first_quarter_y; // Anclaje al 25% del eje Y
|
||||
float third_quarter_y; // Anclaje al 75% del eje X
|
||||
};
|
||||
|
||||
// Obtiene un color del vector de colores imitando al Coche Fantástico
|
||||
@@ -141,7 +142,7 @@ bool checkCollision(const Circle &a, const SDL_FRect &b);
|
||||
bool checkCollision(const SDL_FRect &a, const SDL_FRect &b);
|
||||
|
||||
// Detector de colisiones entre un punto y un rectangulo
|
||||
bool checkCollision(const SDL_Point &p, const SDL_FRect &r);
|
||||
bool checkCollision(const SDL_FPoint &p, const SDL_FRect &r);
|
||||
|
||||
// Convierte una cadena en un valor booleano
|
||||
bool stringToBool(const std::string &str);
|
||||
|
||||
Reference in New Issue
Block a user