Pasaeta de include-what-you-use
This commit is contained in:
@@ -2,16 +2,14 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint16, Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint16, Uint32, Uint8
|
||||||
#include <memory> // for unique_ptr
|
#include <memory> // for unique_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
class Background;
|
class Background; // lines 8-8
|
||||||
class Fade;
|
class Fade; // lines 9-9
|
||||||
class Text;
|
class Text; // lines 10-10
|
||||||
enum class FadeMode : Uint8;
|
enum class FadeMode : Uint8; // lines 11-11
|
||||||
struct JA_Music_t; // lines 14-14
|
struct JA_Music_t; // lines 12-12
|
||||||
|
|
||||||
struct JA_Music_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Esta clase gestiona un estado del programa. Se encarga de mostrar la tabla con las puntuaciones
|
Esta clase gestiona un estado del programa. Se encarga de mostrar la tabla con las puntuaciones
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
#include "instructions.h"
|
#include "instructions.h"
|
||||||
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_QUIT
|
||||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
||||||
#include <algorithm> // for max
|
#include <algorithm> // for max
|
||||||
#include <string> // for basic_string
|
#include <utility> // for move
|
||||||
#include "asset.h" // for Asset
|
#include "asset.h" // for Asset
|
||||||
#include "fade.h" // for Fade, FadeType::FULLSCREEN, FadeMode::IN
|
#include "fade.h" // for Fade, FadeMode, FadeType
|
||||||
#include "global_inputs.h" // for globalInputs::check
|
#include "global_inputs.h" // for check
|
||||||
#include "input.h" // for Input
|
#include "input.h" // for Input
|
||||||
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state
|
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state
|
||||||
#include "lang.h" // for getText
|
#include "lang.h" // for getText
|
||||||
#include "param.h" // for param
|
#include "param.h" // for param
|
||||||
#include "screen.h" // for Screen
|
#include "screen.h" // for Screen
|
||||||
#include "section.h" // for name, SectionName, options, SectionOptions
|
#include "section.h" // for Name, name, Options, options
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "text.h" // for Text, TEXT_CENTER, TEXT_COLOR, TEXT_SHADOW
|
#include "text.h" // for Text, TEXT_CENTER, TEXT_COLOR, TEXT_...
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_STATIC
|
#include "tiled_bg.h" // for Tiledbg, TILED_MODE_STATIC
|
||||||
#include "utils.h" // for Param, ParamGame, Color, shdwT...
|
#include "utils.h" // for Param, ParamGame, Color, shdw_txt_color
|
||||||
struct JA_Music_t;
|
struct JA_Music_t; // lines 22-22
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Instructions::Instructions(JA_Music_t *music)
|
Instructions::Instructions(JA_Music_t *music)
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_events.h> // for SDL_Event
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
class Fade;
|
||||||
#include "fade.h"
|
class Sprite;
|
||||||
#include "sprite.h"
|
class Text;
|
||||||
#include "text.h"
|
class Texture;
|
||||||
#include "texture.h"
|
class Tiledbg;
|
||||||
#include "tiled_bg.h"
|
struct JA_Music_t; // lines 14-14
|
||||||
struct JA_Music_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Esta clase gestiona un estado del programa. Se encarga de poner en pantalla
|
Esta clase gestiona un estado del programa. Se encarga de poner en pantalla
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
#include "intro.h"
|
#include "intro.h"
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_QUIT, SDL...
|
||||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
||||||
#include <string> // for basic_string
|
#include <utility> // for move
|
||||||
#include "asset.h" // for Asset
|
#include "asset.h" // for Asset
|
||||||
#include "global_inputs.h" // for globalInputs::check
|
#include "global_inputs.h" // for check
|
||||||
#include "input.h" // for Input
|
#include "input.h" // for Input
|
||||||
#include "jail_audio.h" // for JA_StopMusic, JA_PlayMusic
|
#include "jail_audio.h" // for JA_StopMusic, JA_PlayMusic
|
||||||
#include "lang.h" // for getText
|
#include "lang.h" // for getText
|
||||||
#include "param.h" // for param
|
#include "param.h" // for param
|
||||||
#include "screen.h" // for Screen
|
#include "screen.h" // for Screen
|
||||||
#include "section.h" // for name, SectionName, options, SectionOptions
|
#include "section.h" // for Name, name, Options, options
|
||||||
#include "smart_sprite.h" // for SmartSprite
|
#include "smart_sprite.h" // for SmartSprite
|
||||||
#include "text.h" // for Text
|
#include "text.h" // for Text
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
#include "utils.h" // for ParamGame, Param, Zone, BLOCK
|
#include "utils.h" // for Param, ParamGame, Zone, BLOCK, Color
|
||||||
#include "writer.h" // for Writer
|
#include "writer.h" // for Writer
|
||||||
struct JA_Music_t;
|
struct JA_Music_t; // lines 19-19
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Intro::Intro(JA_Music_t *music)
|
Intro::Intro(JA_Music_t *music)
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_events.h> // for SDL_Event
|
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32, Uint8
|
#include <SDL2/SDL_stdinc.h> // for Uint32, Uint8
|
||||||
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
#include "smart_sprite.h" // for SmartSprite
|
||||||
#include "smart_sprite.h"
|
#include "writer.h" // for Writer
|
||||||
#include "texture.h"
|
class Text;
|
||||||
#include "text.h"
|
class Texture;
|
||||||
#include "writer.h"
|
struct JA_Music_t; // lines 11-11
|
||||||
struct JA_Music_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Esta clase gestiona un estado del programa. Se encarga de mostrar la secuencia
|
Esta clase gestiona un estado del programa. Se encarga de mostrar la secuencia
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint16
|
#include <SDL2/SDL_stdinc.h> // for Uint16
|
||||||
|
#include <memory> // for shared_ptr, unique_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
#include "animated_sprite.h" // for AnimatedSprite
|
||||||
#include "utils.h" // for Circle
|
#include "utils.h" // for Circle
|
||||||
#include "animated_sprite.h"
|
class Texture;
|
||||||
#include "texture.h"
|
|
||||||
|
|
||||||
// Tipos de objetos
|
// Tipos de objetos
|
||||||
constexpr int ITEM_POINTS_1_DISK = 1;
|
constexpr int ITEM_POINTS_1_DISK = 1;
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
#include "logo.h"
|
#include "logo.h"
|
||||||
|
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_QUIT, SDL...
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
#include <SDL2/SDL_video.h> // for SDL_WINDOWEVENT_SIZE_CHANGED
|
||||||
#include <string> // for basic_string
|
#include <utility> // for move
|
||||||
#include "asset.h" // for Asset
|
#include "asset.h" // for Asset
|
||||||
#include "global_inputs.h" // for globalInputs::check
|
#include "global_inputs.h" // for check
|
||||||
#include "input.h" // for Input
|
#include "input.h" // for Input
|
||||||
#include "jail_audio.h" // for JA_StopMusic
|
#include "jail_audio.h" // for JA_StopMusic
|
||||||
#include "param.h" // for param
|
#include "param.h" // for param
|
||||||
#include "screen.h" // for Screen
|
#include "screen.h" // for Screen
|
||||||
#include "section.h" // for name, SectionName, options, SectionOptions
|
#include "section.h" // for Name, name, Options, options
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_events.h> // for SDL_Event
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Point
|
#include <SDL2/SDL_rect.h> // for SDL_Point
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
#include "sprite.h" // for Sprite
|
||||||
#include "utils.h" // for Color
|
#include "utils.h" // for Color
|
||||||
#include "sprite.h"
|
class Texture;
|
||||||
#include "texture.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Esta clase gestiona un estado del programa. Se encarga de dibujar por pantalla el
|
Esta clase gestiona un estado del programa. Se encarga de dibujar por pantalla el
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ Actualizando a la versión "Arcade Edition" en 08/05/2024
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream> // for basic_ostream, char_traits, operator<<, cout
|
#include <iostream> // for char_traits, basic_ostream, operator<<, cout
|
||||||
#include <string> // for basic_string, operator<<, string
|
#include <memory> // for make_unique, unique_ptr
|
||||||
#include <memory>
|
|
||||||
#include "director.h" // for Director
|
#include "director.h" // for Director
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include <SDL2/SDL_render.h> // for SDL_RendererFlip
|
#include <SDL2/SDL_render.h> // for SDL_RendererFlip
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint16
|
#include <SDL2/SDL_stdinc.h> // for Uint16
|
||||||
#include <memory>
|
#include <memory> // for shared_ptr
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "texture.h"
|
class Texture;
|
||||||
|
|
||||||
// Clase MovingSprite. Añade posicion y velocidad en punto flotante
|
// Clase MovingSprite. Añade posicion y velocidad en punto flotante
|
||||||
class MovingSprite : public Sprite
|
class MovingSprite : public Sprite
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
#include <string> // for basic_string, char_traits, string
|
#include <string> // for string
|
||||||
#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_Pla...
|
#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_Pla...
|
||||||
#include "options.h" // for options
|
#include "param.h" // for param
|
||||||
#include "param.h"
|
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "text.h" // for Text
|
#include "text.h" // for Text
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <string> // for basic_string, string
|
#include <memory> // for shared_ptr, unique_ptr
|
||||||
|
#include <string> // for string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
|
||||||
#include "utils.h" // for Color
|
#include "utils.h" // for Color
|
||||||
#include "text.h"
|
class Sprite;
|
||||||
#include "texture.h"
|
class Text;
|
||||||
#include "sprite.h"
|
class Texture;
|
||||||
struct JA_Sound_t;
|
struct JA_Sound_t; // lines 12-12
|
||||||
|
|
||||||
class Notify
|
class Notify
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "on_screen_help.h"
|
#include "on_screen_help.h"
|
||||||
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
#include <memory> // for make_unique, unique_ptr
|
#include <memory> // for make_unique, make_shared, unique_ptr
|
||||||
#include <string> // for basic_string
|
|
||||||
#include "asset.h" // for Asset
|
#include "asset.h" // for Asset
|
||||||
#include "lang.h" // for getText
|
#include "lang.h" // for getText
|
||||||
#include "param.h" // for param
|
#include "param.h" // for param
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "text.h" // for Text
|
#include "text.h" // for Text
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
#include "utils.h" // for easeInOutSine, ParamGame, Param
|
#include "utils.h" // for easeInOutSine, Param, ParamGame
|
||||||
|
|
||||||
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
|
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
|
||||||
OnScreenHelp *OnScreenHelp::onScreenHelp = nullptr;
|
OnScreenHelp *OnScreenHelp::onScreenHelp = nullptr;
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Texture
|
#include <SDL2/SDL_render.h> // for SDL_Texture
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include <memory>
|
class Sprite;
|
||||||
#include "sprite.h" // lines 10-10
|
class Text;
|
||||||
#include "text.h"
|
|
||||||
|
|
||||||
enum class OnScreenHelpStatus
|
enum class OnScreenHelpStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include <memory> // for unique_ptr
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include <string> // for string, basic_string
|
#include <string> // for string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include "animated_sprite.h" // for AnimatedSprite
|
#include "animated_sprite.h" // for AnimatedSprite
|
||||||
#include "enter_name.h" // for EnterName
|
#include "enter_name.h" // for EnterName
|
||||||
#include "utils.h" // for Circle
|
#include "utils.h" // for Circle
|
||||||
#include "texture.h" // lines 12-12
|
class Texture;
|
||||||
enum class ScoreboardMode;
|
enum class InputType : int;
|
||||||
|
enum class ScoreboardMode; // lines 12-12
|
||||||
|
|
||||||
// Estados del jugador
|
// Estados del jugador
|
||||||
enum class PlayerStatus
|
enum class PlayerStatus
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
|
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include <memory> // for unique_ptr
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include <string> // for string, basic_string
|
#include <string> // for string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include "utils.h" // for Color
|
#include "utils.h" // for Color
|
||||||
#include "sprite.h" // lines 11-11
|
class Sprite;
|
||||||
#include "text.h" // lines 12-12
|
class Text;
|
||||||
#include "texture.h" // lines 13-13
|
class Texture;
|
||||||
|
|
||||||
// Defines
|
// Defines
|
||||||
constexpr int SCOREBOARD_LEFT_PANEL = 0;
|
constexpr int SCOREBOARD_LEFT_PANEL = 0;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory> // for shared_ptr
|
||||||
#include "animated_sprite.h" // for AnimatedSprite
|
#include "animated_sprite.h" // for AnimatedSprite
|
||||||
#include "texture.h"
|
class Texture;
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
// Clase SmartSprite
|
// Clase SmartSprite
|
||||||
class SmartSprite : public AnimatedSprite
|
class SmartSprite : public AnimatedSprite
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include <fstream> // for char_traits, basic_ostream, basic_ifstream, ope...
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
|
#include <fstream> // for basic_ostream, basic_ifstream, basic_istream
|
||||||
#include <iostream> // for cout
|
#include <iostream> // for cout
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint8
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
|
#include <memory> // for shared_ptr, unique_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
#include <memory>
|
#include "sprite.h" // for Sprite
|
||||||
#include "utils.h"
|
#include "utils.h" // for Color
|
||||||
#include "sprite.h"
|
class Texture;
|
||||||
#include "texture.h"
|
|
||||||
|
|
||||||
constexpr int TEXT_COLOR = 1;
|
constexpr int TEXT_COLOR = 1;
|
||||||
constexpr int TEXT_SHADOW = 2;
|
constexpr int TEXT_SHADOW = 2;
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
void writeCentered(int x, int y, const std::string &text, int kerning = 1, int lenght = -1);
|
void writeCentered(int x, int y, const std::string &text, int kerning = 1, int lenght = -1);
|
||||||
|
|
||||||
// Escribe texto con extras
|
// Escribe texto con extras
|
||||||
void writeDX(Uint8 flags, int x, int y, const std::string &text, int kerning = 1, Color textColor = {255, 255, 255}, Uint8 shadow_distance = 1, Color shadow_color = {0, 0, 0}, int lenght = -1);
|
void writeDX(Uint8 flags, int x, int y, const std::string &text, int kerning = 1, Color textColor = Color(), Uint8 shadow_distance = 1, Color shadow_color = Color(), int lenght = -1);
|
||||||
|
|
||||||
// Obtiene la longitud en pixels de una cadena
|
// Obtiene la longitud en pixels de una cadena
|
||||||
int lenght(const std::string &text, int kerning = 1) const;
|
int lenght(const std::string &text, int kerning = 1) const;
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ bool Texture::loadFromFile(const std::string &path)
|
|||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
const std::string file_name = path.substr(path.find_last_of("\\/") + 1);
|
|
||||||
std::cout << "Loading image failed: " << stbi_failure_reason() << std::endl;
|
std::cout << "Loading image failed: " << stbi_failure_reason() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -240,14 +239,14 @@ SDL_Texture *Texture::getSDLTexture()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Crea una nueva surface
|
// Crea una nueva surface
|
||||||
Surface Texture::newSurface(int w, int h)
|
/*Surface Texture::newSurface(int w, int h)
|
||||||
{
|
{
|
||||||
Surface surf = static_cast<Surface>(malloc(sizeof(surface_s)));
|
Surface surf = static_cast<Surface>(malloc(sizeof(surface_s)));
|
||||||
surf->w = w;
|
surf->w = w;
|
||||||
surf->h = h;
|
surf->h = h;
|
||||||
surf->data = static_cast<Uint8 *>(malloc(w * h));
|
surf->data = static_cast<Uint8 *>(malloc(w * h));
|
||||||
return surf;
|
return surf;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Elimina una surface
|
// Elimina una surface
|
||||||
void Texture::deleteSurface(Surface surface)
|
void Texture::deleteSurface(Surface surface)
|
||||||
@@ -345,7 +344,7 @@ std::vector<Uint32> Texture::loadPal(const std::string &file_name)
|
|||||||
fread(buffer, size, 1, f);
|
fread(buffer, size, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
const auto pal = LoadPalette(buffer);
|
const auto *pal = LoadPalette(buffer);
|
||||||
if (!pal)
|
if (!pal)
|
||||||
{
|
{
|
||||||
return palette;
|
return palette;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ private:
|
|||||||
int paletteIndex_; // Indice de la paleta en uso
|
int paletteIndex_; // Indice de la paleta en uso
|
||||||
|
|
||||||
// Crea una nueva surface
|
// Crea una nueva surface
|
||||||
Surface newSurface(int w, int h);
|
//Surface newSurface(int w, int h);
|
||||||
|
|
||||||
// Elimina una surface
|
// Elimina una surface
|
||||||
void deleteSurface(Surface surface);
|
void deleteSurface(Surface surface);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
#include <SDL2/SDL_stdinc.h> // for SDL_sinf
|
#include <SDL2/SDL_stdinc.h> // for SDL_sinf
|
||||||
#include <stdlib.h> // for rand
|
#include <stdlib.h> // for rand
|
||||||
|
#include <memory> // for unique_ptr, make_shared, make_unique
|
||||||
#include "screen.h" // for Screen
|
#include "screen.h" // for Screen
|
||||||
#include "sprite.h" // for Sprite
|
#include "sprite.h" // for Sprite
|
||||||
#include "texture.h" // for Texture
|
#include "texture.h" // for Texture
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
#include "title.h"
|
#include "title.h"
|
||||||
|
#include <SDL2/SDL_events.h> // for SDL_PollEvent, SDL_Event, SDL_KEYDOWN
|
||||||
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
|
#include <SDL2/SDL_keycode.h> // for SDLK_1, SDLK_2, SDLK_3
|
||||||
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
#include <string> // for allocator, basic_string, char_traits
|
#include <string> // for char_traits, operator+, to_string, bas...
|
||||||
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include "asset.h" // for Asset
|
#include "asset.h" // for Asset
|
||||||
#include "global_inputs.h" // for globalInputs::check
|
#include "global_inputs.h" // for check
|
||||||
#include "input.h" // for Input, inputs_e, INPUT_DO_NOT_ALLOW_RE...
|
#include "input.h" // for Input, InputType, INPUT_DO_NOT_ALLOW_R...
|
||||||
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
|
#include "jail_audio.h" // for JA_GetMusicState, JA_Music_state, JA_P...
|
||||||
#include "lang.h" // for getText
|
#include "lang.h" // for getText
|
||||||
#include "options.h" // for options
|
#include "options.h" // for options
|
||||||
#include "param.h" // for param
|
#include "param.h" // for param
|
||||||
#include "screen.h" // for Screen
|
#include "screen.h" // for Screen
|
||||||
#include "section.h" // for SectionOptions, options, SectionName, name
|
#include "section.h" // for Options, options, Name, name
|
||||||
|
#include "texture.h" // for Texture
|
||||||
struct JA_Music_t;
|
#include "utils.h" // for Param, OptionsController, Color, Param...
|
||||||
|
struct JA_Music_t; // lines 17-17
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Title::Title(JA_Music_t *music)
|
Title::Title(JA_Music_t *music)
|
||||||
|
|||||||
@@ -1,24 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL_events.h> // for SDL_Event
|
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include <memory>
|
#include <memory> // for unique_ptr, shared_ptr
|
||||||
#include "define_buttons.h"
|
#include "define_buttons.h" // for DefineButtons
|
||||||
#include "fade.h"
|
#include "fade.h" // for Fade
|
||||||
#include "game_logo.h"
|
#include "game_logo.h" // for GameLogo
|
||||||
#include "text.h"
|
#include "sprite.h" // for Sprite
|
||||||
#include "tiled_bg.h"
|
#include "text.h" // for Text
|
||||||
#include "utils.h" // for Section
|
#include "tiled_bg.h" // for Tiledbg
|
||||||
#include "sprite.h"
|
class Input; // lines 17-17
|
||||||
#include "texture.h"
|
class Screen; // lines 18-18
|
||||||
#include "section.h"
|
class Texture; // lines 20-20
|
||||||
|
namespace section { enum class Name; }
|
||||||
class Asset;
|
struct JA_Music_t; // lines 21-21
|
||||||
class Input;
|
|
||||||
class Screen;
|
|
||||||
class Sprite;
|
|
||||||
class Texture;
|
|
||||||
struct JA_Music_t;
|
|
||||||
|
|
||||||
// Textos
|
// Textos
|
||||||
constexpr const char TEXT_COPYRIGHT[] = "@2020,2024 JailDesigner";
|
constexpr const char TEXT_COPYRIGHT[] = "@2020,2024 JailDesigner";
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <stdlib.h> // for free, malloc
|
#include <algorithm> // for min, clamp, find_if_not, transform
|
||||||
#include <algorithm> // for max, min
|
#include <cctype> // for tolower, isspace
|
||||||
#include <cctype> // for isspace
|
#include <cmath> // for cos, pow, M_PI
|
||||||
#include <iterator> // for distance
|
#include <compare> // for operator<
|
||||||
#include <cmath>
|
struct JA_Music_t; // lines 7-7
|
||||||
struct JA_Music_t; // lines 3-3
|
struct JA_Sound_t; // lines 8-8
|
||||||
struct JA_Sound_t; // lines 4-4
|
|
||||||
|
|
||||||
// Colores
|
// Colores
|
||||||
const Color bg_color = {0x27, 0x27, 0x36};
|
const Color bg_color = {0x27, 0x27, 0x36};
|
||||||
|
|||||||
@@ -3,16 +3,19 @@
|
|||||||
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton
|
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton
|
||||||
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint32
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
#include <stdint.h> // for int32_t
|
#include <stdint.h> // for int32_t
|
||||||
#include <string> // for string, basic_string
|
#include <string> // for string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
#include "input.h" // for inputs_e
|
enum class InputType : int;
|
||||||
#include "lang.h"
|
enum class ScreenFilter; // lines 14-14
|
||||||
struct JA_Music_t;
|
enum class ScreenVideoMode; // lines 15-15
|
||||||
struct JA_Sound_t;
|
namespace lang
|
||||||
enum class ScreenFilter;
|
{
|
||||||
enum class ScreenVideoMode;
|
enum class Code : int;
|
||||||
|
}
|
||||||
|
struct JA_Music_t; // lines 12-12
|
||||||
|
struct JA_Sound_t; // lines 13-13
|
||||||
|
|
||||||
// Dificultad del juego
|
// Dificultad del juego
|
||||||
enum class GameDifficulty
|
enum class GameDifficulty
|
||||||
@@ -35,6 +38,7 @@ struct Circle
|
|||||||
struct Color
|
struct Color
|
||||||
{
|
{
|
||||||
Uint8 r, g, b;
|
Uint8 r, g, b;
|
||||||
|
constexpr Color(int red = 255, int green = 255, int blue = 255) : r(red), g(green), b(blue) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Posiciones de las notificaciones
|
// Posiciones de las notificaciones
|
||||||
@@ -47,13 +51,6 @@ enum class NotifyPosition
|
|||||||
RIGHT,
|
RIGHT,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Estructura para saber la seccion y subseccion del programa
|
|
||||||
/*struct Section
|
|
||||||
{
|
|
||||||
section::Name name;
|
|
||||||
section::Options options;
|
|
||||||
};*/
|
|
||||||
|
|
||||||
// Estructura para las entradas de la tabla de recirds
|
// Estructura para las entradas de la tabla de recirds
|
||||||
struct HiScoreEntry
|
struct HiScoreEntry
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
#include "text.h" // for Text
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Writer::Writer(std::shared_ptr<Text> text)
|
Writer::Writer(std::shared_ptr<Text> text)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string> // for string, basic_string
|
#include <memory> // for shared_ptr
|
||||||
#include <memory>
|
#include <string> // for string
|
||||||
#include "text.h"
|
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
|
||||||
class Writer
|
class Writer
|
||||||
|
|||||||
Reference in New Issue
Block a user