diff --git a/source/background.h b/source/background.h index bfaa62d..1db67b5 100644 --- a/source/background.h +++ b/source/background.h @@ -5,9 +5,6 @@ #include "common/asset.h" #include "common/movingsprite.h" -#ifndef BACKGROUND_H -#define BACKGROUND_H - // Clase Background class Background { @@ -99,6 +96,4 @@ public: // Establece la transparencia de la atenuación void setAlpha(int alpha); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/balloon.h b/source/balloon.h index c2121cf..38cfa87 100644 --- a/source/balloon.h +++ b/source/balloon.h @@ -6,9 +6,6 @@ #include #include -#ifndef BALLOON_H -#define BALLOON_H - // Cantidad de elementos del vector con los valores de la deformación del globo al rebotar #define MAX_BOUNCE 10 @@ -249,6 +246,4 @@ public: // Obtiene le valor de la variable Uint8 getPower(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/bullet.h b/source/bullet.h index 34005c5..36054b5 100644 --- a/source/bullet.h +++ b/source/bullet.h @@ -4,9 +4,6 @@ #include "common/sprite.h" #include "common/utils.h" -#ifndef BULLET_H -#define BULLET_H - // Tipos de bala #define BULLET_UP 1 #define BULLET_LEFT 2 @@ -80,5 +77,3 @@ public: // Obtiene el circulo de colisión circle_t &getCollider(); }; - -#endif diff --git a/source/common/animatedsprite.h b/source/common/animatedsprite.h index 6ffc9de..f225f87 100644 --- a/source/common/animatedsprite.h +++ b/source/common/animatedsprite.h @@ -8,9 +8,6 @@ #include #include -#ifndef ANIMATEDSPRITE_H -#define ANIMATEDSPRITE_H - struct animation_t { std::string name; // Nombre de la animacion @@ -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/common/asset.h b/source/common/asset.h index c14ec01..f7986dc 100644 --- a/source/common/asset.h +++ b/source/common/asset.h @@ -4,9 +4,6 @@ #include #include -#ifndef ASSET_H -#define ASSET_H - enum assetType { t_bitmap, @@ -64,6 +61,4 @@ public: // Devuelve la lista de recursos de un tipo std::vector getListByType(assetType type); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/input.h b/source/common/input.h index 06f9691..3744107 100644 --- a/source/common/input.h +++ b/source/common/input.h @@ -4,9 +4,6 @@ #include #include -#ifndef INPUT_H -#define INPUT_H - /* connectedControllers es un vector donde estan todos los mandos encontrados [0 .. n] checkInput requiere de un indice para comprobar las pulsaciónes de un controlador en concreto [0 .. n] @@ -152,6 +149,4 @@ public: // Activa todos los inputs. Sirve para evitar inputs sin repeticiones pero que ya vienen pulsados cuando checkInput no estaba monitorizando void allActive(int index); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/menu.h b/source/common/menu.h index b83dd17..bb61797 100644 --- a/source/common/menu.h +++ b/source/common/menu.h @@ -11,9 +11,6 @@ #include #include -#ifndef MENU_H -#define MENU_H - // Tipos de fondos para el menu #define MENU_BACKGROUND_TRANSPARENT 0 #define MENU_BACKGROUND_SOLID 1 @@ -231,6 +228,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/common/movingsprite.h b/source/common/movingsprite.h index 1362ad4..9a460c7 100644 --- a/source/common/movingsprite.h +++ b/source/common/movingsprite.h @@ -3,9 +3,6 @@ #include #include "sprite.h" -#ifndef MOVINGSPRITE_H -#define MOVINGSPRITE_H - // Clase MovingSprite. Añade posicion y velocidad en punto flotante class MovingSprite : public Sprite { @@ -162,6 +159,4 @@ public: // Devuelve el incremento en el eje X en pixels int getIncX(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/screen.h b/source/common/screen.h index 2ed2186..925c2cf 100644 --- a/source/common/screen.h +++ b/source/common/screen.h @@ -7,9 +7,6 @@ #include "../const.h" #include -#ifndef SCREEN_H -#define SCREEN_H - #define FILTER_NEAREST 0 #define FILTER_LINEAL 1 @@ -154,6 +151,4 @@ public: // Atenua la pantalla void attenuate(bool value); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/smartsprite.h b/source/common/smartsprite.h index 4422a9d..1f469af 100644 --- a/source/common/smartsprite.h +++ b/source/common/smartsprite.h @@ -5,9 +5,6 @@ #include "utils.h" #include -#ifndef SMARTSPRITE_H -#define SMARTSPRITE_H - // Clase SmartSprite class SmartSprite : public AnimatedSprite { @@ -68,6 +65,4 @@ public: // Obtiene el valor de la variable bool hasFinished(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/sprite.h b/source/common/sprite.h index ab8d4aa..7be4e12 100644 --- a/source/common/sprite.h +++ b/source/common/sprite.h @@ -3,9 +3,6 @@ #include #include "texture.h" -#ifndef SPRITE_H -#define SPRITE_H - // Clase sprite class Sprite { @@ -97,6 +94,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/common/text.h b/source/common/text.h index 34887a4..b246575 100644 --- a/source/common/text.h +++ b/source/common/text.h @@ -3,9 +3,6 @@ #include "sprite.h" #include "utils.h" -#ifndef TEXT_H -#define TEXT_H - #define TXT_COLOR 1 #define TXT_SHADOW 2 #define TXT_CENTER 4 @@ -83,6 +80,4 @@ public: // Establece una paleta de colores para el texto void setPalette(int index); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/texture.h b/source/common/texture.h index aa38dfc..7dcae0b 100644 --- a/source/common/texture.h +++ b/source/common/texture.h @@ -5,9 +5,6 @@ #include #include -#ifndef TEXTURE_H -#define TEXTURE_H - // Definiciones de tipos struct surface_s { @@ -98,6 +95,4 @@ public: // Cambia la paleta de la textura void setPalette(int palette); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/utils.h b/source/common/utils.h index 4371c2e..d24c97d 100644 --- a/source/common/utils.h +++ b/source/common/utils.h @@ -7,9 +7,6 @@ #include #include -#ifndef UTILS_H -#define UTILS_H - // Dificultad del juego #define DIFFICULTY_EASY 0 #define DIFFICULTY_NORMAL 1 @@ -252,6 +249,4 @@ JA_Music_t *getMusic(std::vector music, std::string name); hiScoreEntry_t sortHiScoreTable(hiScoreEntry_t entry1, hiScoreEntry_t entry2); // Dibuja un circulo -void DrawCircle(SDL_Renderer *renderer, int32_t centerX, int32_t centerY, int32_t radius); - -#endif \ No newline at end of file +void DrawCircle(SDL_Renderer *renderer, int32_t centerX, int32_t centerY, int32_t radius); \ No newline at end of file diff --git a/source/common/writer.h b/source/common/writer.h index 4457cdf..38c9a6b 100644 --- a/source/common/writer.h +++ b/source/common/writer.h @@ -4,9 +4,6 @@ #include "sprite.h" #include "text.h" -#ifndef WRITER_H -#define WRITER_H - // Clase Writer. Pinta texto en pantalla letra a letra a partir de una cadena y un bitmap class Writer { @@ -70,6 +67,4 @@ public: // Obtiene el valor de la variable bool hasFinished(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/const.h b/source/const.h index f16010a..e98eadc 100644 --- a/source/const.h +++ b/source/const.h @@ -3,9 +3,6 @@ #include #include "common/utils.h" -#ifndef CONST_H -#define CONST_H - // Tamaño de bloque #define BLOCK 8 #define HALF_BLOCK BLOCK / 2 @@ -68,6 +65,4 @@ const color_t difficultyNormalColor = {255, 122, 0}; const color_t difficultyHardColor = {118, 66, 138}; const color_t flashColor = {0xFF, 0xFF, 0xFF}; const color_t fadeColor = {0x27, 0x27, 0x36}; -const color_t orangeColor = {0xFF, 0x7A, 0x00}; - -#endif \ No newline at end of file +const color_t orangeColor = {0xFF, 0x7A, 0x00}; \ No newline at end of file diff --git a/source/define_buttons.h b/source/define_buttons.h index f719698..9e76ac5 100644 --- a/source/define_buttons.h +++ b/source/define_buttons.h @@ -5,9 +5,6 @@ #include "common/text.h" #include "const.h" -#ifndef DEFINE_BUTTONS_H -#define DEFINE_BUTTONS_H - struct db_button_t { std::string label; // Texto en pantalla para el botón @@ -69,6 +66,4 @@ public: // Comprueba si está habilitado bool isEnabled(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/director.h b/source/director.h index c247f5a..e8a2255 100644 --- a/source/director.h +++ b/source/director.h @@ -18,9 +18,6 @@ #include "load_param.h" #include "manage_hiscore_table.h" -#ifndef DIRECTOR_H -#define DIRECTOR_H - // Textos #define WINDOW_CAPTION "Coffee Crisis Arcade Edition" @@ -126,6 +123,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/fade.h b/source/fade.h index 90145a5..039a0f1 100644 --- a/source/fade.h +++ b/source/fade.h @@ -4,9 +4,6 @@ #include "common/texture.h" #include "common/utils.h" -#ifndef FADE_H -#define FADE_H - // Tipos de fundido #define FADE_FULLSCREEN 0 #define FADE_CENTER 1 @@ -85,6 +82,4 @@ public: // Establece la duración posterior void setPost(int value); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/game.h b/source/game.h index 4b122bc..043d975 100644 --- a/source/game.h +++ b/source/game.h @@ -22,9 +22,6 @@ #include "manage_hiscore_table.h" #include -#ifndef GAME_H -#define GAME_H - // Cantidad de elementos a escribir en los ficheros de datos #define TOTAL_SCORE_DATA 3 #define TOTAL_DEMO_DATA 2000 @@ -478,6 +475,4 @@ public: // Bucle para el juego void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/game_logo.h b/source/game_logo.h index 96db753..3b05e2f 100644 --- a/source/game_logo.h +++ b/source/game_logo.h @@ -7,9 +7,6 @@ #include "common/jail_audio.h" #include "const.h" -#ifndef GAME_LOGO_H -#define GAME_LOGO_H - // Clase GameLogo class GameLogo { @@ -84,6 +81,4 @@ public: // Recarga las texturas void reLoad(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/hiscore_table.h b/source/hiscore_table.h index 8b90454..a335386 100644 --- a/source/hiscore_table.h +++ b/source/hiscore_table.h @@ -13,9 +13,6 @@ #include "fade.h" #include "background.h" -#ifndef HISCORE_TABLE_H -#define HISCORE_TABLE_H - // Clase HiScoreTable class HiScoreTable { @@ -79,6 +76,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/instructions.h b/source/instructions.h index 78d1ae9..a89ea67 100644 --- a/source/instructions.h +++ b/source/instructions.h @@ -13,9 +13,6 @@ #include "tiledbg.h" #include "fade.h" -#ifndef INSTRUCTIONS_H -#define INSTRUCTIONS_H - // Clase Instructions class Instructions { @@ -82,6 +79,4 @@ public: // Bucle principal void run(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/intro.h b/source/intro.h index 82ad502..6324eed 100644 --- a/source/intro.h +++ b/source/intro.h @@ -12,9 +12,6 @@ #include "lang.h" #include -#ifndef INTRO_H -#define INTRO_H - // Clase Intro class Intro { @@ -67,5 +64,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/item.h b/source/item.h index 396d9b0..e8704e2 100644 --- a/source/item.h +++ b/source/item.h @@ -4,9 +4,6 @@ #include "common/animatedsprite.h" #include "common/utils.h" -#ifndef ITEM_H -#define ITEM_H - // Tipos de objetos #define ITEM_POINTS_1_DISK 1 #define ITEM_POINTS_2_GAVINA 2 @@ -92,6 +89,4 @@ public: // Informa si el objeto ha colisionado con el suelo bool isOnFloor(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/lang.h b/source/lang.h index 835bc63..e092a3f 100644 --- a/source/lang.h +++ b/source/lang.h @@ -4,9 +4,6 @@ #include "common/asset.h" #include -#ifndef LANG_H -#define LANG_H - // Códigos de idioma #define es_ES 0 #define ba_BA 1 @@ -35,5 +32,4 @@ public: // Obtiene la cadena de texto del indice std::string getText(int index); -}; -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/load_param.h b/source/load_param.h index 4af8d0c..12dd758 100644 --- a/source/load_param.h +++ b/source/load_param.h @@ -4,10 +4,5 @@ #include "common/utils.h" #include "const.h" -#ifndef LOAD_PARAM -#define LOAD_PARAM - // Establece valores para los parametros a partir de un fichero de texto -void loadParam(param_t *param, std::string filePath); - -#endif \ No newline at end of file +void loadParam(param_t *param, std::string filePath); \ No newline at end of file diff --git a/source/logo.h b/source/logo.h index e0cd39a..0ee2614 100644 --- a/source/logo.h +++ b/source/logo.h @@ -10,9 +10,6 @@ #include "const.h" #include -#ifndef LOGO_H -#define LOGO_H - class Logo { private: @@ -71,5 +68,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/player.h b/source/player.h index 9dc4333..497b04f 100644 --- a/source/player.h +++ b/source/player.h @@ -7,9 +7,6 @@ #include "common/texture.h" #include "common/utils.h" -#ifndef PLAYER_H -#define PLAYER_H - // Estados del jugador #define PLAYER_STATUS_WALKING_LEFT 0 #define PLAYER_STATUS_WALKING_RIGHT 1 @@ -212,5 +209,3 @@ public: // Obtiene el valor de la variable bool isEnabled(); }; - -#endif diff --git a/source/scoreboard.h b/source/scoreboard.h index 44d0e93..3ca8695 100644 --- a/source/scoreboard.h +++ b/source/scoreboard.h @@ -9,8 +9,12 @@ #include "const.h" #include "lang.h" -#ifndef SCOREBOARD_H -#define SCOREBOARD_H +enum scoreboard_modes_e +{ + scoreboard_mode_playing, + scoreboard_mode_game_over, + scoreboard_mode_demo, +}; // Clase Scoreboard class Scoreboard @@ -104,5 +108,3 @@ public: // Establece el valor de la variable void setPos(SDL_Rect rect); }; - -#endif diff --git a/source/tiledbg.h b/source/tiledbg.h index c6f41ae..5edc02a 100644 --- a/source/tiledbg.h +++ b/source/tiledbg.h @@ -6,9 +6,6 @@ #include "common/sprite.h" #include "const.h" -#ifndef TILEDBG_H -#define TILEDBG_H - #define TILED_MODE_CIRCLE 0 #define TILED_MODE_DIAGONAL 1 #define TILED_MODE_RANDOM 2 @@ -54,6 +51,4 @@ public: // Recarga las texturas void reLoad(); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/title.h b/source/title.h index efbf29f..c1b0cbb 100644 --- a/source/title.h +++ b/source/title.h @@ -22,9 +22,6 @@ #include "game_logo.h" #include "define_buttons.h" -#ifndef TITLE_H -#define TITLE_H - // Textos #define TEXT_COPYRIGHT "@2020,2024 JailDesigner" @@ -91,6 +88,4 @@ public: // Bucle para el titulo del juego void run(); -}; - -#endif +}; \ No newline at end of file