Pasaeta de "include-what-you-use" per arreglar els includes

Renombrats alguns fitxers per consistencia
This commit is contained in:
2024-09-29 06:24:11 +02:00
parent ac3340c39f
commit 28df97ea94
82 changed files with 616 additions and 350 deletions

View File

@@ -1,7 +1,8 @@
#include "animatedsprite.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include "animated_sprite.h"
#include <fstream> // for basic_ostream, operator<<, basic_istream, basic...
#include <iostream> // for cout
#include <sstream> // for basic_stringstream
#include "texture.h" // for Texture
// Carga la animación desde un fichero
animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, bool verbose)

View File

@@ -1,9 +1,11 @@
#pragma once
#include <SDL2/SDL.h>
#include "movingsprite.h"
#include <string>
#include <vector>
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint8
#include <string> // for string, basic_string
#include <vector> // for vector
#include "moving_sprite.h" // for MovingSprite
class Texture;
struct animation_t
{

View File

@@ -1,5 +1,8 @@
#include "asset.h"
#include <iostream>
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_RWops
#include <SDL2/SDL_stdinc.h> // for SDL_max
#include <stddef.h> // for size_t
#include <iostream> // for basic_ostream, operator<<, cout, endl
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Asset *Asset::asset = nullptr;

View File

@@ -1,8 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#include <string> // for string, basic_string
#include <vector> // for vector
enum assetType
{

View File

@@ -1,5 +1,13 @@
#include "background.h"
#include "param.h"
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <algorithm> // for max, min
#include <string> // for basic_string
#include "asset.h" // for Asset
#include "moving_sprite.h" // for MovingSprite
#include "param.h" // for param
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
// Constructor
Background::Background(SDL_Renderer *renderer)

View File

@@ -1,9 +1,12 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "movingsprite.h"
#include "utils.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include "utils.h" // for color_t
class Asset;
class MovingSprite;
class Sprite;
class Texture;
/*
Esta clase es la encargada de dibujar el fondo que aparece durante la sección

View File

@@ -1,5 +1,11 @@
#include "balloon.h"
#include "param.h"
#include <bits/std_abs.h> // for abs
#include <math.h> // for abs
#include "animated_sprite.h" // for AnimatedSprite
#include "moving_sprite.h" // for MovingSprite
#include "param.h" // for param
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
// Constructor
Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector<std::string> *animation)

View File

@@ -1,10 +1,11 @@
#pragma once
#include <SDL2/SDL.h>
#include "animatedsprite.h"
#include "utils.h"
#include <sstream>
#include <vector>
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint16, Uint32
#include <string> // for string
#include <vector> // for vector
#include "utils.h" // for circle_t
class AnimatedSprite;
class Texture;
// Cantidad de elementos del vector con los valores de la deformación del globo al rebotar
#define MAX_BOUNCE 10

View File

@@ -1,5 +1,7 @@
#include "bullet.h"
#include "param.h"
#include "param.h" // for param
#include "sprite.h" // for Sprite
class Texture;
// Constructor
Bullet::Bullet(int x, int y, int kind, bool poweredUp, int owner, SDL_Rect *playArea, Texture *texture)

View File

@@ -1,8 +1,10 @@
#pragma once
#include <SDL2/SDL.h>
#include "sprite.h"
#include "utils.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint8
#include "utils.h" // for circle_t
class Sprite;
class Texture;
// Tipos de bala
#define BULLET_UP 1

View File

@@ -1,9 +1,12 @@
#include "dbgtxt.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_rwops.h> // for SDL_RWFromMem
#include <SDL2/SDL_surface.h> // for SDL_LoadBMP_RW
namespace
{
SDL_Texture *dbg_tex = NULL;
SDL_Renderer *dbg_ren = NULL;
SDL_Texture *dbg_tex = nullptr;
SDL_Renderer *dbg_ren = nullptr;
}
void dbg_init(SDL_Renderer *renderer)

View File

@@ -1,6 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint8
void dbg_init(SDL_Renderer *renderer);
void dbg_print(int x, int y, const char *text, Uint8 r, Uint8 g, Uint8 b);

View File

@@ -1,7 +1,10 @@
#include "define_buttons.h"
#include "param.h"
#include "options.h"
#include "section.h"
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "section.h" // for name, name_e, options, options_e
#include "text.h" // for Text
#include "utils.h" // for op_controller_t, options_t, param_t, paramGame_t
// Constructor
DefineButtons::DefineButtons(Text *text)

View File

@@ -1,9 +1,11 @@
#pragma once
#include <SDL2/SDL.h>
#include "input.h"
#include "text.h"
#include "lang.h"
#include <SDL2/SDL_events.h> // for SDL_ControllerButtonEvent
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton
#include <string> // for string, basic_string
#include <vector> // for vector
#include "input.h" // for inputs_e
class Text;
struct db_button_t
{

View File

@@ -1,17 +1,38 @@
#include "director.h"
#include "utils.h"
#include "options.h"
#include "section.h"
#include <iostream>
#include <fstream>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include "dbgtxt.h"
#ifndef _WIN32
#include <pwd.h>
#endif
#include <SDL2/SDL.h> // for SDL_Init, SDL_Quit, SDL_INIT_EV...
#include <SDL2/SDL_audio.h> // for AUDIO_S16
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_gamecontroller.h> // for SDL_CONTROLLER_BUTTON_B, SDL_CO...
#include <SDL2/SDL_hints.h> // for SDL_SetHint, SDL_HINT_RENDER_DR...
#include <SDL2/SDL_scancode.h> // for SDL_SCANCODE_DOWN, SDL_SCANCODE_E
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <errno.h> // for errno, EACCES, EEXIST, ENAMETOO...
#include <pwd.h> // for getpwuid, passwd
#include <stdio.h> // for printf, perror, size_t
#include <string.h> // for strcmp
#include <sys/stat.h> // for stat, mkdir, S_IRWXU
#include <unistd.h> // for getuid
#include <cstdlib> // for exit, EXIT_FAILURE, rand, srand
#include <iostream> // for basic_ostream, operator<<, cout
#include <string> // for basic_string, operator+, allocator
#include "asset.h" // for Asset, assetType
#include "dbgtxt.h" // for dbg_init
#include "game.h" // for Game, GAME_MODE_DEMO_OFF, GAME_...
#include "hiscore_table.h" // for HiScoreTable
#include "input.h" // for inputs_e, Input
#include "instructions.h" // for Instructions
#include "intro.h" // for Intro
#include "jail_audio.h" // for JA_DeleteMusic, JA_DeleteSound
#include "logo.h" // for Logo
#include "manage_hiscore_table.h" // for ManageHiScoreTable
#include "options.h" // for options, loadOptionsFile, saveO...
#include "param.h" // for param, loadParamsFromFile
#include "screen.h" // for Screen
#include "section.h" // for name_e, name, options, options_e
#include "title.h" // for Title
#include "utils.h" // for music_file_t, sound_file_t, opt...
// Constructor
Director::Director(int argc, char *argv[])

View File

@@ -1,22 +1,20 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "screen.h"
#include "text.h"
#include "utils.h"
#include "fade.h"
#include "game.h"
#include "intro.h"
#include "item.h"
#include "lang.h"
#include "logo.h"
#include "player.h"
#include "title.h"
#include "param.h"
#include "manage_hiscore_table.h"
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_video.h> // for SDL_Window
#include <string> // for string, basic_string
#include <vector> // for vector
#include "lang.h" // for lang_e
#include "utils.h" // for music_file_t, sound_file_t
class Asset;
class Game;
class HiScoreTable;
class Input;
class Instructions;
class Intro;
class Logo;
class Screen;
class Title;
// Textos
#define WINDOW_CAPTION "Coffee Crisis Arcade Edition"

View File

@@ -1,5 +1,7 @@
#include "enemy_formations.h"
#include "param.h"
#include "balloon.h" // for BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
#include "param.h" // for param
#include "utils.h" // for paramGame_t, param_t, zone_t, BLOCK
// Constructor
EnemyFormations::EnemyFormations()

View File

@@ -1,9 +1,5 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "balloon.h"
#define NUMBER_OF_ENEMY_FORMATIONS 100
#define MAX_NUMBER_OF_ENEMIES_IN_A_FORMATION 50

View File

@@ -1,4 +1,5 @@
#include "enter_name.h"
#include <algorithm> // for max, min
// Constructor
EnterName::EnterName(std::string *name)

View File

@@ -1,4 +1,6 @@
#include "explosions.h"
#include "animated_sprite.h" // for AnimatedSprite
class Texture;
// Constructor
Explosions::Explosions()

View File

@@ -1,9 +1,9 @@
#pragma once
#include <SDL2/SDL.h>
#include "texture.h"
#include "animatedsprite.h"
#include <vector>
#include <string> // for string
#include <vector> // for vector
class AnimatedSprite;
class Texture;
struct explosion_texture_t
{

View File

@@ -1,6 +1,10 @@
#include "fade.h"
#include "param.h"
#include <iostream>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND, SDL_BLENDMODE_NONE
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <stdlib.h> // for rand
#include <algorithm> // for min, max
#include "param.h" // for param
#include "utils.h" // for param_t, paramGame_t, paramFade_t
// Constructor
Fade::Fade(SDL_Renderer *renderer)

View File

@@ -1,8 +1,9 @@
#pragma once
#include <SDL2/SDL.h>
#include "texture.h"
#include "utils.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint16
#include <vector> // for vector
// Tipos de fundido
#define FADE_FULLSCREEN 0

View File

@@ -1,7 +1,36 @@
#include "game.h"
#include "param.h"
#include "options.h"
#include <fstream>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3, SDLK_h
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_R...
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_FOCUS_GAINED, SDL_...
#include <stdlib.h> // for rand
#include <algorithm> // for min
#include <fstream> // for basic_ifstream
#include <iostream> // for char_traits, basic_istream, ifstream
#include "asset.h" // for Asset
#include "background.h" // for Background
#include "balloon.h" // for Balloon, BALLOON_SPEED_1, BALLOON_...
#include "bullet.h" // for Bullet, BULLET_LEFT, BULLET_RIGHT
#include "enemy_formations.h" // for stage_t, EnemyFormations, enemyIni...
#include "explosions.h" // for Explosions
#include "fade.h" // for Fade, FADE_RANDOM_SQUARE, FADE_VEN...
#include "input.h" // for inputs_e, Input, INPUT_DO_NOT_ALLO...
#include "item.h" // for Item, ITEM_COFFEE_MACHINE, ITEM_CLOCK
#include "jail_audio.h" // for JA_PlaySound, JA_DeleteSound, JA_L...
#include "lang.h" // for getText
#include "manage_hiscore_table.h" // for ManageHiScoreTable
#include "options.h" // for options
#include "param.h" // for param
#include "player.h" // for Player, PLAYER_STATUS_PLAYING, PLA...
#include "scoreboard.h" // for Scoreboard, scoreboard_modes_e
#include "screen.h" // for Screen
#include "smart_sprite.h" // for SmartSprite
#include "text.h" // for Text, TXT_CENTER
#include "texture.h" // for Texture
struct JA_Music_t;
struct JA_Sound_t;
#define GAME_OVER_COUNTER 350

View File

@@ -1,28 +1,29 @@
#pragma once
#include <SDL2/SDL.h>
#include "balloon.h"
#include "bullet.h"
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "movingsprite.h"
#include "screen.h"
#include "smartsprite.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "fade.h"
#include "item.h"
#include "player.h"
#include "scoreboard.h"
#include "background.h"
#include "lang.h"
#include "manage_hiscore_table.h"
#include "explosions.h"
#include "enemy_formations.h"
#include "section.h"
#include <iostream>
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <string> // for string
#include <vector> // for vector
#include "section.h" // for options_e
#include "utils.h" // for demoKeys_t, color_t, hiScoreEntry_t
class Asset;
class Background;
class Balloon;
class Bullet;
class EnemyFormations;
class Explosions;
class Fade;
class Input;
class Item;
class Player;
class Scoreboard;
class Screen;
class SmartSprite;
class Text;
class Texture;
struct JA_Music_t;
struct JA_Sound_t;
#define GAME_MODE_DEMO_OFF false
#define GAME_MODE_DEMO_ON true

View File

@@ -1,5 +1,15 @@
#include "game_logo.h"
#include "param.h"
#include <algorithm> // for max
#include <string> // for basic_string
#include "animated_sprite.h" // for AnimatedSprite
#include "asset.h" // for Asset
#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_PlaySound
#include "param.h" // for param
#include "screen.h" // for Screen
#include "smart_sprite.h" // for SmartSprite
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
#include "utils.h" // for param_t, paramGame_t, paramTitle_t
// Constructor
GameLogo::GameLogo(int x, int y)

View File

@@ -1,10 +1,13 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "screen.h"
#include "smartsprite.h"
#include "jail_audio.h"
#include <SDL2/SDL_render.h> // for SDL_Renderer
class AnimatedSprite;
class Asset;
class Screen;
class SmartSprite;
class Sprite;
class Texture;
struct JA_Sound_t;
// Clase GameLogo
class GameLogo

View File

@@ -1,9 +1,12 @@
#include "global_inputs.h"
#include "section.h"
#include "screen.h"
#include "input.h"
#include "lang.h"
#include "options.h"
#include <string> // for basic_string, operator+
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_REPEAT
#include "jail_audio.h" // for JA_EnableMusic, JA_EnableSound
#include "lang.h" // for getText
#include "options.h" // for options
#include "screen.h" // for Screen
#include "section.h" // for options_e, name, name_e, options
#include "utils.h" // for op_audio_t, options_t, op_music_t, boolToOnOff
// Termina
void quit(section::options_e code)

View File

@@ -1,8 +1,22 @@
#include <iostream>
#include "global_inputs.h"
#include "hiscore_table.h"
#include "options.h"
#include "param.h"
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
#include <algorithm> // for max
#include <vector> // for vector
#include "asset.h" // for Asset
#include "background.h" // for Background
#include "fade.h" // for Fade, FADE_IN, FADE_OUT, FADE_RANDOM...
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "text.h" // for Text, TXT_CENTER, TXT_SHADOW, TXT_COLOR
#include "utils.h" // for param_t, paramGame_t, hiScoreEntry_t
// Constructor
HiScoreTable::HiScoreTable(JA_Music_t *music)

View File

@@ -1,17 +1,18 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "screen.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "lang.h"
#include "fade.h"
#include "background.h"
#include "section.h"
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint16, Uint32
#include <string> // for string
#include "section.h" // for options_e
class Asset;
class Background;
class Fade;
class Input;
class Screen;
class Text;
struct JA_Music_t;
/*
Esta clase gestiona un estado del programa. Se encarga de mostrar la tabla con las puntuaciones

View File

@@ -1,5 +1,9 @@
#include "input.h"
#include <iostream>
#include <SDL2/SDL.h> // for SDL_INIT_GAMECONTROLLER, SDL_InitSubS...
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_events.h> // for SDL_ENABLE
#include <SDL2/SDL_keyboard.h> // for SDL_GetKeyboardState
#include <iostream> // for basic_ostream, operator<<, cout, basi...
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Input *Input::input = nullptr;

View File

@@ -1,8 +1,11 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton, SDL_G...
#include <SDL2/SDL_joystick.h> // for SDL_Joystick
#include <SDL2/SDL_scancode.h> // for SDL_Scancode
#include <SDL2/SDL_stdinc.h> // for Uint8
#include <string> // for string, basic_string
#include <vector> // for vector
/*
connectedControllers es un vector donde estan todos los mandos encontrados [0 .. n]

View File

@@ -1,8 +1,25 @@
#include "instructions.h"
#include "param.h"
#include "options.h"
#include "global_inputs.h"
#include <iostream>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
#include <algorithm> // for max
#include <string> // for basic_string
#include "asset.h" // for Asset
#include "fade.h" // for Fade, FADE_FULLSCREEN, FADE_IN
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state
#include "lang.h" // for getText
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for name, name_e, options, options_e
#include "sprite.h" // for Sprite
#include "text.h" // for Text, TXT_CENTER, TXT_COLOR, TXT_SHADOW
#include "texture.h" // for Texture
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_STATIC
#include "utils.h" // for param_t, paramGame_t, color_t, shdwT...
struct JA_Music_t;
// Constructor
Instructions::Instructions(JA_Music_t *music)

View File

@@ -1,17 +1,19 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "screen.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "lang.h"
#include "tiledbg.h"
#include "fade.h"
#include "section.h"
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <vector> // for vector
class Asset;
class Fade;
class Input;
class Screen;
class Sprite;
class Text;
class Texture;
class Tiledbg;
struct JA_Music_t;
/*
Esta clase gestiona un estado del programa. Se encarga de poner en pantalla

View File

@@ -1,7 +1,22 @@
#include "global_inputs.h"
#include "intro.h"
#include "options.h"
#include "param.h"
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
#include <string> // for basic_string
#include "asset.h" // for Asset
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input
#include "jail_audio.h" // for JA_StopMusic, JA_PlayMusic
#include "lang.h" // for getText
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for name, name_e, options, options_e
#include "smart_sprite.h" // for SmartSprite
#include "text.h" // for Text
#include "texture.h" // for Texture
#include "utils.h" // for paramGame_t, param_t, zone_t, BLOCK
#include "writer.h" // for Writer
struct JA_Music_t;
// Constructor
Intro::Intro(JA_Music_t *music)

View File

@@ -1,16 +1,16 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "screen.h"
#include "smartsprite.h"
#include "utils.h"
#include "writer.h"
#include "lang.h"
#include <vector>
#include "section.h"
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_stdinc.h> // for Uint32, Uint8
#include <vector> // for vector
class Asset;
class Input;
class Screen;
class SmartSprite;
class Text;
class Texture;
class Writer;
struct JA_Music_t;
/*
Esta clase gestiona un estado del programa. Se encarga de mostrar la secuencia

View File

@@ -1,5 +1,8 @@
#include "item.h"
#include "param.h"
#include <stdlib.h> // for rand
#include "animated_sprite.h" // for AnimatedSprite
#include "param.h" // for param
class Texture;
// Constructor
Item::Item(int kind, float x, float y, SDL_Rect *playArea, Texture *texture, std::vector<std::string> *animation)

View File

@@ -1,8 +1,12 @@
#pragma once
#include <SDL2/SDL.h>
#include "animatedsprite.h"
#include "utils.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint16
#include <string> // for string
#include <vector> // for vector
#include "utils.h" // for circle_t
class AnimatedSprite;
class Texture;
// Tipos de objetos
#define ITEM_POINTS_1_DISK 1

View File

@@ -1,8 +1,10 @@
#ifndef JA_USESDLMIXER
#include "jail_audio.h"
#include "stb_vorbis.c"
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdint.h> // for uint8_t
#include <stdio.h> // for NULL, fseek, fclose, fopen, fread, ftell, FILE
#include <stdlib.h> // for free, malloc
#include "stb_vorbis.c" // for stb_vorbis_decode_memory
#define JA_MAX_SIMULTANEOUS_CHANNELS 5

View File

@@ -1,12 +1,13 @@
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_audio.h> // for SDL_AudioFormat
#include <SDL2/SDL_stdinc.h> // for Uint32, Uint8
struct JA_Music_t; // lines 5-5
struct JA_Sound_t; // lines 6-6
enum JA_Channel_state { JA_CHANNEL_INVALID, JA_CHANNEL_FREE, JA_CHANNEL_PLAYING, JA_CHANNEL_PAUSED, JA_SOUND_DISABLED };
enum JA_Music_state { JA_MUSIC_INVALID, JA_MUSIC_PLAYING, JA_MUSIC_PAUSED, JA_MUSIC_STOPPED, JA_MUSIC_DISABLED };
struct JA_Sound_t;
struct JA_Music_t;
void JA_Init(const int freq, const SDL_AudioFormat format, const int channels);
void JA_Quit();

View File

@@ -1,7 +1,10 @@
#ifndef NO_SHADERS
#include "jshader.h"
#include <iostream>
#include "jail_shader.h"
#include <SDL2/SDL_rect.h> // for SDL_Point
#include <stdlib.h> // for NULL, free, malloc, exit
#include <string.h> // for strncmp
#include <iostream> // for basic_ostream, char_traits, operator<<
#ifdef __APPLE__
#include "CoreFoundation/CoreFoundation.h"
@@ -14,7 +17,6 @@
#endif //!ESSENTIAL_GL_PRACTICES_SUPPORT_GL3
#else
#include <SDL2/SDL_opengl.h>
#include <SDL2/SDL_opengl_glext.h>
#endif
namespace shader

View File

@@ -2,7 +2,8 @@
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_render.h> // for SDL_Texture
#include <SDL2/SDL_video.h> // for SDL_Window
// TIPS:
// =======================================================================

View File

@@ -1,6 +1,6 @@
#include "lang.h"
#include <iostream>
#include <fstream>
#include <fstream> // for basic_ifstream, basic_istream, ifstream
#include <vector> // for vector
namespace lang
{

View File

@@ -1,8 +1,6 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#include <string> // for string
namespace lang
{

View File

@@ -1,8 +1,17 @@
#include "logo.h"
#include "param.h"
#include "options.h"
#include "global_inputs.h"
#include <iostream>
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
#include <string> // for basic_string
#include "asset.h" // for Asset
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input
#include "jail_audio.h" // for JA_StopMusic
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for name, name_e, options, options_e
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
// Constructor
Logo::Logo()

View File

@@ -1,15 +1,15 @@
#pragma once
#include <SDL2/SDL.h>
#include <vector>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "lang.h"
#include "screen.h"
#include "section.h"
#include "sprite.h"
#include "utils.h"
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_rect.h> // for SDL_Point
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <vector> // for vector
#include "utils.h" // for color_t
class Asset;
class Input;
class Screen;
class Sprite;
class Texture;
/*
Esta clase gestiona un estado del programa. Se encarga de dibujar por pantalla el

View File

@@ -7,8 +7,9 @@ Actualizando a la versión "Arcade Edition" en 08/05/2024
*/
#include "director.h"
#include <stdio.h>
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
#include <string> // for basic_string, operator<<, string
#include "director.h" // for Director
int main(int argc, char *argv[])
{

View File

@@ -1,5 +1,10 @@
#include "manage_hiscore_table.h"
#include <iostream>
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_rwops.h> // for SDL_RWread, SDL_RWwrite, SDL_RWFromFile
#include <stdlib.h> // for free, malloc
#include <algorithm> // for sort
#include <iostream> // for basic_ostream, char_traits, operator<<
#include "utils.h" // for hiScoreEntry_t
// Constructor
ManageHiScoreTable::ManageHiScoreTable(std::vector<hiScoreEntry_t> *table)

View File

@@ -1,7 +1,8 @@
#pragma once
#include <algorithm>
#include "utils.h"
#include <string> // for string
#include <vector> // for vector
struct hiScoreEntry_t;
/*
Esta clase sirve para añadir elementos hiScoreEntry_r a un vector (tabla), de manera

View File

@@ -1,4 +1,5 @@
#include "movingsprite.h"
#include "moving_sprite.h"
#include "texture.h" // for Texture
// Constructor
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture)

View File

@@ -1,7 +1,10 @@
#pragma once
#include <SDL2/SDL.h>
#include "sprite.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
#include <SDL2/SDL_render.h> // for SDL_RendererFlip
#include <SDL2/SDL_stdinc.h> // for Uint16
#include "sprite.h" // for Sprite
class Texture;
// Clase MovingSprite. Añade posicion y velocidad en punto flotante
class MovingSprite : public Sprite

View File

@@ -1,8 +1,12 @@
#include "notify.h"
#include "options.h"
#include <string>
#include <stdio.h>
#include <iostream>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <string> // for basic_string, char_traits, string
#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_Pla...
#include "options.h" // for options
#include "sprite.h" // for Sprite
#include "text.h" // for Text
#include "texture.h" // for Texture
// Constructor
Notify::Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile)

View File

@@ -1,12 +1,14 @@
#pragma once
#include <SDL2/SDL.h>
#include "jail_audio.h"
#include "sprite.h"
#include "text.h"
#include "texture.h"
#include "utils.h"
#include <vector>
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <string> // for basic_string, string
#include <vector> // for vector
#include "utils.h" // for color_t
class Sprite;
class Text;
class Texture;
struct JA_Sound_t;
#ifndef NOTIFY_H
#define NOTIFY_H

View File

@@ -1,8 +1,14 @@
#include "options.h"
#include "screen.h"
#include "lang.h"
#include <iostream>
#include <fstream>
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton, SDL_C...
#include <SDL2/SDL_video.h> // for SDL_WINDOW_FULLSCREEN, SDL_WIND...
#include <algorithm> // for max, min
#include <fstream> // for char_traits, basic_ostream, ope...
#include <iostream> // for cout
#include <vector> // for vector
#include "input.h" // for inputs_e, INPUT_USE_ANY, INPUT_...
#include "lang.h" // for lang_e
#include "screen.h" // for SCREEN_FILTER_NEAREST, SCREEN_V...
#include "utils.h" // for op_controller_t, options_t, op_...
// Variables
options_t options;

View File

@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include <string> // for string
struct options_t;
// Variables
extern options_t options;

View File

@@ -1,6 +1,7 @@
#include "param.h"
#include <iostream>
#include <fstream>
#include <fstream> // for char_traits, basic_ostream, basic_ifstream, basi...
#include <iostream> // for cout
#include "utils.h" // for param_t, paramGame_t, zone_t, paramBalloon_t
param_t param;

View File

@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include <string> // for string
struct param_t;
extern param_t param;

View File

@@ -1,5 +1,12 @@
#include "player.h"
#include "param.h"
#include <SDL2/SDL_render.h> // for SDL_FLIP_HORIZONTAL, SDL_FLIP_NONE, SDL...
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <stdlib.h> // for rand
#include <algorithm> // for max, min
#include "animated_sprite.h" // for AnimatedSprite
#include "input.h" // for inputs_e
#include "param.h" // for param
#include "texture.h" // for Texture
// Constructor
Player::Player(int id, float x, int y, SDL_Rect *playArea, std::vector<Texture *> texture, std::vector<std::vector<std::string> *> animations)

View File

@@ -1,11 +1,12 @@
#pragma once
#include <SDL2/SDL.h>
#include "animatedsprite.h"
#include "asset.h"
#include "input.h"
#include "texture.h"
#include "utils.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for circle_t
class AnimatedSprite;
class Texture;
// Estados del jugador
#define PLAYER_STATUS_WALKING_LEFT 0

View File

@@ -1,5 +1,13 @@
#include "scoreboard.h"
#include <math.h>
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <math.h> // for roundf
#include "asset.h" // for Asset
#include "lang.h" // for getText
#include "sprite.h" // for Sprite
#include "text.h" // for Text
#include "texture.h" // for Texture
// Constructor
Scoreboard::Scoreboard(SDL_Renderer *renderer)

View File

@@ -1,12 +1,15 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "screen.h"
#include "sprite.h"
#include "text.h"
#include "utils.h"
#include "lang.h"
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <string> // for string, basic_string
#include <vector> // for vector
#include "utils.h" // for color_t
class Asset;
class Sprite;
class Text;
class Texture;
// Defines
#define SCOREBOARD_LEFT_PANEL 0

View File

@@ -1,13 +1,21 @@
#include "screen.h"
#include "options.h"
#include <string>
#include <iostream>
#include <fstream>
#include <streambuf>
#include <SDL2/SDL_events.h> // for SDL_DISABLE, SDL_ENABLE
#include <SDL2/SDL_mouse.h> // for SDL_ShowCursor
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <algorithm> // for max, min
#include <fstream> // for basic_ifstream, ifstream
#include <iterator> // for istreambuf_iterator, operator!=
#include <string> // for basic_string, operator+, to_string, cha...
#include "asset.h" // for Asset
#include "dbgtxt.h" // for dbg_print
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_REPEAT
#include "notify.h" // for Notify
#include "options.h" // for options
#ifndef NO_SHADERS
#include "jshader.h"
#include "jail_shader.h" // for init, render
#endif
#include "dbgtxt.h"
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Screen *Screen::screen = nullptr;

View File

@@ -1,11 +1,15 @@
#pragma once
#include <SDL2/SDL.h>
#include <vector>
#include "asset.h"
#include "input.h"
#include "notify.h"
#include "utils.h"
#include <SDL2/SDL_blendmode.h> // for SDL_BlendMode
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <SDL2/SDL_video.h> // for SDL_Window
#include <string> // for basic_string, string
#include "utils.h" // for color_t
class Asset;
class Input;
class Notify;
#define SCREEN_FILTER_NEAREST 0
#define SCREEN_FILTER_LINEAL 1

View File

@@ -1,7 +1,5 @@
#pragma once
#include <SDL2/SDL.h>
namespace section
{
// Secciones del programa

View File

@@ -1,4 +1,6 @@
#include "smartsprite.h"
#include "smart_sprite.h"
#include "moving_sprite.h" // for MovingSprite
class Texture;
// Constructor
SmartSprite::SmartSprite(Texture *texture)

View File

@@ -1,9 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "animatedsprite.h"
#include "utils.h"
#include <vector>
#include "animated_sprite.h" // for AnimatedSprite
class Texture;
// Clase SmartSprite
class SmartSprite : public AnimatedSprite

View File

@@ -1,4 +1,5 @@
#include "sprite.h"
#include "texture.h" // for Texture
// Constructor
Sprite::Sprite(int x, int y, int w, int h, Texture *texture)

View File

@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "texture.h"
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
class Texture;
// Clase sprite
class Sprite

View File

@@ -1,7 +1,9 @@
#include "text.h"
#include <iostream>
#include <fstream>
#include <fstream> // for char_traits, basic_ostream, basic_ifstream, ope...
#include <iostream> // for cout
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
#include "utils.h" // for color_t
// Llena una estructuta textFile_t desde un fichero
textFile_t LoadTextFile(std::string file, bool verbose)

View File

@@ -1,7 +1,11 @@
#pragma once
#include "sprite.h"
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint8
#include <string> // for string
#include "utils.h"
class Sprite; // lines 6-6
class Texture; // lines 7-7
#define TXT_COLOR 1
#define TXT_SHADOW 2

View File

@@ -1,12 +1,17 @@
#include "texture.h"
#include <SDL2/SDL_error.h> // for SDL_GetError
#include <SDL2/SDL_surface.h> // for SDL_CreateRGBSurfaceWithFormatFrom
#include <fcntl.h> // for SEEK_END, SEEK_SET
#include <stdio.h> // for fseek, fclose, fopen, fread, ftell, NULL
#include <stdlib.h> // for malloc, free, exit
#include <iostream> // for basic_ostream, operator<<, cout, endl
#include "gif.c" // for LoadGif, LoadPalette
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "gif.c"
#include <iostream>
#include "stb_image.h" // for stbi_failure_reason, stbi_image_free
// Constructor
Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose)
Texture::Texture(SDL_Renderer *renderer, std::string path)
{
// Copia punteros
this->renderer = renderer;
@@ -29,7 +34,7 @@ Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose)
// .png
if (extension == "png")
{
loadFromFile(path, verbose);
loadFromFile(path);
}
// .gif
@@ -53,7 +58,7 @@ Texture::~Texture()
}
// Carga una imagen desde un fichero
bool Texture::loadFromFile(std::string path, bool verbose)
bool Texture::loadFromFile(std::string path)
{
const std::string filename = path.substr(path.find_last_of("\\/") + 1);
int req_format = STBI_rgb_alpha;
@@ -61,15 +66,16 @@ bool Texture::loadFromFile(std::string path, bool verbose)
unsigned char *data = stbi_load(path.c_str(), &width, &height, &orig_format, req_format);
if (data == nullptr)
{
SDL_Log("Loading image failed: %s", stbi_failure_reason());
#ifdef VERBOSE
std::cout << "Loading image failed: " << stbi_failure_reason() << std::endl;
#endif
exit(1);
}
else
{
if (verbose)
{
std::cout << "Image loaded: " << filename.c_str() << std::endl;
}
#ifdef VERBOSE
std::cout << "Image loaded: " << filename.c_str() << std::endl;
#endif
}
int depth, pitch;
@@ -97,10 +103,9 @@ bool Texture::loadFromFile(std::string path, bool verbose)
SDL_Surface *loadedSurface = SDL_CreateRGBSurfaceWithFormatFrom((void *)data, width, height, depth, pitch, pixel_format);
if (loadedSurface == nullptr)
{
if (verbose)
{
std::cout << "Unable to load image " << path.c_str() << std::endl;
}
#ifdef VERBOSE
std::cout << "Unable to load image " << path.c_str() << std::endl;
#endif
}
else
{
@@ -108,10 +113,9 @@ bool Texture::loadFromFile(std::string path, bool verbose)
newTexture = SDL_CreateTextureFromSurface(renderer, loadedSurface);
if (newTexture == nullptr)
{
if (verbose)
{
std::cout << "Unable to create texture from " << path.c_str() << "! SDL Error: " << SDL_GetError() << std::endl;
}
#ifdef VERBOSE
std::cout << "Unable to create texture from " << path.c_str() << "! SDL Error: " << SDL_GetError() << std::endl;
#endif
}
else
{
@@ -227,7 +231,7 @@ int Texture::getHeight()
// Recarga la textura
bool Texture::reLoad()
{
return loadFromFile(path, renderer);
return loadFromFile(path);
}
// Obtiene la textura

View File

@@ -1,9 +1,12 @@
#pragma once
#include <SDL2/SDL.h>
#include <stdio.h>
#include <string>
#include <vector>
#include <SDL2/SDL_blendmode.h> // for SDL_BlendMode
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888, SDL_PixelF...
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_FLIP_NONE, SDL_TEX...
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint32, Uint16
#include <string> // for string, basic_string
#include <vector> // for vector
// Definiciones de tipos
struct surface_s
@@ -46,13 +49,13 @@ private:
public:
// Constructor
Texture(SDL_Renderer *renderer, std::string path = "", bool verbose = false);
Texture(SDL_Renderer *renderer, std::string path = "");
// Destructor
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(std::string path, bool verbose = false);
bool loadFromFile(std::string path);
// Crea una textura en blanco
bool createBlank(int width, int height, SDL_PixelFormatEnum format = SDL_PIXELFORMAT_RGBA8888, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);

View File

@@ -1,6 +1,10 @@
#include "screen.h"
#include "sprite.h"
#include "tiledbg.h"
#include "tiled_bg.h"
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
#include <SDL2/SDL_stdinc.h> // for SDL_sinf
#include <stdlib.h> // for rand
#include "screen.h" // for Screen
#include "sprite.h" // for Sprite
#include "texture.h" // for Texture
// Constructor
Tiledbg::Tiledbg(std::string texturePath, SDL_Rect pos, int mode)

View File

@@ -1,6 +1,8 @@
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <string> // for string, basic_string
// Modos de funcionamiento para el tileado de fondo
#define TILED_MODE_CIRCLE 0

View File

@@ -1,7 +1,26 @@
#include "global_inputs.h"
#include "options.h"
#include "param.h"
#include "title.h"
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
#include <string> // for allocator, basic_string, char_traits
#include <vector> // for vector
#include "asset.h" // for Asset
#include "define_buttons.h" // for DefineButtons
#include "fade.h" // for Fade, FADE_RANDOM_SQUARE
#include "game_logo.h" // for GameLogo
#include "global_inputs.h" // for checkGlobalInputs
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_RE...
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
#include "lang.h" // for getText
#include "options.h" // for options
#include "param.h" // for param
#include "screen.h" // for Screen
#include "section.h" // for options_e, options, name_e, name
#include "sprite.h" // for Sprite
#include "text.h" // for Text, TXT_CENTER, TXT_SHADOW
#include "texture.h" // for Texture
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_RANDOM
struct JA_Music_t;
// Constructor
Title::Title(JA_Music_t *music)

View File

@@ -1,25 +1,19 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "define_buttons.h"
#include "fade.h"
#include "game.h"
#include "game_logo.h"
#include "hiscore_table.h"
#include "input.h"
#include "instructions.h"
#include "item.h"
#include "jail_audio.h"
#include "lang.h"
#include "movingsprite.h"
#include "screen.h"
#include "section.h"
#include "smartsprite.h"
#include "sprite.h"
#include "text.h"
#include "tiledbg.h"
#include "utils.h"
#include <SDL2/SDL_events.h> // for SDL_Event
#include <SDL2/SDL_stdinc.h> // for Uint32
#include "utils.h" // for section_t
class Asset;
class DefineButtons;
class Fade;
class GameLogo;
class Input;
class Screen;
class Sprite;
class Text;
class Texture;
class Tiledbg;
struct JA_Music_t;
// Textos
#define TEXT_COPYRIGHT "@2020,2024 JailDesigner"

View File

@@ -1,5 +1,7 @@
#include "utils.h"
#include <math.h>
#include <stdlib.h> // for free, malloc
struct JA_Music_t;
struct JA_Sound_t;
// Colores
const color_t bgColor = {0x27, 0x27, 0x36};

View File

@@ -1,10 +1,15 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <vector>
#include "input.h"
#include "jail_audio.h"
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint32
#include <stdint.h> // for int32_t
#include <string> // for string, basic_string
#include <vector> // for vector
#include "input.h" // for inputs_e
struct JA_Music_t;
struct JA_Sound_t;
// Dificultad del juego
#define DIFFICULTY_EASY 0

View File

@@ -1,4 +1,5 @@
#include "writer.h"
#include "text.h" // for Text
// Constructor
Writer::Writer(Text *text)

View File

@@ -1,8 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "sprite.h"
#include "text.h"
#include <string> // for string, basic_string
class Text;
// Clase Writer. Pinta texto en pantalla letra a letra a partir de una cadena y un bitmap
class Writer