diff --git a/.gitignore b/.gitignore index c2cd7ff..09f5d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ thumbs.db sync_jail_engine.sh jaildoctors_dilemma* todo -build/ \ No newline at end of file +build/ +linux_utils/ \ No newline at end of file diff --git a/source/animatedsprite.cpp b/source/animatedsprite.cpp index d53889e..233fae8 100644 --- a/source/animatedsprite.cpp +++ b/source/animatedsprite.cpp @@ -1,4 +1,8 @@ #include "animatedsprite.h" +#include // for basic_ostream, operator<<, basic_istream, basic... +#include // for cout +#include // 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) diff --git a/source/animatedsprite.h b/source/animatedsprite.h index 39f6f90..eaf8812 100644 --- a/source/animatedsprite.h +++ b/source/animatedsprite.h @@ -1,15 +1,12 @@ #pragma once -#include -#include "movingsprite.h" -#include -#include -#include -#include -#include - -#ifndef ANIMATEDSPRITE_H -#define ANIMATEDSPRITE_H +#include // for SDL_Rect +#include // for SDL_Renderer +#include // for Uint8 +#include // for string +#include // for vector +#include "movingsprite.h" // for MovingSprite +class Texture; struct animation_t { @@ -98,6 +95,4 @@ public: // Reinicia la animación void resetAnimation(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/asset.cpp b/source/asset.cpp index 1202129..d3a4823 100644 --- a/source/asset.cpp +++ b/source/asset.cpp @@ -1,5 +1,8 @@ #include "asset.h" -#include +#include // for SDL_RWFromFile, SDL_RWclose, SDL_RWops +#include // for SDL_max +#include // for size_t +#include // for basic_ostream, operator<<, cout, endl // Constructor Asset::Asset(std::string executablePath) diff --git a/source/asset.h b/source/asset.h index 2eb5bca..2befe9d 100644 --- a/source/asset.h +++ b/source/asset.h @@ -1,11 +1,7 @@ #pragma once -#include -#include -#include - -#ifndef ASSET_H -#define ASSET_H +#include // for string +#include // for vector enum assetType { @@ -62,5 +58,3 @@ public: // Establece si ha de mostrar texto por pantalla void setVerbose(bool value); }; - -#endif diff --git a/source/cheevos.cpp b/source/cheevos.cpp index ab23561..8afbf68 100644 --- a/source/cheevos.cpp +++ b/source/cheevos.cpp @@ -1,5 +1,10 @@ #include "cheevos.h" -#include +#include // for SDL_GetError +#include // for SDL_RWFromFile, SDL_RWclose, SDL_RWwrite +#include // for NULL +#include // for basic_ostream, operator<<, cout, endl +#include "screen.h" // for Screen +#include "utils.h" // for options_t // Constructor Cheevos::Cheevos(Screen *screen, options_t *options, std::string file) diff --git a/source/cheevos.h b/source/cheevos.h index 69955e3..9a45d7a 100644 --- a/source/cheevos.h +++ b/source/cheevos.h @@ -1,12 +1,9 @@ #pragma once -#include -#include "screen.h" -#include "utils.h" -#include -#include -#ifndef CHEEVOS_H -#define CHEEVOS_H +#include // for string +#include // for vector +class Screen; +struct options_t; struct cheevos_t { @@ -75,6 +72,4 @@ public: // Vuelve a cargar los logros desde el origen void reload(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/debug.cpp b/source/debug.cpp index c3b1bc8..dcfdc97 100644 --- a/source/debug.cpp +++ b/source/debug.cpp @@ -1,4 +1,9 @@ #include "debug.h" +#include // for max +#include "asset.h" // for Asset +#include "text.h" // for Text +#include "texture.h" // for Texture +class Screen; // Constructor Debug::Debug(SDL_Renderer *renderer, Screen *screen, Asset *asset) diff --git a/source/debug.h b/source/debug.h index 04a5f11..198b7e1 100644 --- a/source/debug.h +++ b/source/debug.h @@ -1,17 +1,13 @@ #pragma once -#include -#include "const.h" -#include "asset.h" -#include "screen.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include -#include - -#ifndef DEBUG_H -#define DEBUG_H +#include // for SDL_Point +#include // for SDL_Renderer +#include // for string +#include // for vector +class Asset; +class Screen; +class Text; +class Texture; // Clase Debug class Debug @@ -68,5 +64,3 @@ public: // Cambia el valor de la variable void switchEnabled(); }; - -#endif diff --git a/source/director.cpp b/source/director.cpp index 54c24f7..e2c945c 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -1,10 +1,40 @@ -#include "utils.h" #include "director.h" -#include -#include -#include -#include -#include +#include // for SDL_Init, SDL_Quit, SDL_INIT_E... +#include // for AUDIO_S16 +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_CONTROLLER_BUTTON_B, SDL_C... +#include // for SDL_SetHint, SDL_HINT_RENDER_D... +#include // for SDL_SCANCODE_A, SDL_SCANCODE_E... +#include // for Uint32 +#include // for SDL_GetTicks +#include // for errno, EEXIST, EACCES, ENAMETO... +#include // for printf, perror +#include // for strcmp +#include // for mkdir, stat, S_IRWXU +#include // for getuid +#include // for exit, EXIT_FAILURE, srand +#include // for basic_ofstream, basic_ifstream +#include // for basic_ostream, operator<<, cout +#include // for basic_string, operator+, char_... +#include // for vector +#include "asset.h" // for Asset, assetType +#include "const.h" // for SECTION_LOGO, SECTION_TITLE +#include "debug.h" // for Debug +#include "gamestate_credits.h" // for Credits +#include "gamestate_demo.h" // for Demo +#include "gamestate_ending.h" // for Ending +#include "gamestate_ending2.h" // for Ending2 +#include "gamestate_game.h" // for Game +#include "gamestate_game_over.h" // for GameOver +#include "gamestate_loading_screen.h" // for LoadingScreen +#include "gamestate_logo.h" // for Logo +#include "gamestate_title.h" // for Title +#include "input.h" // for Input, inputs_e +#include "jail_audio.h" // for JA_GetMusicState, JA_DeleteMusic +#include "resource.h" // for Resource +#include "screen.h" // for Screen, FILTER_NEAREST, FILTER... +#include "utils.h" // for options_t, section_t, op_notif... #ifndef _WIN32 #include diff --git a/source/director.h b/source/director.h index 4fb737e..5771eec 100644 --- a/source/director.h +++ b/source/director.h @@ -1,27 +1,25 @@ #pragma once -#include -#include "asset.h" -#include "debug.h" -#include "input.h" -#include "jail_audio.h" -#include "movingsprite.h" -#include "resource.h" -#include "sprite.h" -#include "text.h" -#include "utils.h" -#include "const.h" -#include "gamestate_credits.h" -#include "gamestate_demo.h" -#include "gamestate_ending.h" -#include "gamestate_ending2.h" -#include "gamestate_game_over.h" -#include "gamestate_game.h" -#include "gamestate_loading_screen.h" -#include "gamestate_logo.h" -#include "gamestate_title.h" -#ifndef DIRECTOR_H -#define DIRECTOR_H +#include // for SDL_Renderer +#include // for SDL_Window +#include // for string, basic_string +class Asset; +class Credits; +class Debug; +class Demo; +class Ending2; +class Ending; +class Game; +class GameOver; +class Input; +class LoadingScreen; +class Logo; +class Resource; +class Screen; +class Title; +struct JA_Music_t; +struct options_t; +struct section_t; class Director { @@ -120,6 +118,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/enemy.cpp b/source/enemy.cpp index 4075fed..ee5de04 100644 --- a/source/enemy.cpp +++ b/source/enemy.cpp @@ -1,4 +1,8 @@ #include "enemy.h" +#include // for rand +#include // for min +#include "animatedsprite.h" // for AnimatedSprite +#include "texture.h" // for Texture // Constructor Enemy::Enemy(enemy_t enemy) diff --git a/source/enemy.h b/source/enemy.h index 9f2dbe4..5edf96b 100644 --- a/source/enemy.h +++ b/source/enemy.h @@ -1,13 +1,11 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "utils.h" -#include - -#ifndef ENEMY_H -#define ENEMY_H +#include // for SDL_Rect +#include // for SDL_Renderer +#include // for basic_string, string +#include "utils.h" // for palette_e, color_t +class AnimatedSprite; +struct animatedSprite_t; // Estructura para pasar los datos de un enemigo struct enemy_t @@ -78,5 +76,3 @@ public: // Asigna la paleta void setPalette(palette_e pal); }; - -#endif diff --git a/source/gamestate_credits.cpp b/source/gamestate_credits.cpp index 4356bb7..cf4c1ef 100644 --- a/source/gamestate_credits.cpp +++ b/source/gamestate_credits.cpp @@ -1,5 +1,18 @@ #include "gamestate_credits.h" -#include +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for SDL_Rect +#include // for SDL_GetTicks +#include // for min +#include // for char_traits, basic_ostream, operator<< +#include "animatedsprite.h" // for AnimatedSprite +#include "const.h" // for GAMECANVAS_HEIGHT, GAMECANVAS_WIDTH +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "text.h" // for Text, TXT_CENTER, TXT_COLOR +class Asset; // Constructor Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_credits.h b/source/gamestate_credits.h index d7e1f04..45e0e38 100644 --- a/source/gamestate_credits.h +++ b/source/gamestate_credits.h @@ -1,21 +1,17 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include "const.h" -#include - -#ifndef CREDITS_H -#define CREDITS_H +#include // for SDL_Event +#include // for SDL_Renderer, SDL_Texture +#include // for Uint32 +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class AnimatedSprite; +class Asset; +class Input; +class Resource; +class Screen; +class Text; class Credits { @@ -82,5 +78,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/gamestate_demo.cpp b/source/gamestate_demo.cpp index 9ed2ad6..e8f533b 100644 --- a/source/gamestate_demo.cpp +++ b/source/gamestate_demo.cpp @@ -1,4 +1,17 @@ #include "gamestate_demo.h" +#include // for SDL_Rect +#include // for SDL_GetTicks +#include // for basic_ostream, basic_ios, operator<<, cout +#include "asset.h" // for Asset +#include "const.h" // for BLOCK, PLAY_AREA_WIDTH, SECTION_DEMO +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "item_tracker.h" // for ItemTracker +#include "resource.h" // for Resource +#include "room.h" // for Room +#include "screen.h" // for Screen +#include "text.h" // for Text, TXT_CENTER, TXT_COLOR +#include "utils.h" // for color_t, stringToColor, options_t, secti... +class Debug; // Constructor Demo::Demo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section, Debug *debug) diff --git a/source/gamestate_demo.h b/source/gamestate_demo.h index 2c383b4..15ad099 100644 --- a/source/gamestate_demo.h +++ b/source/gamestate_demo.h @@ -1,24 +1,21 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "input.h" -#include "debug.h" -#include "input.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "utils.h" -#include "const.h" -#include "item_tracker.h" -#include "room_tracker.h" -#include "room.h" -#include "scoreboard.h" - -#ifndef DEMO_H -#define DEMO_H +#include // for SDL_Event +#include // for SDL_Renderer +#include // for Uint32 +#include // for string, basic_string +#include // for vector +#include "scoreboard.h" // for board_t +class Asset; +class Debug; +class Input; +class ItemTracker; +class Resource; +class Room; +class Screen; +class Text; +struct options_t; +struct section_t; class Demo { @@ -88,5 +85,3 @@ public: // Bucle para el juego void run(); }; - -#endif diff --git a/source/gamestate_ending.cpp b/source/gamestate_ending.cpp index d6e5706..cb706d2 100644 --- a/source/gamestate_ending.cpp +++ b/source/gamestate_ending.cpp @@ -1,4 +1,21 @@ #include "gamestate_ending.h" +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for SDL_Rect +#include // for SDL_GetTicks +#include // for min +#include // for basic_ostream, operator<<, basic_ios +#include "asset.h" // for Asset +#include "const.h" // for GAMECANVAS_HEIGHT, GAMECANVAS_WIDTH +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_SetVolume, JA_DeleteMusic, JA_Loa... +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "sprite.h" // for Sprite +#include "text.h" // for Text, TXT_STROKE +#include "texture.h" // for Texture +#include "utils.h" // for color_t, stringToColor, options_t // Constructor Ending::Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_ending.h b/source/gamestate_ending.h index 459edae..9f80a66 100644 --- a/source/gamestate_ending.h +++ b/source/gamestate_ending.h @@ -1,21 +1,20 @@ #pragma once -#include -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include "const.h" -#include -#include -#ifndef ENDING_H -#define ENDING_H +#include // for SDL_Event +#include // for SDL_Renderer, SDL_Texture +#include // for Uint32 +#include // for basic_string, string +#include // for vector +class Asset; +class Input; +class Resource; +class Screen; +class Sprite; +class Text; +class Texture; +struct JA_Music_t; +struct options_t; +struct section_t; class Ending { @@ -125,6 +124,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/gamestate_ending2.cpp b/source/gamestate_ending2.cpp index 3e48419..0c33a2b 100644 --- a/source/gamestate_ending2.cpp +++ b/source/gamestate_ending2.cpp @@ -1,5 +1,17 @@ #include "gamestate_ending2.h" -#include +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetTicks +#include // for max, min, replace +#include "animatedsprite.h" // for AnimatedSprite +#include "asset.h" // for Asset +#include "const.h" // for GAMECANVAS_HEIGHT, GAMECANVAS_CENTER_X +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_SetVolume, JA_DeleteMusic, JA_Loa... +#include "movingsprite.h" // for MovingSprite +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "text.h" // for Text +#include "texture.h" // for Texture // Constructor Ending2::Ending2(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_ending2.h b/source/gamestate_ending2.h index 9f6cde7..39c2045 100644 --- a/source/gamestate_ending2.h +++ b/source/gamestate_ending2.h @@ -1,21 +1,19 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include "const.h" -#include -#include -#ifndef ENDING2_H -#define ENDING2_H +#include // for SDL_Event +#include // for SDL_Renderer +#include // for Uint32 +#include // for string +#include // for vector +#include "utils.h" // for color_t +class AnimatedSprite; +class Asset; +class Input; +class MovingSprite; +class Resource; +class Screen; +class Text; +struct JA_Music_t; class Ending2 { @@ -128,5 +126,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/gamestate_game.cpp b/source/gamestate_game.cpp index cef5fa9..72c9c7e 100644 --- a/source/gamestate_game.cpp +++ b/source/gamestate_game.cpp @@ -1,5 +1,26 @@ #include "gamestate_game.h" -#include +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for SDL_SCANCODE_A, SDL_SCANCODE_D, SDL_... +#include // for SDL_GetTicks +#include // for char_traits, basic_ostream, operator<< +#include // for vector +#include "asset.h" // for Asset +#include "cheevos.h" // for Cheevos +#include "const.h" // for PLAY_AREA_HEIGHT, GAMECANVAS_WIDTH +#include "debug.h" // for Debug +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "item.h" // for item_t +#include "item_tracker.h" // for ItemTracker +#include "jail_audio.h" // for JA_PauseMusic, JA_PlaySound, JA_Resu... +#include "resource.h" // for res_room_t, Resource +#include "room.h" // for Room, room_t +#include "room_tracker.h" // for RoomTracker +#include "screen.h" // for Screen +#include "stats.h" // for Stats +#include "text.h" // for Text, TXT_CENTER, TXT_COLOR +#include "utils.h" // for options_t, color_t, cheat_t, stringT... // Constructor Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options, Input *input, section_t *section, Debug *debug) diff --git a/source/gamestate_game.h b/source/gamestate_game.h index 9418ec2..eec30ab 100644 --- a/source/gamestate_game.h +++ b/source/gamestate_game.h @@ -1,27 +1,27 @@ #pragma once -#include -#include "cheevos.h" -#include "animatedsprite.h" -#include "asset.h" -#include "debug.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "utils.h" -#include "const.h" -#include "item_tracker.h" -#include "player.h" -#include "room_tracker.h" -#include "room.h" -#include "scoreboard.h" -#include "stats.h" - -#ifndef GAME_H -#define GAME_H +#include // for SDL_Event +#include // for SDL_Rect +#include // for SDL_Renderer, SDL_Texture +#include // for Uint32 +#include // for string, basic_string +#include "player.h" // for playerSpawn_t +#include "scoreboard.h" // for board_t +class Asset; +class Cheevos; +class Debug; +class Input; +class ItemTracker; +class Resource; +class Room; +class RoomTracker; +class Screen; +class Stats; +class Text; +struct JA_Music_t; +struct JA_Sound_t; +struct options_t; +struct section_t; class Game { @@ -158,6 +158,4 @@ public: // Bucle para el juego void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/gamestate_game_over.cpp b/source/gamestate_game_over.cpp index 851b288..4744f73 100644 --- a/source/gamestate_game_over.cpp +++ b/source/gamestate_game_over.cpp @@ -1,4 +1,16 @@ #include "gamestate_game_over.h" +#include // for SDL_GetTicks +#include // for min, max +#include // for basic_string, operator+, to_string, char... +#include "animatedsprite.h" // for AnimatedSprite +#include "asset.h" // for Asset +#include "const.h" // for GAMECANVAS_CENTER_X, SECTION_GAME_OVER +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_DeleteMusic, JA_LoadMusic, JA_PlayMusic +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "text.h" // for Text, TXT_CENTER, TXT_COLOR +#include "texture.h" // for Texture // Constructor GameOver::GameOver(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_game_over.h b/source/gamestate_game_over.h index 17e0bdb..1afdad8 100644 --- a/source/gamestate_game_over.h +++ b/source/gamestate_game_over.h @@ -1,20 +1,17 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include "const.h" -#include -#ifndef GAME_OVER_H -#define GAME_OVER_H +#include // for SDL_Event +#include // for SDL_Renderer +#include // for Uint32 +#include // for vector +#include "utils.h" // for color_t +class AnimatedSprite; +class Asset; +class Input; +class Resource; +class Screen; +class Text; +struct JA_Music_t; class GameOver { @@ -77,6 +74,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/gamestate_loading_screen.cpp b/source/gamestate_loading_screen.cpp index 9637630..4bbec9b 100644 --- a/source/gamestate_loading_screen.cpp +++ b/source/gamestate_loading_screen.cpp @@ -1,4 +1,16 @@ #include "gamestate_loading_screen.h" +#include // for SDL_GetTicks +#include // for rand +#include // for basic_string +#include "asset.h" // for Asset +#include "const.h" // for SECTION_LOADING_SCREEN, SECTION_QUIT +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_DeleteMusic, JA_LoadMusic, JA_PlayMusic +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "sprite.h" // for Sprite +#include "texture.h" // for Texture +#include "utils.h" // for options_t, color_t, section_t, stringToC... // Constructor LoadingScreen::LoadingScreen(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_loading_screen.h b/source/gamestate_loading_screen.h index 837c9d2..9002681 100644 --- a/source/gamestate_loading_screen.h +++ b/source/gamestate_loading_screen.h @@ -1,21 +1,18 @@ #pragma once -#include -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "utils.h" -#include "const.h" -#include - -#include -#include "text.h" - -#ifndef LOADING_SCREEN_H -#define LOADING_SCREEN_H +#include // for SDL_Event +#include // for SDL_Rect +#include // for SDL_Renderer +#include // for Uint32 +class Asset; +class Input; +class Resource; +class Screen; +class Sprite; +class Texture; +struct JA_Music_t; +struct options_t; +struct section_t; class LoadingScreen { @@ -86,6 +83,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/gamestate_logo.cpp b/source/gamestate_logo.cpp index 376cedc..af5ffc9 100644 --- a/source/gamestate_logo.cpp +++ b/source/gamestate_logo.cpp @@ -1,5 +1,14 @@ #include "gamestate_logo.h" -#include +#include // for SDL_GetTicks +#include // for basic_string, string +#include "const.h" // for SECTION_LOGO, SECTION_TITLE, SUBSECTION_... +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_StopMusic +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "sprite.h" // for Sprite +#include "texture.h" // for Texture +class Asset; // Constructor Logo::Logo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_logo.h b/source/gamestate_logo.h index 0263b56..aff96b6 100644 --- a/source/gamestate_logo.h +++ b/source/gamestate_logo.h @@ -1,18 +1,16 @@ #pragma once -#include -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "screen.h" -#include "sprite.h" -#include "utils.h" -#include "const.h" -#include - -#ifndef LOGO_H -#define LOGO_H +#include // for SDL_Event +#include // for SDL_Renderer +#include // for Uint32 +#include // for vector +#include "utils.h" // for color_t +class Asset; +class Input; +class Resource; +class Screen; +class Sprite; +class Texture; class Logo { @@ -73,6 +71,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/gamestate_title.cpp b/source/gamestate_title.cpp index b37ce7c..d73431d 100644 --- a/source/gamestate_title.cpp +++ b/source/gamestate_title.cpp @@ -1,4 +1,20 @@ #include "gamestate_title.h" +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for SDL_SCANCODE_1, SDL_SCANCODE_2 +#include // for SDL_GetTicks +#include // for basic_ostream, operator<<, basic_ios +#include "asset.h" // for Asset +#include "cheevos.h" // for cheevos_t, Cheevos +#include "const.h" // for PLAY_AREA_CENTER_X, GAMECANVAS_WIDTH +#include "input.h" // for Input, inputs_e, REPEAT_FALSE, REPEA... +#include "resource.h" // for Resource +#include "screen.h" // for Screen +#include "sprite.h" // for Sprite +#include "text.h" // for Text, TXT_CENTER, TXT_COLOR +#include "texture.h" // for Texture +#include "utils.h" // for color_t, stringToColor, options_t // Constructor Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section) diff --git a/source/gamestate_title.h b/source/gamestate_title.h index e92b8db..1078e8d 100644 --- a/source/gamestate_title.h +++ b/source/gamestate_title.h @@ -1,21 +1,22 @@ #pragma once -#include -#include "cheevos.h" -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "paleta.h" -#include "screen.h" -#include "sprite.h" -#include "text.h" -#include "utils.h" -#include "const.h" -#include - -#ifndef TITLE_H -#define TITLE_H +#include // for SDL_Event +#include // for SDL_Rect +#include // for SDL_Renderer, SDL_Texture +#include // for Uint32 +#include // for basic_string, string +#include // for vector +#include "paleta.h" // for jSurface +class Asset; +class Cheevos; +class Input; +class Resource; +class Screen; +class Sprite; +class Text; +class Texture; +struct options_t; +struct section_t; class Title { @@ -115,6 +116,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/input.cpp b/source/input.cpp index 25f325e..353d894 100644 --- a/source/input.cpp +++ b/source/input.cpp @@ -1,5 +1,10 @@ #include "input.h" -#include +#include // for SDL_INIT_GAMECONTROLLER, SDL_InitSubS... +#include // for SDL_GetError +#include // for SDL_ENABLE +#include // for SDL_NumJoysticks +#include // for SDL_GetKeyboardState +#include // for basic_ostream, operator<<, cout, basi... // Constructor Input::Input(std::string file) diff --git a/source/input.h b/source/input.h index 1ba3836..ce83408 100644 --- a/source/input.h +++ b/source/input.h @@ -1,11 +1,10 @@ #pragma once -#include -#include -#include - -#ifndef INPUT_H -#define INPUT_H +#include // for SDL_GameControllerButton, SDL_G... +#include // for SDL_Scancode +#include // for Uint8 +#include // for string, basic_string +#include // for vector enum inputs_e { @@ -115,6 +114,4 @@ public: // Hablita las entradas void enable(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/item.cpp b/source/item.cpp index e27fd40..bf8e100 100644 --- a/source/item.cpp +++ b/source/item.cpp @@ -1,6 +1,6 @@ #include "item.h" -#include -#include +#include "sprite.h" // for Sprite +#include "texture.h" // for Texture // Constructor Item::Item(item_t item) diff --git a/source/item.h b/source/item.h index e95e1a6..1d3ebd3 100644 --- a/source/item.h +++ b/source/item.h @@ -1,13 +1,12 @@ #pragma once -#include -#include "asset.h" -#include "sprite.h" -#include "utils.h" -#include - -#ifndef ITEM_H -#define ITEM_H +#include // for SDL_Rect, SDL_Point +#include // for SDL_Renderer +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class Sprite; +class Texture; struct item_t { @@ -58,6 +57,4 @@ public: // Asigna los colores del objeto void setColors(color_t col1, color_t col2); -}; - -#endif +} \ No newline at end of file diff --git a/source/item_tracker.h b/source/item_tracker.h index d45a041..197af11 100644 --- a/source/item_tracker.h +++ b/source/item_tracker.h @@ -1,11 +1,8 @@ #pragma once -#include -#include "utils.h" -#include -#include -#ifndef ITEM_TRACKER_H -#define ITEM_TRACKER_H +#include // for SDL_Point +#include // for string, basic_string +#include // for vector struct item_tracker_t { @@ -34,6 +31,4 @@ public: // Añade el objeto a la lista de objetos cogidos void addItem(std::string name, SDL_Point pos); -}; - -#endif +}; \ No newline at end of file diff --git a/source/menu.cpp b/source/menu.cpp index 2cc88e6..c33f814 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -1,5 +1,13 @@ -#include "const.h" #include "menu.h" +#include // for max +#include // for char_traits, basic_ostream, operator<<, basi... +#include // for cout +#include // for basic_stringstream +#include "asset.h" // for Asset +#include "input.h" // for Input, REPEAT_FALSE, inputs_e +#include "jail_audio.h" // for JA_LoadSound, JA_PlaySound, JA_DeleteSound +#include "resource.h" // for Resource +#include "text.h" // for Text // Constructor Menu::Menu(SDL_Renderer *renderer, Resource *resource, Asset *asset, Input *input, std::string file) diff --git a/source/menu.h b/source/menu.h index 6164b7c..bbaec50 100644 --- a/source/menu.h +++ b/source/menu.h @@ -1,19 +1,15 @@ #pragma once -#include -#include "asset.h" -#include "input.h" -#include "jail_audio.h" -#include "resource.h" -#include "sprite.h" -#include "text.h" -#include "utils.h" -#include -#include -#include - -#ifndef MENU_H -#define MENU_H +#include // for SDL_Rect +#include // for SDL_Renderer +#include // for string, basic_string +#include // for vector +#include "utils.h" // for color_t +class Asset; +class Input; +class Resource; +class Text; +struct JA_Sound_t; // Tipos de fondos para el menu #define MENU_BACKGROUND_TRANSPARENT 0 @@ -221,6 +217,4 @@ public: // Establece el rectangulo de fondo del menu void setRectSize(int w = 0, int h = 0); -}; - -#endif +}; \ No newline at end of file diff --git a/source/movingsprite.cpp b/source/movingsprite.cpp index ae1c189..62cb5e3 100644 --- a/source/movingsprite.cpp +++ b/source/movingsprite.cpp @@ -1,5 +1,5 @@ -#include "const.h" #include "movingsprite.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, SDL_Renderer *renderer) diff --git a/source/movingsprite.h b/source/movingsprite.h index 2c403c6..da6e324 100644 --- a/source/movingsprite.h +++ b/source/movingsprite.h @@ -1,10 +1,10 @@ #pragma once -#include -#include "sprite.h" - -#ifndef MOVINGSPRITE_H -#define MOVINGSPRITE_H +#include // for SDL_Rect, SDL_Point +#include // for SDL_RendererFlip, SDL_Renderer +#include // for Uint16 +#include "sprite.h" // for Sprite +class Texture; // Clase MovingSprite. Añade posicion y velocidad en punto flotante class MovingSprite : public Sprite @@ -182,6 +182,4 @@ public: // Devuelve el incremento en el eje X en pixels int getIncX(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/notify.cpp b/source/notify.cpp index 376ed07..2f80c4d 100644 --- a/source/notify.cpp +++ b/source/notify.cpp @@ -1,7 +1,10 @@ #include "notify.h" -#include -#include -#include +#include // for SDL_BLENDMODE_BLEND +#include // for basic_string, string, char_traits +#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_Pla... +#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, options_t *options) diff --git a/source/notify.h b/source/notify.h index d73a0b6..0a1975b 100644 --- a/source/notify.h +++ b/source/notify.h @@ -1,15 +1,14 @@ #pragma once -#include -#include "jail_audio.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include - -#ifndef NOTIFY_H -#define NOTIFY_H +#include // for SDL_Rect +#include // for SDL_Renderer +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class Sprite; +class Text; +class Texture; +struct JA_Sound_t; class Notify { @@ -83,5 +82,3 @@ public: // Indica si hay notificaciones activas bool active(); }; - -#endif diff --git a/source/paleta.cpp b/source/paleta.cpp index 1349b0d..b3a67bd 100644 --- a/source/paleta.cpp +++ b/source/paleta.cpp @@ -1,6 +1,10 @@ #include "paleta.h" -#include "gif.c" -#include +#include // for SDL_PIXELFORMAT_ARGB8888 +#include // for SDL_Rect +#include // for SEEK_END, SEEK_SET +#include // for NULL, fseek, fclose, fopen, fread, ftell +#include // for malloc, free +#include "gif.c" // for LoadGif, LoadPalette struct jSurface_s { diff --git a/source/paleta.h b/source/paleta.h index c78c9a5..16e9386 100644 --- a/source/paleta.h +++ b/source/paleta.h @@ -1,5 +1,7 @@ #pragma once -#include + +#include // for SDL_Renderer +#include // for Uint8, Uint32 typedef struct jSurface_s *jSurface; diff --git a/source/player.cpp b/source/player.cpp index e6d490f..b91ff88 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -1,6 +1,17 @@ #include "player.h" -#include -#include +#include // for abs +#include // for rand +#include // for max, min +#include // for ceil, abs +#include "animatedsprite.h" // for AnimatedSprite +#include "asset.h" // for Asset +#include "const.h" // for BORDER_TOP, BLOCK, BORDER_BOTTOM, BORDER... +#include "debug.h" // for Debug +#include "input.h" // for Input, inputs_e +#include "jail_audio.h" // for JA_LoadSound, JA_Sound_t, JA_PlaySound +#include "resource.h" // for Resource +#include "room.h" // for Room, tile_e +#include "texture.h" // for Texture // Constructor Player::Player(player_t player) diff --git a/source/player.h b/source/player.h index 1184048..f9b6167 100644 --- a/source/player.h +++ b/source/player.h @@ -1,19 +1,17 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "debug.h" -#include "input.h" -#include "resource.h" -#include "utils.h" -#include "const.h" -#include "room.h" -#include -#include - -#ifndef PLAYER_H -#define PLAYER_H +#include // for SDL_Rect, SDL_Point +#include // for SDL_Renderer +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class AnimatedSprite; +class Asset; +class Debug; +class Input; +class Resource; +class Room; +struct JA_Sound_t; enum state_e { @@ -194,6 +192,4 @@ public: // Quita el modo pausa del jugador void resume(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/resource.cpp b/source/resource.cpp index 3400fb1..50c896a 100644 --- a/source/resource.cpp +++ b/source/resource.cpp @@ -1,5 +1,13 @@ #include "resource.h" -#include +#include // for basic_ostream, operator<<, cout, endl +#include "animatedsprite.h" // for animatedSprite_t, loadAnimationFromFile +#include "asset.h" // for Asset +#include "enemy.h" // for enemy_t +#include "item.h" // for item_t +#include "room.h" // for room_t, loadRoomFile, loadRoomTileFile +#include "text.h" // for textFile_t, LoadTextFile +#include "texture.h" // for Texture +#include "utils.h" // for options_t // Constructor Resource::Resource(SDL_Renderer *renderer, Asset *asset, options_t *options) diff --git a/source/resource.h b/source/resource.h index 123c2a4..ace397e 100644 --- a/source/resource.h +++ b/source/resource.h @@ -1,17 +1,14 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "room.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include -#include - -#ifndef RESOURCE_H -#define RESOURCE_H +#include // for SDL_Renderer +#include // for string, basic_string +#include // for vector +class Asset; +class Texture; +struct animatedSprite_t; +struct options_t; +struct room_t; +struct textFile_t; struct res_texture_t { @@ -131,6 +128,4 @@ public: // Obtiene todas las habitaciones std::vector *getAllRooms(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/room.cpp b/source/room.cpp index 85fa0bd..998ddc8 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -1,7 +1,19 @@ #include "room.h" -#include -#include -#include +#include // for SDL_BLENDMODE_BLEND +#include // for SDL_GetError +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for rand +#include // for basic_ostream, operator<<, basic_ist... +#include // for cout +#include // for basic_stringstream +#include "asset.h" // for Asset +#include "const.h" // for BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_W... +#include "debug.h" // for Debug +#include "item_tracker.h" // for ItemTracker +#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_Pla... +#include "screen.h" // for Screen +#include "sprite.h" // for Sprite +#include "texture.h" // for Texture // Carga las variables y texturas desde un fichero de mapa de tiles std::vector loadRoomTileFile(std::string file_path, bool verbose) diff --git a/source/room.h b/source/room.h index 002f39e..6555f92 100644 --- a/source/room.h +++ b/source/room.h @@ -1,21 +1,19 @@ #pragma once -#include -#include "asset.h" -#include "debug.h" -#include "jail_audio.h" -#include "screen.h" -#include "sprite.h" -#include "utils.h" -#include "const.h" -#include "enemy.h" -#include "item_tracker.h" -#include "item.h" -#include -#include - -#ifndef ROOM_H -#define ROOM_H +#include // for SDL_Rect, SDL_Point +#include // for SDL_Renderer, SDL_Texture +#include // for string, basic_string +#include // for vector +#include "enemy.h" // for enemy_t +#include "item.h" // for item_t +#include "utils.h" // for h_line_t, color_t, d_line_t, v_line_t +class Asset; +class Debug; +class ItemTracker; +class Screen; +class Sprite; +class Texture; +struct JA_Sound_t; enum tile_e { @@ -253,6 +251,4 @@ public: // Obten la direccion de las superficies automaticas int getAutoSurfaceDirection(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/room_tracker.h b/source/room_tracker.h index c41a66f..4d5fca7 100644 --- a/source/room_tracker.h +++ b/source/room_tracker.h @@ -1,12 +1,7 @@ #pragma once -#include -#include "utils.h" -#include -#include - -#ifndef ROOM_TRACKER_H -#define ROOM_TRACKER_H +#include // for string +#include // for vector class RoomTracker { @@ -27,5 +22,3 @@ public: // Añade la habitación a la lista bool addRoom(std::string name); }; - -#endif diff --git a/source/scoreboard.cpp b/source/scoreboard.cpp index 7b4c420..bbd2adf 100644 --- a/source/scoreboard.cpp +++ b/source/scoreboard.cpp @@ -1,6 +1,12 @@ #include "scoreboard.h" -#include -#include +#include // for SDL_Rect +#include // for SDL_GetTicks +#include "animatedsprite.h" // for AnimatedSprite +#include "const.h" // for BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH +#include "resource.h" // for Resource +#include "text.h" // for Text +#include "texture.h" // for Texture +class Asset; // Constructor ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Resource *resource, Asset *asset, options_t *options, board_t *board) diff --git a/source/scoreboard.h b/source/scoreboard.h index 1d70a31..df654ef 100644 --- a/source/scoreboard.h +++ b/source/scoreboard.h @@ -1,16 +1,15 @@ #pragma once -#include -#include "animatedsprite.h" -#include "asset.h" -#include "resource.h" -#include "text.h" -#include "utils.h" -#include "const.h" -#include - -#ifndef SCOREBOARD_H -#define SCOREBOARD_H +#include // for SDL_Renderer +#include // for Uint32 +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class AnimatedSprite; +class Asset; +class Resource; +class Text; +class Texture; struct board_t { @@ -88,5 +87,3 @@ public: // Devuelve la cantidad de minutos de juego transcurridos int getMinutes(); }; - -#endif diff --git a/source/screen.cpp b/source/screen.cpp index d317aef..effbf29 100644 --- a/source/screen.cpp +++ b/source/screen.cpp @@ -1,9 +1,16 @@ #include "screen.h" -#include "jail_shader.h" -#include -#include // Para basic_ifstream, ifstream -#include // Para istreambuf_iterator, operator== -#include +#include // for SDL_GetError +#include // for SDL_DISABLE, SDL_ENABLE +#include // for SDL_ShowCursor +#include // for SDL_PIXELFORMAT_RGBA8888 +#include // for max, min +#include // for basic_ostream, operator<<, basic_ifstream +#include // for cout +#include // for istreambuf_iterator, operator!= +#include // for basic_string, char_traits, string +#include "asset.h" // for Asset +#include "jail_shader.h" // for init, render +#include "notify.h" // for Notify // Constructor Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options) diff --git a/source/screen.h b/source/screen.h index a025dba..5adb587 100644 --- a/source/screen.h +++ b/source/screen.h @@ -1,14 +1,14 @@ #pragma once -#include -#include "asset.h" -#include "notify.h" -#include "utils.h" -#include "const.h" -#include - -#ifndef SCREEN_H -#define SCREEN_H +#include // for SDL_BlendMode +#include // for SDL_Rect +#include // for SDL_Renderer, SDL_Texture +#include // for SDL_Window +#include // for basic_string, string +#include // for vector +#include "utils.h" // for color_t +class Asset; +class Notify; #define FILTER_NEAREST 0 #define FILTER_LINEAL 1 @@ -151,6 +151,4 @@ public: // Cambia el estado de los shaders void toggleShaders(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/sprite.cpp b/source/sprite.cpp index 5654a5a..5e8a4b8 100644 --- a/source/sprite.cpp +++ b/source/sprite.cpp @@ -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, SDL_Renderer *renderer) diff --git a/source/sprite.h b/source/sprite.h index 0e0c407..d2eecc9 100644 --- a/source/sprite.h +++ b/source/sprite.h @@ -1,10 +1,8 @@ #pragma once -#include -#include "texture.h" - -#ifndef SPRITE_H -#define SPRITE_H +#include // for SDL_Rect +#include // for SDL_Renderer +class Texture; // Clase sprite class Sprite @@ -95,6 +93,4 @@ public: // Establece los valores de posición y tamaño del sprite void setRect(SDL_Rect rect); -}; - -#endif +}; \ No newline at end of file diff --git a/source/stats.cpp b/source/stats.cpp index 1552462..aec6576 100644 --- a/source/stats.cpp +++ b/source/stats.cpp @@ -1,8 +1,7 @@ #include "stats.h" -#include -#include -#include -#include +#include // for basic_ostream, basic_ifstream, basic_istream, ope... +#include // for basic_stringstream +#include "utils.h" // for op_stats_t, options_t // Constructor Stats::Stats(std::string file, std::string buffer, options_t *options) diff --git a/source/stats.h b/source/stats.h index 93e8e3f..53c5ba2 100644 --- a/source/stats.h +++ b/source/stats.h @@ -1,11 +1,8 @@ #pragma once -#include -#include "utils.h" -#include -#include -#ifndef STATS_H -#define STATS_H +#include // for string, basic_string +#include // for vector +struct options_t; class Stats { @@ -73,6 +70,4 @@ public: // Añade una entrada al diccionario void addDictionary(std::string number, std::string name); -}; - -#endif +}; \ No newline at end of file diff --git a/source/text.cpp b/source/text.cpp index e420e43..bccf448 100644 --- a/source/text.cpp +++ b/source/text.cpp @@ -1,7 +1,9 @@ - #include "text.h" -#include -#include +#include // for char_traits, basic_ostream, basic_ifstream, ope... +#include // 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) diff --git a/source/text.h b/source/text.h index f1ae260..8c3a95f 100644 --- a/source/text.h +++ b/source/text.h @@ -1,10 +1,11 @@ #pragma once -#include "sprite.h" -#include "utils.h" - -#ifndef TEXT_H -#define TEXT_H +#include // for SDL_Renderer +#include // for Uint8 +#include // for string +class Sprite; +class Texture; +struct color_t; #define TXT_COLOR 1 #define TXT_SHADOW 2 @@ -75,6 +76,4 @@ public: // Establece si se usa un tamaño fijo de letra void setFixedWidth(bool value); -}; - -#endif +}; \ No newline at end of file diff --git a/source/texture.cpp b/source/texture.cpp index dce9ed2..8c9d0af 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -1,8 +1,12 @@ - #include "texture.h" +#include // for SDL_GetError +#include // for SDL_Log +#include // for SDL_PIXELFORMAT_RGB24, SDL_PIXELFORMAT... +#include // for SDL_CreateRGBSurfaceWithFormatFrom +#include // for exit +#include // for basic_ostream, operator<<, cout, endl #define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" -#include +#include "stb_image.h" // for stbi_failure_reason, stbi_image_free // Constructor Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose) diff --git a/source/texture.h b/source/texture.h index d83d7e2..4342ad6 100644 --- a/source/texture.h +++ b/source/texture.h @@ -1,11 +1,10 @@ #pragma once -#include -#include -#include - -#ifndef TEXTURE_H -#define TEXTURE_H +#include // for SDL_BlendMode +#include // for SDL_Point, SDL_Rect +#include // for SDL_Renderer, SDL_FLIP_NONE, SDL_TEX... +#include // for Uint8 +#include // for basic_string, string class Texture { @@ -61,6 +60,4 @@ public: // Obtiene la textura SDL_Texture *getSDLTexture(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/utils.cpp b/source/utils.cpp index bfca79b..f96e2be 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -1,5 +1,6 @@ #include "utils.h" -#include +#include // for free, malloc, abs +#include // for round, abs // Calcula el cuadrado de la distancia entre dos puntos double distanceSquared(int x1, int y1, int x2, int y2) diff --git a/source/utils.h b/source/utils.h index 7483177..d0012d4 100644 --- a/source/utils.h +++ b/source/utils.h @@ -1,11 +1,8 @@ #pragma once -#include -#include "texture.h" -#include - -#ifndef UTILS_H -#define UTILS_H +#include // for SDL_Rect, SDL_Point +#include // for Uint8, Uint32 +#include // for string, basic_string // Estructura para definir un circulo struct circle_t @@ -189,6 +186,4 @@ bool colorAreEqual(color_t color1, color_t color2); std::string toLower(std::string str); // Convierte una cadena a mayúsculas -std::string toUpper(std::string str); - -#endif \ No newline at end of file +std::string toUpper(std::string str); \ No newline at end of file