forked from jaildesigner-jailgames/jaildoctors_dilemma
Toquetechant includes
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -14,4 +14,5 @@ thumbs.db
|
|||||||
sync_jail_engine.sh
|
sync_jail_engine.sh
|
||||||
jaildoctors_dilemma*
|
jaildoctors_dilemma*
|
||||||
todo
|
todo
|
||||||
build/
|
build/
|
||||||
|
linux_utils/
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
#include "animatedsprite.h"
|
#include "animatedsprite.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
|
// Carga la animación desde un fichero
|
||||||
animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, bool verbose)
|
animatedSprite_t loadAnimationFromFile(Texture *texture, std::string filePath, bool verbose)
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "movingsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include <fstream>
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
#include <iostream>
|
#include <string> // for string
|
||||||
#include <sstream>
|
#include <vector> // for vector
|
||||||
#include <string>
|
#include "movingsprite.h" // for MovingSprite
|
||||||
#include <vector>
|
class Texture;
|
||||||
|
|
||||||
#ifndef ANIMATEDSPRITE_H
|
|
||||||
#define ANIMATEDSPRITE_H
|
|
||||||
|
|
||||||
struct animation_t
|
struct animation_t
|
||||||
{
|
{
|
||||||
@@ -98,6 +95,4 @@ public:
|
|||||||
|
|
||||||
// Reinicia la animación
|
// Reinicia la animación
|
||||||
void resetAnimation();
|
void resetAnimation();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "asset.h"
|
#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
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Asset::Asset(std::string executablePath)
|
Asset::Asset(std::string executablePath)
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <string> // for string
|
||||||
#include <string>
|
#include <vector> // for vector
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef ASSET_H
|
|
||||||
#define ASSET_H
|
|
||||||
|
|
||||||
enum assetType
|
enum assetType
|
||||||
{
|
{
|
||||||
@@ -62,5 +58,3 @@ public:
|
|||||||
// Establece si ha de mostrar texto por pantalla
|
// Establece si ha de mostrar texto por pantalla
|
||||||
void setVerbose(bool value);
|
void setVerbose(bool value);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
#include "cheevos.h"
|
#include "cheevos.h"
|
||||||
#include <iostream>
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_rwops.h> // for SDL_RWFromFile, SDL_RWclose, SDL_RWwrite
|
||||||
|
#include <stddef.h> // for NULL
|
||||||
|
#include <iostream> // for basic_ostream, operator<<, cout, endl
|
||||||
|
#include "screen.h" // for Screen
|
||||||
|
#include "utils.h" // for options_t
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Cheevos::Cheevos(Screen *screen, options_t *options, std::string file)
|
Cheevos::Cheevos(Screen *screen, options_t *options, std::string file)
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#include "screen.h"
|
|
||||||
#include "utils.h"
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef CHEEVOS_H
|
#include <string> // for string
|
||||||
#define CHEEVOS_H
|
#include <vector> // for vector
|
||||||
|
class Screen;
|
||||||
|
struct options_t;
|
||||||
|
|
||||||
struct cheevos_t
|
struct cheevos_t
|
||||||
{
|
{
|
||||||
@@ -75,6 +72,4 @@ public:
|
|||||||
|
|
||||||
// Vuelve a cargar los logros desde el origen
|
// Vuelve a cargar los logros desde el origen
|
||||||
void reload();
|
void reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include <algorithm> // for max
|
||||||
|
#include "asset.h" // for Asset
|
||||||
|
#include "text.h" // for Text
|
||||||
|
#include "texture.h" // for Texture
|
||||||
|
class Screen;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Debug::Debug(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
Debug::Debug(SDL_Renderer *renderer, Screen *screen, Asset *asset)
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Point
|
||||||
#include "const.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "asset.h"
|
#include <string> // for string
|
||||||
#include "screen.h"
|
#include <vector> // for vector
|
||||||
#include "text.h"
|
class Asset;
|
||||||
#include "texture.h"
|
class Screen;
|
||||||
#include "utils.h"
|
class Text;
|
||||||
#include <string>
|
class Texture;
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef DEBUG_H
|
|
||||||
#define DEBUG_H
|
|
||||||
|
|
||||||
// Clase Debug
|
// Clase Debug
|
||||||
class Debug
|
class Debug
|
||||||
@@ -68,5 +64,3 @@ public:
|
|||||||
// Cambia el valor de la variable
|
// Cambia el valor de la variable
|
||||||
void switchEnabled();
|
void switchEnabled();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,10 +1,40 @@
|
|||||||
#include "utils.h"
|
|
||||||
#include "director.h"
|
#include "director.h"
|
||||||
#include <errno.h>
|
#include <SDL2/SDL.h> // for SDL_Init, SDL_Quit, SDL_INIT_E...
|
||||||
#include <iostream>
|
#include <SDL2/SDL_audio.h> // for AUDIO_S16
|
||||||
#include <string>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
#include <sys/stat.h>
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
#include <unistd.h>
|
#include <SDL2/SDL_gamecontroller.h> // for SDL_CONTROLLER_BUTTON_B, SDL_C...
|
||||||
|
#include <SDL2/SDL_hints.h> // for SDL_SetHint, SDL_HINT_RENDER_D...
|
||||||
|
#include <SDL2/SDL_scancode.h> // for SDL_SCANCODE_A, SDL_SCANCODE_E...
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <errno.h> // for errno, EEXIST, EACCES, ENAMETO...
|
||||||
|
#include <stdio.h> // for printf, perror
|
||||||
|
#include <string.h> // for strcmp
|
||||||
|
#include <sys/stat.h> // for mkdir, stat, S_IRWXU
|
||||||
|
#include <unistd.h> // for getuid
|
||||||
|
#include <cstdlib> // for exit, EXIT_FAILURE, srand
|
||||||
|
#include <fstream> // for basic_ofstream, basic_ifstream
|
||||||
|
#include <iostream> // for basic_ostream, operator<<, cout
|
||||||
|
#include <string> // for basic_string, operator+, char_...
|
||||||
|
#include <vector> // 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
|
#ifndef _WIN32
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|||||||
@@ -1,27 +1,25 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#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
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#define DIRECTOR_H
|
#include <SDL2/SDL_video.h> // for SDL_Window
|
||||||
|
#include <string> // 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
|
class Director
|
||||||
{
|
{
|
||||||
@@ -120,6 +118,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
#include "enemy.h"
|
#include "enemy.h"
|
||||||
|
#include <stdlib.h> // for rand
|
||||||
|
#include <algorithm> // for min
|
||||||
|
#include "animatedsprite.h" // for AnimatedSprite
|
||||||
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Enemy::Enemy(enemy_t enemy)
|
Enemy::Enemy(enemy_t enemy)
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "asset.h"
|
#include <string> // for basic_string, string
|
||||||
#include "utils.h"
|
#include "utils.h" // for palette_e, color_t
|
||||||
#include <string>
|
class AnimatedSprite;
|
||||||
|
struct animatedSprite_t;
|
||||||
#ifndef ENEMY_H
|
|
||||||
#define ENEMY_H
|
|
||||||
|
|
||||||
// Estructura para pasar los datos de un enemigo
|
// Estructura para pasar los datos de un enemigo
|
||||||
struct enemy_t
|
struct enemy_t
|
||||||
@@ -78,5 +76,3 @@ public:
|
|||||||
// Asigna la paleta
|
// Asigna la paleta
|
||||||
void setPalette(palette_e pal);
|
void setPalette(palette_e pal);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
#include "gamestate_credits.h"
|
#include "gamestate_credits.h"
|
||||||
#include <iostream>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <algorithm> // for min
|
||||||
|
#include <iostream> // 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
|
// Constructor
|
||||||
Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "input.h"
|
#include <string> // for basic_string, string
|
||||||
#include "jail_audio.h"
|
#include <vector> // for vector
|
||||||
#include "resource.h"
|
#include "utils.h" // for color_t
|
||||||
#include "screen.h"
|
class AnimatedSprite;
|
||||||
#include "sprite.h"
|
class Asset;
|
||||||
#include "text.h"
|
class Input;
|
||||||
#include "texture.h"
|
class Resource;
|
||||||
#include "utils.h"
|
class Screen;
|
||||||
#include "const.h"
|
class Text;
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef CREDITS_H
|
|
||||||
#define CREDITS_H
|
|
||||||
|
|
||||||
class Credits
|
class Credits
|
||||||
{
|
{
|
||||||
@@ -82,5 +78,3 @@ public:
|
|||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
#include "gamestate_demo.h"
|
#include "gamestate_demo.h"
|
||||||
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <iostream> // 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
|
// Constructor
|
||||||
Demo::Demo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section, Debug *debug)
|
Demo::Demo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section, Debug *debug)
|
||||||
|
|||||||
@@ -1,24 +1,21 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "input.h"
|
#include <string> // for string, basic_string
|
||||||
#include "debug.h"
|
#include <vector> // for vector
|
||||||
#include "input.h"
|
#include "scoreboard.h" // for board_t
|
||||||
#include "resource.h"
|
class Asset;
|
||||||
#include "screen.h"
|
class Debug;
|
||||||
#include "sprite.h"
|
class Input;
|
||||||
#include "text.h"
|
class ItemTracker;
|
||||||
#include "utils.h"
|
class Resource;
|
||||||
#include "const.h"
|
class Room;
|
||||||
#include "item_tracker.h"
|
class Screen;
|
||||||
#include "room_tracker.h"
|
class Text;
|
||||||
#include "room.h"
|
struct options_t;
|
||||||
#include "scoreboard.h"
|
struct section_t;
|
||||||
|
|
||||||
#ifndef DEMO_H
|
|
||||||
#define DEMO_H
|
|
||||||
|
|
||||||
class Demo
|
class Demo
|
||||||
{
|
{
|
||||||
@@ -88,5 +85,3 @@ public:
|
|||||||
// Bucle para el juego
|
// Bucle para el juego
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,4 +1,21 @@
|
|||||||
#include "gamestate_ending.h"
|
#include "gamestate_ending.h"
|
||||||
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <algorithm> // for min
|
||||||
|
#include <iostream> // 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
|
// Constructor
|
||||||
Ending::Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
Ending::Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#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 <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef ENDING_H
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#define ENDING_H
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <string> // for basic_string, string
|
||||||
|
#include <vector> // 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
|
class Ending
|
||||||
{
|
{
|
||||||
@@ -125,6 +124,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,17 @@
|
|||||||
#include "gamestate_ending2.h"
|
#include "gamestate_ending2.h"
|
||||||
#include <algorithm>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <algorithm> // 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
|
// Constructor
|
||||||
Ending2::Ending2(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
Ending2::Ending2(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#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 <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#ifndef ENDING2_H
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#define ENDING2_H
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <string> // for string
|
||||||
|
#include <vector> // 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
|
class Ending2
|
||||||
{
|
{
|
||||||
@@ -128,5 +126,3 @@ public:
|
|||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
#include "gamestate_game.h"
|
#include "gamestate_game.h"
|
||||||
#include <iostream>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
|
#include <SDL2/SDL_scancode.h> // for SDL_SCANCODE_A, SDL_SCANCODE_D, SDL_...
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <iostream> // for char_traits, basic_ostream, operator<<
|
||||||
|
#include <vector> // 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
|
// Constructor
|
||||||
Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options, Input *input, section_t *section, Debug *debug)
|
Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options, Input *input, section_t *section, Debug *debug)
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "cheevos.h"
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "debug.h"
|
#include <string> // for string, basic_string
|
||||||
#include "input.h"
|
#include "player.h" // for playerSpawn_t
|
||||||
#include "jail_audio.h"
|
#include "scoreboard.h" // for board_t
|
||||||
#include "resource.h"
|
class Asset;
|
||||||
#include "screen.h"
|
class Cheevos;
|
||||||
#include "sprite.h"
|
class Debug;
|
||||||
#include "text.h"
|
class Input;
|
||||||
#include "utils.h"
|
class ItemTracker;
|
||||||
#include "const.h"
|
class Resource;
|
||||||
#include "item_tracker.h"
|
class Room;
|
||||||
#include "player.h"
|
class RoomTracker;
|
||||||
#include "room_tracker.h"
|
class Screen;
|
||||||
#include "room.h"
|
class Stats;
|
||||||
#include "scoreboard.h"
|
class Text;
|
||||||
#include "stats.h"
|
struct JA_Music_t;
|
||||||
|
struct JA_Sound_t;
|
||||||
#ifndef GAME_H
|
struct options_t;
|
||||||
#define GAME_H
|
struct section_t;
|
||||||
|
|
||||||
class Game
|
class Game
|
||||||
{
|
{
|
||||||
@@ -158,6 +158,4 @@ public:
|
|||||||
|
|
||||||
// Bucle para el juego
|
// Bucle para el juego
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,16 @@
|
|||||||
#include "gamestate_game_over.h"
|
#include "gamestate_game_over.h"
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <algorithm> // for min, max
|
||||||
|
#include <string> // 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
|
// Constructor
|
||||||
GameOver::GameOver(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
GameOver::GameOver(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#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 <vector>
|
|
||||||
|
|
||||||
#ifndef GAME_OVER_H
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#define GAME_OVER_H
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
|
#include <vector> // 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
|
class GameOver
|
||||||
{
|
{
|
||||||
@@ -77,6 +74,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,16 @@
|
|||||||
#include "gamestate_loading_screen.h"
|
#include "gamestate_loading_screen.h"
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <stdlib.h> // for rand
|
||||||
|
#include <string> // 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
|
// Constructor
|
||||||
LoadingScreen::LoadingScreen(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
LoadingScreen::LoadingScreen(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "input.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "jail_audio.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "resource.h"
|
class Asset;
|
||||||
#include "screen.h"
|
class Input;
|
||||||
#include "sprite.h"
|
class Resource;
|
||||||
#include "utils.h"
|
class Screen;
|
||||||
#include "const.h"
|
class Sprite;
|
||||||
#include <vector>
|
class Texture;
|
||||||
|
struct JA_Music_t;
|
||||||
#include <string>
|
struct options_t;
|
||||||
#include "text.h"
|
struct section_t;
|
||||||
|
|
||||||
#ifndef LOADING_SCREEN_H
|
|
||||||
#define LOADING_SCREEN_H
|
|
||||||
|
|
||||||
class LoadingScreen
|
class LoadingScreen
|
||||||
{
|
{
|
||||||
@@ -86,6 +83,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
#include "gamestate_logo.h"
|
#include "gamestate_logo.h"
|
||||||
#include <iostream>
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <string> // 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
|
// Constructor
|
||||||
Logo::Logo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
Logo::Logo(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "input.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "jail_audio.h"
|
#include <vector> // for vector
|
||||||
#include "resource.h"
|
#include "utils.h" // for color_t
|
||||||
#include "screen.h"
|
class Asset;
|
||||||
#include "sprite.h"
|
class Input;
|
||||||
#include "utils.h"
|
class Resource;
|
||||||
#include "const.h"
|
class Screen;
|
||||||
#include <vector>
|
class Sprite;
|
||||||
|
class Texture;
|
||||||
#ifndef LOGO_H
|
|
||||||
#define LOGO_H
|
|
||||||
|
|
||||||
class Logo
|
class Logo
|
||||||
{
|
{
|
||||||
@@ -73,6 +71,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,20 @@
|
|||||||
#include "gamestate_title.h"
|
#include "gamestate_title.h"
|
||||||
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
|
#include <SDL2/SDL_scancode.h> // for SDL_SCANCODE_1, SDL_SCANCODE_2
|
||||||
|
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||||
|
#include <iostream> // 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
|
// Constructor
|
||||||
Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, Input *input, options_t *options, section_t *section)
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_events.h> // for SDL_Event
|
||||||
#include "cheevos.h"
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include "input.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "jail_audio.h"
|
#include <string> // for basic_string, string
|
||||||
#include "resource.h"
|
#include <vector> // for vector
|
||||||
#include "paleta.h"
|
#include "paleta.h" // for jSurface
|
||||||
#include "screen.h"
|
class Asset;
|
||||||
#include "sprite.h"
|
class Cheevos;
|
||||||
#include "text.h"
|
class Input;
|
||||||
#include "utils.h"
|
class Resource;
|
||||||
#include "const.h"
|
class Screen;
|
||||||
#include <vector>
|
class Sprite;
|
||||||
|
class Text;
|
||||||
#ifndef TITLE_H
|
class Texture;
|
||||||
#define TITLE_H
|
struct options_t;
|
||||||
|
struct section_t;
|
||||||
|
|
||||||
class Title
|
class Title
|
||||||
{
|
{
|
||||||
@@ -115,6 +116,4 @@ public:
|
|||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
#include "input.h"
|
#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_joystick.h> // for SDL_NumJoysticks
|
||||||
|
#include <SDL2/SDL_keyboard.h> // for SDL_GetKeyboardState
|
||||||
|
#include <iostream> // for basic_ostream, operator<<, cout, basi...
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Input::Input(std::string file)
|
Input::Input(std::string file)
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_gamecontroller.h> // for SDL_GameControllerButton, SDL_G...
|
||||||
#include <string>
|
#include <SDL2/SDL_scancode.h> // for SDL_Scancode
|
||||||
#include <vector>
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
|
#include <string> // for string, basic_string
|
||||||
#ifndef INPUT_H
|
#include <vector> // for vector
|
||||||
#define INPUT_H
|
|
||||||
|
|
||||||
enum inputs_e
|
enum inputs_e
|
||||||
{
|
{
|
||||||
@@ -115,6 +114,4 @@ public:
|
|||||||
|
|
||||||
// Hablita las entradas
|
// Hablita las entradas
|
||||||
void enable();
|
void enable();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include <fstream>
|
#include "sprite.h" // for Sprite
|
||||||
#include <sstream>
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Item::Item(item_t item)
|
Item::Item(item_t item)
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "sprite.h"
|
#include <string> // for basic_string, string
|
||||||
#include "utils.h"
|
#include <vector> // for vector
|
||||||
#include <string>
|
#include "utils.h" // for color_t
|
||||||
|
class Sprite;
|
||||||
#ifndef ITEM_H
|
class Texture;
|
||||||
#define ITEM_H
|
|
||||||
|
|
||||||
struct item_t
|
struct item_t
|
||||||
{
|
{
|
||||||
@@ -58,6 +57,4 @@ public:
|
|||||||
|
|
||||||
// Asigna los colores del objeto
|
// Asigna los colores del objeto
|
||||||
void setColors(color_t col1, color_t col2);
|
void setColors(color_t col1, color_t col2);
|
||||||
};
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#include "utils.h"
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef ITEM_TRACKER_H
|
#include <SDL2/SDL_rect.h> // for SDL_Point
|
||||||
#define ITEM_TRACKER_H
|
#include <string> // for string, basic_string
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
struct item_tracker_t
|
struct item_tracker_t
|
||||||
{
|
{
|
||||||
@@ -34,6 +31,4 @@ public:
|
|||||||
|
|
||||||
// Añade el objeto a la lista de objetos cogidos
|
// Añade el objeto a la lista de objetos cogidos
|
||||||
void addItem(std::string name, SDL_Point pos);
|
void addItem(std::string name, SDL_Point pos);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
#include "const.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include <algorithm> // for max
|
||||||
|
#include <fstream> // for char_traits, basic_ostream, operator<<, basi...
|
||||||
|
#include <iostream> // for cout
|
||||||
|
#include <sstream> // 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
|
// Constructor
|
||||||
Menu::Menu(SDL_Renderer *renderer, Resource *resource, Asset *asset, Input *input, std::string file)
|
Menu::Menu(SDL_Renderer *renderer, Resource *resource, Asset *asset, Input *input, std::string file)
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "input.h"
|
#include <string> // for string, basic_string
|
||||||
#include "jail_audio.h"
|
#include <vector> // for vector
|
||||||
#include "resource.h"
|
#include "utils.h" // for color_t
|
||||||
#include "sprite.h"
|
class Asset;
|
||||||
#include "text.h"
|
class Input;
|
||||||
#include "utils.h"
|
class Resource;
|
||||||
#include <fstream>
|
class Text;
|
||||||
#include <sstream>
|
struct JA_Sound_t;
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef MENU_H
|
|
||||||
#define MENU_H
|
|
||||||
|
|
||||||
// Tipos de fondos para el menu
|
// Tipos de fondos para el menu
|
||||||
#define MENU_BACKGROUND_TRANSPARENT 0
|
#define MENU_BACKGROUND_TRANSPARENT 0
|
||||||
@@ -221,6 +217,4 @@ public:
|
|||||||
|
|
||||||
// Establece el rectangulo de fondo del menu
|
// Establece el rectangulo de fondo del menu
|
||||||
void setRectSize(int w = 0, int h = 0);
|
void setRectSize(int w = 0, int h = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "const.h"
|
|
||||||
#include "movingsprite.h"
|
#include "movingsprite.h"
|
||||||
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture, SDL_Renderer *renderer)
|
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture, SDL_Renderer *renderer)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include "sprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_RendererFlip, SDL_Renderer
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint16
|
||||||
#ifndef MOVINGSPRITE_H
|
#include "sprite.h" // for Sprite
|
||||||
#define MOVINGSPRITE_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
|
||||||
@@ -182,6 +182,4 @@ public:
|
|||||||
|
|
||||||
// Devuelve el incremento en el eje X en pixels
|
// Devuelve el incremento en el eje X en pixels
|
||||||
int getIncX();
|
int getIncX();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
#include <string>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
#include <stdio.h>
|
#include <string> // for basic_string, string, char_traits
|
||||||
#include <iostream>
|
#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
|
// Constructor
|
||||||
Notify::Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options)
|
Notify::Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options)
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "jail_audio.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "sprite.h"
|
#include <string> // for basic_string, string
|
||||||
#include "text.h"
|
#include <vector> // for vector
|
||||||
#include "texture.h"
|
#include "utils.h" // for color_t
|
||||||
#include "utils.h"
|
class Sprite;
|
||||||
#include <vector>
|
class Text;
|
||||||
|
class Texture;
|
||||||
#ifndef NOTIFY_H
|
struct JA_Sound_t;
|
||||||
#define NOTIFY_H
|
|
||||||
|
|
||||||
class Notify
|
class Notify
|
||||||
{
|
{
|
||||||
@@ -83,5 +82,3 @@ public:
|
|||||||
// Indica si hay notificaciones activas
|
// Indica si hay notificaciones activas
|
||||||
bool active();
|
bool active();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#include "paleta.h"
|
#include "paleta.h"
|
||||||
#include "gif.c"
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_ARGB8888
|
||||||
#include <stdio.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
|
#include <fcntl.h> // for SEEK_END, SEEK_SET
|
||||||
|
#include <stdio.h> // for NULL, fseek, fclose, fopen, fread, ftell
|
||||||
|
#include <stdlib.h> // for malloc, free
|
||||||
|
#include "gif.c" // for LoadGif, LoadPalette
|
||||||
|
|
||||||
struct jSurface_s
|
struct jSurface_s
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint32
|
||||||
|
|
||||||
typedef struct jSurface_s *jSurface;
|
typedef struct jSurface_s *jSurface;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,17 @@
|
|||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include <fstream>
|
#include <bits/std_abs.h> // for abs
|
||||||
#include <sstream>
|
#include <stdlib.h> // for rand
|
||||||
|
#include <algorithm> // for max, min
|
||||||
|
#include <cmath> // 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
|
// Constructor
|
||||||
Player::Player(player_t player)
|
Player::Player(player_t player)
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "asset.h"
|
#include <string> // for basic_string, string
|
||||||
#include "debug.h"
|
#include <vector> // for vector
|
||||||
#include "input.h"
|
#include "utils.h" // for color_t
|
||||||
#include "resource.h"
|
class AnimatedSprite;
|
||||||
#include "utils.h"
|
class Asset;
|
||||||
#include "const.h"
|
class Debug;
|
||||||
#include "room.h"
|
class Input;
|
||||||
#include <string>
|
class Resource;
|
||||||
#include <vector>
|
class Room;
|
||||||
|
struct JA_Sound_t;
|
||||||
#ifndef PLAYER_H
|
|
||||||
#define PLAYER_H
|
|
||||||
|
|
||||||
enum state_e
|
enum state_e
|
||||||
{
|
{
|
||||||
@@ -194,6 +192,4 @@ public:
|
|||||||
|
|
||||||
// Quita el modo pausa del jugador
|
// Quita el modo pausa del jugador
|
||||||
void resume();
|
void resume();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include <iostream>
|
#include <iostream> // 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
|
// Constructor
|
||||||
Resource::Resource(SDL_Renderer *renderer, Asset *asset, options_t *options)
|
Resource::Resource(SDL_Renderer *renderer, Asset *asset, options_t *options)
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "animatedsprite.h"
|
#include <string> // for string, basic_string
|
||||||
#include "asset.h"
|
#include <vector> // for vector
|
||||||
#include "room.h"
|
class Asset;
|
||||||
#include "text.h"
|
class Texture;
|
||||||
#include "texture.h"
|
struct animatedSprite_t;
|
||||||
#include "utils.h"
|
struct options_t;
|
||||||
#include <string>
|
struct room_t;
|
||||||
#include <vector>
|
struct textFile_t;
|
||||||
|
|
||||||
#ifndef RESOURCE_H
|
|
||||||
#define RESOURCE_H
|
|
||||||
|
|
||||||
struct res_texture_t
|
struct res_texture_t
|
||||||
{
|
{
|
||||||
@@ -131,6 +128,4 @@ public:
|
|||||||
|
|
||||||
// Obtiene todas las habitaciones
|
// Obtiene todas las habitaciones
|
||||||
std::vector<res_room_t> *getAllRooms();
|
std::vector<res_room_t> *getAllRooms();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,7 +1,19 @@
|
|||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include <iostream>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BLENDMODE_BLEND
|
||||||
#include <fstream>
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
#include <sstream>
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
|
#include <stdlib.h> // for rand
|
||||||
|
#include <fstream> // for basic_ostream, operator<<, basic_ist...
|
||||||
|
#include <iostream> // for cout
|
||||||
|
#include <sstream> // 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
|
// Carga las variables y texturas desde un fichero de mapa de tiles
|
||||||
std::vector<int> loadRoomTileFile(std::string file_path, bool verbose)
|
std::vector<int> loadRoomTileFile(std::string file_path, bool verbose)
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include "debug.h"
|
#include <string> // for string, basic_string
|
||||||
#include "jail_audio.h"
|
#include <vector> // for vector
|
||||||
#include "screen.h"
|
#include "enemy.h" // for enemy_t
|
||||||
#include "sprite.h"
|
#include "item.h" // for item_t
|
||||||
#include "utils.h"
|
#include "utils.h" // for h_line_t, color_t, d_line_t, v_line_t
|
||||||
#include "const.h"
|
class Asset;
|
||||||
#include "enemy.h"
|
class Debug;
|
||||||
#include "item_tracker.h"
|
class ItemTracker;
|
||||||
#include "item.h"
|
class Screen;
|
||||||
#include <string>
|
class Sprite;
|
||||||
#include <vector>
|
class Texture;
|
||||||
|
struct JA_Sound_t;
|
||||||
#ifndef ROOM_H
|
|
||||||
#define ROOM_H
|
|
||||||
|
|
||||||
enum tile_e
|
enum tile_e
|
||||||
{
|
{
|
||||||
@@ -253,6 +251,4 @@ public:
|
|||||||
|
|
||||||
// Obten la direccion de las superficies automaticas
|
// Obten la direccion de las superficies automaticas
|
||||||
int getAutoSurfaceDirection();
|
int getAutoSurfaceDirection();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <string> // for string
|
||||||
#include "utils.h"
|
#include <vector> // for vector
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef ROOM_TRACKER_H
|
|
||||||
#define ROOM_TRACKER_H
|
|
||||||
|
|
||||||
class RoomTracker
|
class RoomTracker
|
||||||
{
|
{
|
||||||
@@ -27,5 +22,3 @@ public:
|
|||||||
// Añade la habitación a la lista
|
// Añade la habitación a la lista
|
||||||
bool addRoom(std::string name);
|
bool addRoom(std::string name);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
#include "scoreboard.h"
|
#include "scoreboard.h"
|
||||||
#include <fstream>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include <sstream>
|
#include <SDL2/SDL_timer.h> // 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
|
// Constructor
|
||||||
ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Resource *resource, Asset *asset, options_t *options, board_t *board)
|
ScoreBoard::ScoreBoard(SDL_Renderer *renderer, Resource *resource, Asset *asset, options_t *options, board_t *board)
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "animatedsprite.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||||
#include "asset.h"
|
#include <string> // for basic_string, string
|
||||||
#include "resource.h"
|
#include <vector> // for vector
|
||||||
#include "text.h"
|
#include "utils.h" // for color_t
|
||||||
#include "utils.h"
|
class AnimatedSprite;
|
||||||
#include "const.h"
|
class Asset;
|
||||||
#include <string>
|
class Resource;
|
||||||
|
class Text;
|
||||||
#ifndef SCOREBOARD_H
|
class Texture;
|
||||||
#define SCOREBOARD_H
|
|
||||||
|
|
||||||
struct board_t
|
struct board_t
|
||||||
{
|
{
|
||||||
@@ -88,5 +87,3 @@ public:
|
|||||||
// Devuelve la cantidad de minutos de juego transcurridos
|
// Devuelve la cantidad de minutos de juego transcurridos
|
||||||
int getMinutes();
|
int getMinutes();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "jail_shader.h"
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
#include <string>
|
#include <SDL2/SDL_events.h> // for SDL_DISABLE, SDL_ENABLE
|
||||||
#include <fstream> // Para basic_ifstream, ifstream
|
#include <SDL2/SDL_mouse.h> // for SDL_ShowCursor
|
||||||
#include <iterator> // Para istreambuf_iterator, operator==
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGBA8888
|
||||||
#include <iostream>
|
#include <algorithm> // for max, min
|
||||||
|
#include <fstream> // for basic_ostream, operator<<, basic_ifstream
|
||||||
|
#include <iostream> // for cout
|
||||||
|
#include <iterator> // for istreambuf_iterator, operator!=
|
||||||
|
#include <string> // for basic_string, char_traits, string
|
||||||
|
#include "asset.h" // for Asset
|
||||||
|
#include "jail_shader.h" // for init, render
|
||||||
|
#include "notify.h" // for Notify
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options)
|
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BlendMode
|
||||||
#include "asset.h"
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "notify.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
|
||||||
#include "utils.h"
|
#include <SDL2/SDL_video.h> // for SDL_Window
|
||||||
#include "const.h"
|
#include <string> // for basic_string, string
|
||||||
#include <vector>
|
#include <vector> // for vector
|
||||||
|
#include "utils.h" // for color_t
|
||||||
#ifndef SCREEN_H
|
class Asset;
|
||||||
#define SCREEN_H
|
class Notify;
|
||||||
|
|
||||||
#define FILTER_NEAREST 0
|
#define FILTER_NEAREST 0
|
||||||
#define FILTER_LINEAL 1
|
#define FILTER_LINEAL 1
|
||||||
@@ -151,6 +151,4 @@ public:
|
|||||||
|
|
||||||
// Cambia el estado de los shaders
|
// Cambia el estado de los shaders
|
||||||
void toggleShaders();
|
void toggleShaders();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "texture.h" // for Texture
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *renderer)
|
Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *renderer)
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect
|
||||||
#include "texture.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
|
class Texture;
|
||||||
#ifndef SPRITE_H
|
|
||||||
#define SPRITE_H
|
|
||||||
|
|
||||||
// Clase sprite
|
// Clase sprite
|
||||||
class Sprite
|
class Sprite
|
||||||
@@ -95,6 +93,4 @@ public:
|
|||||||
|
|
||||||
// Establece los valores de posición y tamaño del sprite
|
// Establece los valores de posición y tamaño del sprite
|
||||||
void setRect(SDL_Rect rect);
|
void setRect(SDL_Rect rect);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include <algorithm>
|
#include <fstream> // for basic_ostream, basic_ifstream, basic_istream, ope...
|
||||||
#include <fstream>
|
#include <sstream> // for basic_stringstream
|
||||||
#include <iostream>
|
#include "utils.h" // for op_stats_t, options_t
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Stats::Stats(std::string file, std::string buffer, options_t *options)
|
Stats::Stats(std::string file, std::string buffer, options_t *options)
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
#include "utils.h"
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef STATS_H
|
#include <string> // for string, basic_string
|
||||||
#define STATS_H
|
#include <vector> // for vector
|
||||||
|
struct options_t;
|
||||||
|
|
||||||
class Stats
|
class Stats
|
||||||
{
|
{
|
||||||
@@ -73,6 +70,4 @@ public:
|
|||||||
|
|
||||||
// Añade una entrada al diccionario
|
// Añade una entrada al diccionario
|
||||||
void addDictionary(std::string number, std::string name);
|
void addDictionary(std::string number, std::string name);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include <iostream>
|
#include <fstream> // for char_traits, basic_ostream, basic_ifstream, ope...
|
||||||
#include <fstream>
|
#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
|
// Llena una estructuta textFile_t desde un fichero
|
||||||
textFile_t LoadTextFile(std::string file, bool verbose)
|
textFile_t LoadTextFile(std::string file, bool verbose)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "sprite.h"
|
#include <SDL2/SDL_render.h> // for SDL_Renderer
|
||||||
#include "utils.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
|
#include <string> // for string
|
||||||
#ifndef TEXT_H
|
class Sprite;
|
||||||
#define TEXT_H
|
class Texture;
|
||||||
|
struct color_t;
|
||||||
|
|
||||||
#define TXT_COLOR 1
|
#define TXT_COLOR 1
|
||||||
#define TXT_SHADOW 2
|
#define TXT_SHADOW 2
|
||||||
@@ -75,6 +76,4 @@ public:
|
|||||||
|
|
||||||
// Establece si se usa un tamaño fijo de letra
|
// Establece si se usa un tamaño fijo de letra
|
||||||
void setFixedWidth(bool value);
|
void setFixedWidth(bool value);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
|
|
||||||
#include "texture.h"
|
#include "texture.h"
|
||||||
|
#include <SDL2/SDL_error.h> // for SDL_GetError
|
||||||
|
#include <SDL2/SDL_log.h> // for SDL_Log
|
||||||
|
#include <SDL2/SDL_pixels.h> // for SDL_PIXELFORMAT_RGB24, SDL_PIXELFORMAT...
|
||||||
|
#include <SDL2/SDL_surface.h> // for SDL_CreateRGBSurfaceWithFormatFrom
|
||||||
|
#include <stdlib.h> // for exit
|
||||||
|
#include <iostream> // for basic_ostream, operator<<, cout, endl
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "stb_image.h"
|
#include "stb_image.h" // for stbi_failure_reason, stbi_image_free
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose)
|
Texture::Texture(SDL_Renderer *renderer, std::string path, bool verbose)
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_blendmode.h> // for SDL_BlendMode
|
||||||
#include <stdio.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
|
||||||
#include <string>
|
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_FLIP_NONE, SDL_TEX...
|
||||||
|
#include <SDL2/SDL_stdinc.h> // for Uint8
|
||||||
#ifndef TEXTURE_H
|
#include <string> // for basic_string, string
|
||||||
#define TEXTURE_H
|
|
||||||
|
|
||||||
class Texture
|
class Texture
|
||||||
{
|
{
|
||||||
@@ -61,6 +60,4 @@ public:
|
|||||||
|
|
||||||
// Obtiene la textura
|
// Obtiene la textura
|
||||||
SDL_Texture *getSDLTexture();
|
SDL_Texture *getSDLTexture();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <math.h>
|
#include <stdlib.h> // for free, malloc, abs
|
||||||
|
#include <cmath> // for round, abs
|
||||||
|
|
||||||
// Calcula el cuadrado de la distancia entre dos puntos
|
// Calcula el cuadrado de la distancia entre dos puntos
|
||||||
double distanceSquared(int x1, int y1, int x2, int y2)
|
double distanceSquared(int x1, int y1, int x2, int y2)
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL_rect.h> // for SDL_Rect, SDL_Point
|
||||||
#include "texture.h"
|
#include <SDL2/SDL_stdinc.h> // for Uint8, Uint32
|
||||||
#include <string>
|
#include <string> // for string, basic_string
|
||||||
|
|
||||||
#ifndef UTILS_H
|
|
||||||
#define UTILS_H
|
|
||||||
|
|
||||||
// Estructura para definir un circulo
|
// Estructura para definir un circulo
|
||||||
struct circle_t
|
struct circle_t
|
||||||
@@ -189,6 +186,4 @@ bool colorAreEqual(color_t color1, color_t color2);
|
|||||||
std::string toLower(std::string str);
|
std::string toLower(std::string str);
|
||||||
|
|
||||||
// Convierte una cadena a mayúsculas
|
// Convierte una cadena a mayúsculas
|
||||||
std::string toUpper(std::string str);
|
std::string toUpper(std::string str);
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user