afegit gif.cpp i jail_shader.cpp desde coffee_crisis_arcade_edition

This commit is contained in:
2025-03-16 15:44:38 +01:00
parent a14f6fcf6f
commit 40dcbabfe8
61 changed files with 1185 additions and 1231 deletions

View File

@@ -1,10 +1,10 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint8
#include <string> // for string
#include <vector> // for vector
#include <SDL2/SDL_rect.h> // Para SDL_Rect, SDL_Point
#include <SDL2/SDL_render.h> // Para SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // Para Uint8
#include <string> // Para string
#include <vector> // Para vector
enum class PaletteColor : Uint8
{
@@ -35,52 +35,51 @@ enum class PaletteColor : Uint8
TRANSPARENT = 255,
};
// Estructura para definir un circulo
struct Circle
{
int x;
int y;
int r;
int x;
int y;
int r;
};
// Estructura para definir una linea horizontal
struct LineHorizontal
{
int x1, x2, y;
int x1, x2, y;
};
// Estructura para definir una linea vertical
struct LineVertical
{
int x, y1, y2;
int x, y1, y2;
};
// Estructura para definir una linea diagonal
struct LineDiagonal
{
int x1, y1, x2, y2;
int x1, y1, x2, y2;
};
// Estructura para definir una linea
struct Line
{
int x1, y1, x2, y2;
int x1, y1, x2, y2;
};
// Estructura para definir un color
struct Color
{
Uint8 r;
Uint8 g;
Uint8 b;
Uint8 r;
Uint8 g;
Uint8 b;
// Constructor por defecto
Color() : r(0), g(0), b(0) {}
// Constructor por defecto
Color() : r(0), g(0), b(0) {}
// Constructor
Color(Uint8 red, Uint8 green, Uint8 blue)
: r(red), g(green), b(blue) {}
// Constructor
Color(Uint8 red, Uint8 green, Uint8 blue)
: r(red), g(green), b(blue) {}
};
// Calcula el cuadrado de la distancia entre dos puntos