Arreglat jail_shader.cpp en windows també
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string> // para string, basic_string
|
#include <string> // Para string, basic_string
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
enum class AssetType : int
|
enum class AssetType : int
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "balloon_formations.h"
|
#include "balloon_formations.h"
|
||||||
#include "balloon.h" // para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
#include "balloon.h" // Para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
||||||
#include "param.h" // para param
|
#include "param.h" // Para param
|
||||||
#include "utils.h" // para ParamGame, Param, Zone, BLOCK
|
#include "utils.h" // Para ParamGame, Param, Zone, BLOCK
|
||||||
|
|
||||||
void BalloonFormations::initBalloonFormations()
|
void BalloonFormations::initBalloonFormations()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "balloon.h" // para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
#include "balloon.h" // Para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
|
constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "dbgtxt.h"
|
#include "dbgtxt.h"
|
||||||
#include <SDL2/SDL_rect.h> // para SDL_Rect
|
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||||
#include <SDL2/SDL_rwops.h> // para SDL_RWFromMem
|
#include <SDL2/SDL_rwops.h> // Para SDL_RWFromMem
|
||||||
#include <SDL2/SDL_surface.h> // para SDL_LoadBMP_RW
|
#include <SDL2/SDL_surface.h> // Para SDL_LoadBMP_RW
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_render.h> // para SDL_Renderer
|
#include <SDL2/SDL_render.h> // Para SDL_Renderer
|
||||||
#include <SDL2/SDL_stdinc.h> // para Uint8
|
#include <SDL2/SDL_stdinc.h> // Para Uint8
|
||||||
|
|
||||||
void dbg_init(SDL_Renderer *renderer);
|
void dbg_init(SDL_Renderer *renderer);
|
||||||
void dbg_print(int x, int y, const char *text, Uint8 r, Uint8 g, Uint8 b);
|
void dbg_print(int x, int y, const char *text, Uint8 r, Uint8 g, Uint8 b);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // para SDL_Rect
|
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // para SDL_Renderer, SDL_Texture
|
#include <SDL2/SDL_render.h> // Para SDL_Renderer, SDL_Texture
|
||||||
#include <SDL2/SDL_stdinc.h> // para Uint8, Uint16
|
#include <SDL2/SDL_stdinc.h> // Para Uint8, Uint16
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
|
|
||||||
// Tipos de fundido
|
// Tipos de fundido
|
||||||
enum class FadeType : Uint8
|
enum class FadeType : Uint8
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "gif.h"
|
#include "gif.h"
|
||||||
#include <cstdio> // Para NULL, fprintf, stderr
|
#include <cstdio> // Para fprintf, stderr
|
||||||
#include <cstdlib> // Para malloc, realloc, exit, calloc, free
|
#include <cstdlib> // Para exit, malloc, calloc, free, realloc
|
||||||
|
#include <vector> // Para vector
|
||||||
|
|
||||||
void Gif::uncompress(int code_length, const uint8_t *input, int input_length, uint8_t *out)
|
void Gif::uncompress(int code_length, const uint8_t *input, int input_length, uint8_t *out)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint> // Para uint32_t
|
#include <cstdint> // Para uint8_t, uint16_t, uint32_t
|
||||||
#include <cstring> // Para memcpy
|
#include <cstring> // Para memcpy
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#define EXTENSION_INTRODUCER 0x21
|
#define EXTENSION_INTRODUCER 0x21
|
||||||
#define IMAGE_DESCRIPTOR 0x2C
|
#define IMAGE_DESCRIPTOR 0x2C
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_gamecontroller.h> // para SDL_GameControllerButton, SDL_G...
|
#include <SDL2/SDL_gamecontroller.h> // Para SDL_GameControllerButton, SDL_G...
|
||||||
#include <SDL2/SDL_joystick.h> // para SDL_Joystick
|
#include <SDL2/SDL_joystick.h> // Para SDL_Joystick
|
||||||
#include <SDL2/SDL_scancode.h> // para SDL_Scancode
|
#include <SDL2/SDL_scancode.h> // Para SDL_Scancode
|
||||||
#include <SDL2/SDL_stdinc.h> // para Uint8
|
#include <SDL2/SDL_stdinc.h> // Para Uint8
|
||||||
#include <string> // para string, basic_string
|
#include <string> // Para string, basic_string
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
|
|
||||||
/*
|
/*
|
||||||
connectedControllers es un vector donde estan todos los mandos encontrados [0 .. n]
|
connectedControllers es un vector donde estan todos los mandos encontrados [0 .. n]
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // para SDL_Rect
|
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||||
#include <SDL2/SDL_stdinc.h> // para Uint16
|
#include <SDL2/SDL_stdinc.h> // Para Uint16
|
||||||
#include <memory> // para shared_ptr, unique_ptr
|
#include <memory> // Para shared_ptr, unique_ptr
|
||||||
#include <string> // para string
|
#include <string> // Para string
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
#include "animated_sprite.h" // para SpriteAnimated
|
#include "animated_sprite.h" // Para SpriteAnimated
|
||||||
#include "utils.h" // para Circle
|
#include "utils.h" // Para Circle
|
||||||
class Texture;
|
class Texture;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,14 +17,14 @@ class Texture;
|
|||||||
*/
|
*/
|
||||||
enum class ItemType : int
|
enum class ItemType : int
|
||||||
{
|
{
|
||||||
DISK = 1, /**< Disco */
|
DISK = 1, /**< Disco */
|
||||||
GAVINA = 2, /**< Gavina */
|
GAVINA = 2, /**< Gavina */
|
||||||
PACMAR = 3, /**< Pacman */
|
PACMAR = 3, /**< Pacman */
|
||||||
CLOCK = 4, /**< Reloj */
|
CLOCK = 4, /**< Reloj */
|
||||||
COFFEE = 5, /**< Café */
|
COFFEE = 5, /**< Café */
|
||||||
DEBIAN = 6, /**< Debian */
|
DEBIAN = 6, /**< Debian */
|
||||||
COFFEE_MACHINE = 7,/**< Máquina de café */
|
COFFEE_MACHINE = 7, /**< Máquina de café */
|
||||||
NONE = 8, /**< Ninguno */
|
NONE = 8, /**< Ninguno */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#include "jail_shader.h"
|
#include "jail_shader.h"
|
||||||
#include <SDL2/SDL.h> // para SDL_Point
|
#include <SDL2/SDL_opengl.h> // Para GLuint, glTexCoord2f, glVertex2f, GLfloat
|
||||||
#include <cstdlib> // para NULL, free, malloc, exit
|
#include <SDL2/SDL_rect.h> // Para SDL_Point
|
||||||
#include <cstring> // para strncmp
|
#include <SDL2/SDL_stdinc.h> // Para SDL_bool
|
||||||
#include <iostream> // para std::cout, std::endl
|
#include <cstring> // Para strncmp
|
||||||
|
#include <iostream> // Para basic_ostream, operator<<, endl, cout
|
||||||
|
#include <stdexcept> // Para runtime_error
|
||||||
|
#include <vector> // Para vector
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include "CoreFoundation/CoreFoundation.h"
|
#include "CoreFoundation/CoreFoundation.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_render.h> // para SDL_Texture
|
#include <SDL2/SDL_render.h> // Para SDL_Texture
|
||||||
#include <SDL2/SDL_video.h> // para SDL_Window
|
#include <SDL2/SDL_video.h> // Para SDL_Window
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// TIPS:
|
// TIPS:
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace shader
|
namespace shader
|
||||||
{
|
{
|
||||||
//const bool init(SDL_Window *ventana, SDL_Texture *texturaBackBuffer, const char *vertexShader, const char *fragmentShader = nullptr);
|
// const bool init(SDL_Window *ventana, SDL_Texture *texturaBackBuffer, const char *vertexShader, const char *fragmentShader = nullptr);
|
||||||
bool init(SDL_Window *ventana, SDL_Texture *texturaBackBuffer, const std::string &vertexShader, const std::string &fragmentShader = "");
|
bool init(SDL_Window *ventana, SDL_Texture *texturaBackBuffer, const std::string &vertexShader, const std::string &fragmentShader = "");
|
||||||
void render();
|
void render();
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include <fstream> // para basic_ifstream, basic_istream, ifstream
|
#include <fstream> // Para basic_ifstream, basic_istream, ifstream
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
|
|
||||||
namespace lang
|
namespace lang
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string> // para string
|
#include <string> // Para string
|
||||||
|
|
||||||
namespace lang
|
namespace lang
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string> // para string
|
#include <string> // Para string
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Esta clase sirve para añadir elementos hiScoreEntry_r a un vector (tabla), de manera
|
Esta clase sirve para añadir elementos hiScoreEntry_r a un vector (tabla), de manera
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// Añade un elemento a la tabla
|
// Añade un elemento a la tabla
|
||||||
int add(const HiScoreEntry& entry);
|
int add(const HiScoreEntry &entry);
|
||||||
|
|
||||||
// Carga la tabla con los datos de un fichero
|
// Carga la tabla con los datos de un fichero
|
||||||
bool loadFromFile(const std::string &file_path);
|
bool loadFromFile(const std::string &file_path);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // para SDL_Rect
|
#include <SDL2/SDL_rect.h> // Para SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // para SDL_Texture
|
#include <SDL2/SDL_render.h> // Para SDL_Texture
|
||||||
#include <vector> // para vector
|
#include <vector> // Para vector
|
||||||
class Sprite;
|
class Sprite;
|
||||||
class Text;
|
class Text;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "param.h"
|
#include "param.h"
|
||||||
#include <fstream> // para char_traits, basic_ostream, basic_ifstream, basi...
|
#include <fstream> // Para char_traits, basic_ostream, basic_ifstream, basi...
|
||||||
#include <iostream> // para cout
|
#include <iostream> // Para cout
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include "utils.h" // para Param, ParamGame, Zone, ParamBalloon
|
#include "utils.h" // Para Param, ParamGame, Zone, ParamBalloon
|
||||||
|
|
||||||
Param param;
|
Param param;
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include <algorithm> // Para max, min
|
#include <algorithm> // Para max, min
|
||||||
#include <fstream> // Para basic_ifstream, ifstream
|
#include <fstream> // Para basic_ifstream, ifstream
|
||||||
#include <iterator> // Para istreambuf_iterator, operator==
|
#include <iterator> // Para istreambuf_iterator, operator==
|
||||||
#include <string> // Para allocator, operator+, char_traits, to_s...
|
#include <string> // Para allocator, char_traits, operator+, to_s...
|
||||||
#include <vector> // Para vector
|
|
||||||
#include "asset.h" // Para Asset
|
#include "asset.h" // Para Asset
|
||||||
#include "dbgtxt.h" // Para dbg_print
|
#include "dbgtxt.h" // Para dbg_print
|
||||||
#include "global_inputs.h" // Para service_pressed_counter
|
#include "global_inputs.h" // Para service_pressed_counter
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory> // para shared_ptr
|
#include <memory> // Para shared_ptr
|
||||||
#include "animated_sprite.h" // para SpriteAnimated
|
#include "animated_sprite.h" // Para SpriteAnimated
|
||||||
class Texture;
|
class Texture;
|
||||||
|
|
||||||
// Clase SpriteSmart
|
// Clase SpriteSmart
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ extern "C"
|
|||||||
#ifndef STBI_NO_STDIO
|
#ifndef STBI_NO_STDIO
|
||||||
STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels);
|
STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels);
|
||||||
STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels);
|
STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels);
|
||||||
// para stbi_load_from_file, file pointer is left pointing immediately after image
|
// Para stbi_load_from_file, file pointer is left pointing immediately after image
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STBI_NO_GIF
|
#ifndef STBI_NO_GIF
|
||||||
@@ -503,7 +503,7 @@ extern "C"
|
|||||||
STBIDEF int stbi_is_16_bit_from_file(FILE *f);
|
STBIDEF int stbi_is_16_bit_from_file(FILE *f);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// para image formats that explicitly notate that they have premultiplied alpha,
|
// Para image formats that explicitly notate that they have premultiplied alpha,
|
||||||
// we just return the colors as stored in the file. set this flag to force
|
// we just return the colors as stored in the file. set this flag to force
|
||||||
// unpremultiplication. results are undefined if the unpremultiply overflow.
|
// unpremultiplication. results are undefined if the unpremultiply overflow.
|
||||||
STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
|
STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
|
||||||
@@ -6869,7 +6869,7 @@ static int stbi__tga_test(stbi__context *s)
|
|||||||
goto errorEnd; // test height
|
goto errorEnd; // test height
|
||||||
sz = stbi__get8(s); // bits per pixel
|
sz = stbi__get8(s); // bits per pixel
|
||||||
if ((tga_color_type == 1) && (sz != 8) && (sz != 16))
|
if ((tga_color_type == 1) && (sz != 8) && (sz != 16))
|
||||||
goto errorEnd; // para colormapped images, bpp is size of an index
|
goto errorEnd; // Para colormapped images, bpp is size of an index
|
||||||
if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32))
|
if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32))
|
||||||
goto errorEnd;
|
goto errorEnd;
|
||||||
|
|
||||||
@@ -7499,7 +7499,7 @@ static stbi_uc *stbi__pic_load_core(stbi__context *s, int width, int height, int
|
|||||||
stbi__pic_packet packets[10];
|
stbi__pic_packet packets[10];
|
||||||
|
|
||||||
// this will (should...) cater for even some bizarre stuff like having data
|
// this will (should...) cater for even some bizarre stuff like having data
|
||||||
// para the same channel in multiple packets.
|
// Para the same channel in multiple packets.
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
stbi__pic_packet *packet;
|
stbi__pic_packet *packet;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "utils.h" // Para getFileName, printWithDots
|
#include "utils.h" // Para getFileName, printWithDots
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "stb_image.h" // para stbi_failure_reason, stbi_image_free
|
#include "stb_image.h" // Para stbi_failure_reason, stbi_image_free
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Texture::Texture(SDL_Renderer *renderer, const std::string &path)
|
Texture::Texture(SDL_Renderer *renderer, const std::string &path)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
#include "text.h" // para Text
|
#include "text.h" // Para Text
|
||||||
|
|
||||||
// Actualiza el objeto
|
// Actualiza el objeto
|
||||||
void Writer::update()
|
void Writer::update()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory> // para shared_ptr
|
#include <memory> // Para shared_ptr
|
||||||
#include <string> // para string
|
#include <string> // Para string
|
||||||
class Text;
|
class Text;
|
||||||
|
|
||||||
// Clase Writer. Pinta texto en pantalla letra a letra a partir de una cadena y un objeto Text
|
// Clase Writer. Pinta texto en pantalla letra a letra a partir de una cadena y un objeto Text
|
||||||
|
|||||||
Reference in New Issue
Block a user