forked from jaildesigner-jailgames/jaildoctors_dilemma
redistribuida la carpeta source
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#include "global_inputs.h"
|
||||
#include "core/input/global_inputs.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <string> // Para allocator, operator+, char_traits, string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "input.h" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "options.h" // Para Options, options, OptionsVideo, Section
|
||||
#include "screen.h" // Para Screen
|
||||
#include "ui/notifier.h" // Para Notifier, NotificationText
|
||||
#include "utils.h" // Para stringInVector
|
||||
#include "core/input/input.hpp" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsVideo, Section
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "game/ui/notifier.hpp" // Para Notifier, NotificationText
|
||||
#include "utils/utils.hpp" // Para stringInVector
|
||||
|
||||
namespace globalInputs {
|
||||
void quit() {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "input.h"
|
||||
#include "core/input/input.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "mouse.h"
|
||||
#include "core/input/mouse.hpp"
|
||||
|
||||
|
||||
namespace Mouse {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "gif.h"
|
||||
#include "core/rendering/gif.hpp"
|
||||
#include <iostream> // Para std::cout
|
||||
#include <cstring> // Para memcpy, size_t
|
||||
#include <stdexcept> // Para runtime_error
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "opengl_shader.h"
|
||||
#include "core/rendering/opengl/opengl_shader.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <cstring>
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../shader_backend.h"
|
||||
#include "core/rendering/shader_backend.hpp"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl3.h>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "screen.h"
|
||||
#include "core/rendering/screen.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <ctype.h> // Para toupper
|
||||
@@ -9,14 +9,14 @@
|
||||
#include <iterator> // Para istreambuf_iterator, operator==
|
||||
#include <string> // Para char_traits, string, operator+, operator==
|
||||
|
||||
#include "asset.h" // Para Asset, AssetType
|
||||
#include "mouse.h" // Para updateCursorVisibility
|
||||
#include "options.h" // Para Options, options, OptionsVideo, Border
|
||||
#include "rendering/opengl/opengl_shader.h" // Para OpenGLShader
|
||||
#include "resource.h" // Para Resource
|
||||
#include "surface.h" // Para Surface, readPalFile
|
||||
#include "text.h" // Para Text
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "core/resources/asset.hpp" // Para Asset, AssetType
|
||||
#include "core/input/mouse.hpp" // Para updateCursorVisibility
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsVideo, Border
|
||||
#include "core/rendering/opengl/opengl_shader.hpp" // Para OpenGLShader
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/surface.hpp" // Para Surface, readPalFile
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "game/ui/notifier.hpp" // Para Notifier
|
||||
|
||||
// [SINGLETON]
|
||||
Screen* Screen::screen_ = nullptr;
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "utils.h" // Para Color
|
||||
#include "utils/utils.hpp" // Para Color
|
||||
struct Surface;
|
||||
namespace Rendering {
|
||||
class ShaderBackend;
|
||||
@@ -1,5 +1,5 @@
|
||||
// IWYU pragma: no_include <bits/std_abs.h>
|
||||
#include "surface.h"
|
||||
#include "core/rendering/surface.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <stdexcept> // Para runtime_error
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "gif.h" // Para Gif
|
||||
#include "screen.h" // Para Screen
|
||||
#include "core/rendering/gif.hpp" // Para Gif
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
|
||||
// Carga una paleta desde un archivo .gif
|
||||
Palette loadPalette(const std::string& file_path) {
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <string> // Para string
|
||||
#include <utility> // Para move
|
||||
|
||||
#include "utils.h" // Para PaletteColor
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
// Alias
|
||||
using Palette = std::array<Uint32, 256>;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "sprite/surface_animated_sprite.h"
|
||||
#include "core/rendering/surface_animated_sprite.hpp"
|
||||
|
||||
#include <stddef.h> // Para size_t
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include <sstream> // Para basic_stringstream
|
||||
#include <stdexcept> // Para runtime_error
|
||||
|
||||
#include "surface.h" // Para Surface
|
||||
#include "utils.h" // Para printWithDots
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "utils/utils.hpp" // Para printWithDots
|
||||
|
||||
// Carga las animaciones en un vector(Animations) desde un fichero
|
||||
Animations loadAnimationsFromFile(const std::string& file_path) {
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "sprite/surface_moving_sprite.h" // Para SMovingSprite
|
||||
#include "core/rendering/surface_moving_sprite.hpp" // Para SMovingSprite
|
||||
class Surface; // lines 9-9
|
||||
|
||||
struct AnimationData {
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "sprite/surface_moving_sprite.h"
|
||||
#include "core/rendering/surface_moving_sprite.hpp"
|
||||
|
||||
#include "surface.h" // Para Surface
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
|
||||
// Constructor
|
||||
SMovingSprite::SMovingSprite(std::shared_ptr<Surface> surface, SDL_FRect pos, SDL_FlipMode flip)
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <memory> // Para shared_ptr
|
||||
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
class Surface; // lines 8-8
|
||||
|
||||
// Clase SMovingSprite. Añade movimiento y flip al sprite
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "sprite/surface_sprite.h"
|
||||
#include "core/rendering/surface_sprite.hpp"
|
||||
|
||||
#include "surface.h" // Para Surface
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
|
||||
// Constructor
|
||||
SSprite::SSprite(std::shared_ptr<Surface> surface, float x, float y, float w, float h)
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "text.h"
|
||||
#include "core/rendering/text.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <stddef.h> // Para size_t
|
||||
@@ -7,10 +7,10 @@
|
||||
#include <iostream> // Para cerr
|
||||
#include <stdexcept> // Para runtime_error
|
||||
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "utils.h" // Para getFileName, stringToColor, printWithDots
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "utils/utils.hpp" // Para getFileName, stringToColor, printWithDots
|
||||
|
||||
// Llena una estructuta TextFile desde un fichero
|
||||
std::shared_ptr<TextFile> loadTextFile(const std::string& file_path) {
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
#include <string> // Para string
|
||||
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
class Surface; // lines 8-8
|
||||
|
||||
constexpr int TEXT_COLOR = 1;
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
#include "texture.h"
|
||||
#include "core/rendering/texture.hpp"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <string> // Para char_traits, operator<<, string, opera...
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "utils.h" // Para getFileName, Color, printWithDots
|
||||
#include "utils/utils.hpp" // Para getFileName, Color, printWithDots
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "external/stb_image.h" // para stbi_failure_reason, stbi_image_free
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "asset.h"
|
||||
#include "core/resources/asset.hpp"
|
||||
#include <algorithm> // Para find_if, max
|
||||
#include <fstream> // Para basic_ostream, operator<<, basic_ifstream, endl
|
||||
#include <iostream> // Para cout
|
||||
#include <string> // Para allocator, char_traits, string, operator+, oper...
|
||||
#include "utils.h" // Para getFileName, printWithDots
|
||||
#include "utils/utils.hpp" // Para getFileName, printWithDots
|
||||
|
||||
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
|
||||
Asset *Asset::asset_ = nullptr;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <string> // para string, basic_string
|
||||
#include <vector> // para vector
|
||||
#include "utils.h"
|
||||
#include "utils/utils.hpp"
|
||||
|
||||
enum class AssetType : int
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "resource.h"
|
||||
#include "core/resources/resource.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <stdlib.h> // Para exit, size_t
|
||||
@@ -7,13 +7,13 @@
|
||||
#include <iostream> // Para basic_ostream, operator<<, endl, cout
|
||||
#include <stdexcept> // Para runtime_error
|
||||
|
||||
#include "asset.h" // Para AssetType, Asset
|
||||
#include "core/resources/asset.hpp" // Para AssetType, Asset
|
||||
#include "external/jail_audio.h" // Para JA_DeleteMusic, JA_DeleteSound, JA_Loa...
|
||||
#include "options.h" // Para Options, OptionsGame, options
|
||||
#include "room.h" // Para RoomData, loadRoomFile, loadRoomTileFile
|
||||
#include "screen.h" // Para Screen
|
||||
#include "text.h" // Para Text, loadTextFile
|
||||
#include "utils.h" // Para getFileName, printWithDots, PaletteColor
|
||||
#include "game/gameplay/options.hpp" // Para Options, OptionsGame, options
|
||||
#include "game/gameplay/room.hpp" // Para RoomData, loadRoomFile, loadRoomTileFile
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/text.hpp" // Para Text, loadTextFile
|
||||
#include "utils/utils.hpp" // Para getFileName, printWithDots, PaletteColor
|
||||
struct JA_Music_t; // lines 17-17
|
||||
struct JA_Sound_t; // lines 18-18
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "room.h" // Para room_t
|
||||
#include "sprite/surface_animated_sprite.h" // Para AnimationsFileBuffer
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TextFile
|
||||
#include "game/gameplay/room.hpp" // Para room_t
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para AnimationsFileBuffer
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TextFile
|
||||
struct JA_Music_t; // lines 11-11
|
||||
struct JA_Sound_t; // lines 12-12
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "debug.h"
|
||||
#include "core/system/debug.hpp"
|
||||
|
||||
#include <algorithm> // Para max
|
||||
#include <memory> // Para __shared_ptr_access, shared_ptr
|
||||
|
||||
#include "resource.h" // Para Resource
|
||||
#include "text.h" // Para Text
|
||||
#include "utils.h" // Para Color
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "utils/utils.hpp" // Para Color
|
||||
|
||||
// [SINGLETON]
|
||||
Debug* Debug::debug_ = nullptr;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "director.h"
|
||||
#include "core/system/director.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <errno.h> // Para errno, EEXIST, EACCES, ENAMETOO...
|
||||
@@ -11,24 +11,24 @@
|
||||
#include <memory> // Para make_unique, unique_ptr
|
||||
#include <string> // Para operator+, allocator, char_traits
|
||||
|
||||
#include "asset.h" // Para Asset, AssetType
|
||||
#include "cheevos.h" // Para Cheevos
|
||||
#include "debug.h" // Para Debug
|
||||
#include "defines.h" // Para WINDOW_CAPTION
|
||||
#include "core/resources/asset.hpp" // Para Asset, AssetType
|
||||
#include "game/gameplay/cheevos.hpp" // Para Cheevos
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "utils/defines.hpp" // Para WINDOW_CAPTION
|
||||
#include "external/jail_audio.h" // Para JA_SetMusicVolume, JA_SetSoundV...
|
||||
#include "input.h" // Para Input, InputAction
|
||||
#include "options.h" // Para Options, options, OptionsVideo
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sections/credits.h" // Para Credits
|
||||
#include "sections/ending.h" // Para Ending
|
||||
#include "sections/ending2.h" // Para Ending2
|
||||
#include "sections/game.h" // Para Game, GameMode
|
||||
#include "sections/game_over.h" // Para GameOver
|
||||
#include "sections/loading_screen.h" // Para LoadingScreen
|
||||
#include "sections/logo.h" // Para Logo
|
||||
#include "sections/title.h" // Para Title
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "core/input/input.hpp" // Para Input, InputAction
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsVideo
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "game/scenes/credits.hpp" // Para Credits
|
||||
#include "game/scenes/ending.hpp" // Para Ending
|
||||
#include "game/scenes/ending2.hpp" // Para Ending2
|
||||
#include "game/scenes/game.hpp" // Para Game, GameMode
|
||||
#include "game/scenes/game_over.hpp" // Para GameOver
|
||||
#include "game/scenes/loading_screen.hpp" // Para LoadingScreen
|
||||
#include "game/scenes/logo.hpp" // Para Logo
|
||||
#include "game/scenes/title.hpp" // Para Title
|
||||
#include "game/ui/notifier.hpp" // Para Notifier
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <pwd.h>
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "enemy.h"
|
||||
#include "game/entities/enemy.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <stdlib.h> // Para rand
|
||||
|
||||
#include "resource.h" // Para Resource
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "utils.h" // Para stringToColor
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "utils/utils.hpp" // Para stringToColor
|
||||
|
||||
// Constructor
|
||||
Enemy::Enemy(const EnemyData& enemy)
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "item.h"
|
||||
#include "game/entities/item.hpp"
|
||||
|
||||
#include "resource.h" // Para Resource
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
|
||||
// Constructor
|
||||
Item::Item(ItemData item)
|
||||
@@ -1,17 +1,17 @@
|
||||
// IWYU pragma: no_include <bits/std_abs.h>
|
||||
#include "player.h"
|
||||
#include "game/entities/player.hpp"
|
||||
|
||||
#include <algorithm> // Para max, min
|
||||
#include <cmath> // Para ceil, abs
|
||||
|
||||
#include "debug.h" // Para Debug
|
||||
#include "defines.h" // Para RoomBorder::BOTTOM, RoomBorder::LEFT, RoomBorder::RIGHT
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "utils/defines.hpp" // Para RoomBorder::BOTTOM, RoomBorder::LEFT, RoomBorder::RIGHT
|
||||
#include "external/jail_audio.h" // Para JA_PlaySound
|
||||
#include "input.h" // Para Input, InputAction
|
||||
#include "options.h" // Para Cheat, Options, options
|
||||
#include "resource.h" // Para Resource
|
||||
#include "room.h" // Para Room, TileType
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "core/input/input.hpp" // Para Input, InputAction
|
||||
#include "game/gameplay/options.hpp" // Para Cheat, Options, options
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/gameplay/room.hpp" // Para Room, TileType
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
|
||||
// Constructor
|
||||
Player::Player(const PlayerData& player)
|
||||
@@ -6,10 +6,10 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "defines.h" // Para BORDER_TOP, BLOCK
|
||||
#include "room.h"
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "utils.h" // Para Color
|
||||
#include "utils/defines.hpp" // Para BORDER_TOP, BLOCK
|
||||
#include "game/gameplay/room.hpp"
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "utils/utils.hpp" // Para Color
|
||||
struct JA_Sound_t; // lines 13-13
|
||||
|
||||
enum class PlayerState {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "cheevos.h"
|
||||
#include "game/gameplay/cheevos.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <stddef.h> // Para NULL
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <fstream> // Para basic_ostream, operator<<, basic_ofstream
|
||||
#include <iostream> // Para cout, cerr
|
||||
|
||||
#include "options.h" // Para Options, options
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "game/gameplay/options.hpp" // Para Options, options
|
||||
#include "game/ui/notifier.hpp" // Para Notifier
|
||||
|
||||
// [SINGLETON]
|
||||
Cheevos* Cheevos::cheevos_ = nullptr;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "item_tracker.h"
|
||||
#include "game/gameplay/item_tracker.hpp"
|
||||
|
||||
// [SINGLETON]
|
||||
ItemTracker* ItemTracker::item_tracker_ = nullptr;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "options.h"
|
||||
#include "game/gameplay/options.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <algorithm>
|
||||
#include <string> // Para string, basic_string
|
||||
|
||||
#include "screen.h" // Para ScreenFilter
|
||||
#include "utils.h" // Para Color, Palette
|
||||
#include "core/rendering/screen.hpp" // Para ScreenFilter
|
||||
#include "utils/utils.hpp" // Para Color, Palette
|
||||
|
||||
// Secciones del programa
|
||||
enum class Section {
|
||||
@@ -1,21 +1,21 @@
|
||||
#include "room.h"
|
||||
#include "game/gameplay/room.hpp"
|
||||
|
||||
#include <exception> // Para exception
|
||||
#include <fstream> // Para basic_ostream, operator<<, basic_istream
|
||||
#include <iostream> // Para cout, cerr
|
||||
#include <sstream> // Para basic_stringstream
|
||||
|
||||
#include "debug.h" // Para Debug
|
||||
#include "defines.h" // Para BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "utils/defines.hpp" // Para BLOCK, PLAY_AREA_HEIGHT, PLAY_AREA_WIDTH
|
||||
#include "external/jail_audio.h" // Para JA_PlaySound
|
||||
#include "item_tracker.h" // Para ItemTracker
|
||||
#include "options.h" // Para Options, OptionsStats, options
|
||||
#include "resource.h" // Para Resource
|
||||
#include "scoreboard.h" // Para ScoreboardData
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "utils.h" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
|
||||
#include "game/gameplay/options.hpp" // Para Options, OptionsStats, options
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
|
||||
// Carga las variables y texturas desde un fichero de mapa de tiles
|
||||
std::vector<int> loadRoomTileFile(const std::string& file_path, bool verbose) {
|
||||
@@ -6,9 +6,9 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "enemy.h" // Para EnemyData
|
||||
#include "item.h" // Para ItemData
|
||||
#include "utils.h" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
#include "game/entities/enemy.hpp" // Para EnemyData
|
||||
#include "game/entities/item.hpp" // Para ItemData
|
||||
#include "utils/utils.hpp" // Para LineHorizontal, LineDiagonal, LineVertical
|
||||
class SSprite; // lines 12-12
|
||||
class Surface; // lines 13-13
|
||||
struct ScoreboardData; // lines 15-15
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "room_tracker.h"
|
||||
#include "game/gameplay/room_tracker.hpp"
|
||||
|
||||
// Comprueba si la habitación ya ha sido visitada
|
||||
bool RoomTracker::hasBeenVisited(const std::string &name)
|
||||
@@ -1,15 +1,15 @@
|
||||
#include "scoreboard.h"
|
||||
#include "game/gameplay/scoreboard.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include "defines.h" // Para BLOCK
|
||||
#include "options.h" // Para Options, options, Cheat, OptionsGame
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text
|
||||
#include "utils.h" // Para stringToColor
|
||||
#include "utils/defines.hpp" // Para BLOCK
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, Cheat, OptionsGame
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "utils/utils.hpp" // Para stringToColor
|
||||
|
||||
// Constructor
|
||||
Scoreboard::Scoreboard(std::shared_ptr<ScoreboardData> data)
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stats.h"
|
||||
#include "game/gameplay/stats.hpp"
|
||||
#include <fstream> // Para basic_ostream, basic_ifstream, basic_istream
|
||||
#include <sstream> // Para basic_stringstream
|
||||
#include "options.h" // Para Options, OptionsStats, options
|
||||
#include "game/gameplay/options.hpp" // Para Options, OptionsStats, options
|
||||
|
||||
// Constructor
|
||||
Stats::Stats(const std::string &file, const std::string &buffer)
|
||||
@@ -1,19 +1,19 @@
|
||||
#include "credits.h"
|
||||
#include "game/scenes/credits.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para min
|
||||
|
||||
#include "defines.h" // Para GAME_SPEED, PLAY_AREA_CENTER_X, PLAY_...
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils.h" // Para PaletteColor
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED, PLAY_AREA_CENTER_X, PLAY_...
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
// Constructor
|
||||
Credits::Credits()
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "ending.h"
|
||||
#include "game/scenes/ending.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para min
|
||||
|
||||
#include "defines.h" // Para GAME_SPEED
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "external/jail_audio.h" // Para JA_SetVolume, JA_PlayMusic, JA_StopMusic
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, options, OptionsGame, SectionS...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_STROKE
|
||||
#include "utils.h" // Para PaletteColor
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, SectionS...
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_STROKE
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
// Constructor
|
||||
Ending::Ending()
|
||||
@@ -1,21 +1,21 @@
|
||||
#include "ending2.h"
|
||||
#include "game/scenes/ending2.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para max, replace
|
||||
|
||||
#include "defines.h" // Para GAMECANVAS_CENTER_X, GAMECANVAS_CENTER_Y
|
||||
#include "utils/defines.hpp" // Para GAMECANVAS_CENTER_X, GAMECANVAS_CENTER_Y
|
||||
#include "external/jail_audio.h" // Para JA_SetVolume, JA_PlayMusic, JA_StopMusic
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "sprite/surface_moving_sprite.h" // Para SMovingSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text
|
||||
#include "utils.h" // Para PaletteColor, stringToColor
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, Sectio...
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/surface_moving_sprite.hpp" // Para SMovingSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
|
||||
// Constructor
|
||||
Ending2::Ending2()
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "defines.h" // Para GAMECANVAS_WIDTH, GAMECANVAS_FIRST_QUAR...
|
||||
#include "utils/defines.hpp" // Para GAMECANVAS_WIDTH, GAMECANVAS_FIRST_QUAR...
|
||||
class SAnimatedSprite; // lines 9-9
|
||||
class SMovingSprite; // lines 10-10
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
#include "game.h"
|
||||
#include "game/scenes/game.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "asset.h" // Para Asset
|
||||
#include "cheevos.h" // Para Cheevos
|
||||
#include "debug.h" // Para Debug
|
||||
#include "defines.h" // Para BLOCK, PLAY_AREA_HEIGHT, RoomBorder::BOTTOM
|
||||
#include "core/resources/asset.hpp" // Para Asset
|
||||
#include "game/gameplay/cheevos.hpp" // Para Cheevos
|
||||
#include "core/system/debug.hpp" // Para Debug
|
||||
#include "utils/defines.hpp" // Para BLOCK, PLAY_AREA_HEIGHT, RoomBorder::BOTTOM
|
||||
#include "external/jail_audio.h" // Para JA_PauseMusic, JA_GetMusicState, JA_P...
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "item_tracker.h" // Para ItemTracker
|
||||
#include "options.h" // Para Options, options, Cheat, SectionState
|
||||
#include "resource.h" // Para ResourceRoom, Resource
|
||||
#include "room.h" // Para Room, RoomData
|
||||
#include "room_tracker.h" // Para RoomTracker
|
||||
#include "scoreboard.h" // Para ScoreboardData, Scoreboard
|
||||
#include "screen.h" // Para Screen
|
||||
#include "stats.h" // Para Stats
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "ui/notifier.h" // Para Notifier, NotificationText, CHEEVO_NO...
|
||||
#include "utils.h" // Para PaletteColor, stringToColor
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "core/input/input.hpp" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT
|
||||
#include "game/gameplay/item_tracker.hpp" // Para ItemTracker
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, Cheat, SectionState
|
||||
#include "core/resources/resource.hpp" // Para ResourceRoom, Resource
|
||||
#include "game/gameplay/room.hpp" // Para Room, RoomData
|
||||
#include "game/gameplay/room_tracker.hpp" // Para RoomTracker
|
||||
#include "game/gameplay/scoreboard.hpp" // Para ScoreboardData, Scoreboard
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "game/gameplay/stats.hpp" // Para Stats
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "game/ui/notifier.hpp" // Para Notifier, NotificationText, CHEEVO_NO...
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
|
||||
// Constructor
|
||||
Game::Game(GameMode mode)
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "player.h" // Para PlayerSpawn
|
||||
#include "game/entities/player.hpp" // Para PlayerSpawn
|
||||
class Room; // lines 12-12
|
||||
class RoomTracker; // lines 13-13
|
||||
class Scoreboard; // lines 14-14
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "game_over.h"
|
||||
#include "game/scenes/game_over.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para min, max
|
||||
#include <string> // Para basic_string, operator+, to_string
|
||||
|
||||
#include "defines.h" // Para GAMECANVAS_CENTER_X, GAME_SPEED
|
||||
#include "utils/defines.hpp" // Para GAMECANVAS_CENTER_X, GAME_SPEED
|
||||
#include "external/jail_audio.h" // Para JA_PlayMusic
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, options, OptionsStats, Secti...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_animated_sprite.h" // Para SAnimatedSprite
|
||||
#include "text.h" // Para TEXT_CENTER, TEXT_COLOR, Text
|
||||
#include "utils.h" // Para PaletteColor, stringToColor
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsStats, Secti...
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_animated_sprite.hpp" // Para SAnimatedSprite
|
||||
#include "core/rendering/text.hpp" // Para TEXT_CENTER, TEXT_COLOR, Text
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
|
||||
// Constructor
|
||||
GameOver::GameOver()
|
||||
@@ -1,18 +1,18 @@
|
||||
#include "loading_screen.h"
|
||||
#include "game/scenes/loading_screen.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <stdlib.h> // Para rand
|
||||
|
||||
#include "defines.h" // Para GAME_SPEED
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "external/jail_audio.h" // Para JA_PlayMusic, JA_SetVolume, JA_StopMusic
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, options, SectionState, Options...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "utils.h" // Para stringToColor, PaletteColor
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, SectionState, Options...
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "utils/utils.hpp" // Para stringToColor, PaletteColor
|
||||
|
||||
// Constructor
|
||||
LoadingScreen::LoadingScreen()
|
||||
@@ -1,16 +1,16 @@
|
||||
#include "logo.h"
|
||||
#include "game/scenes/logo.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include "defines.h" // Para GAME_SPEED
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "options.h" // Para Options, SectionState, options, Section
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "utils.h" // Para PaletteColor
|
||||
#include "utils/defines.hpp" // Para GAME_SPEED
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "game/gameplay/options.hpp" // Para Options, SectionState, options, Section
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
// Constructor
|
||||
Logo::Logo()
|
||||
@@ -1,21 +1,21 @@
|
||||
#include "title.h"
|
||||
#include "game/scenes/title.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm> // Para clamp
|
||||
|
||||
#include "cheevos.h" // Para Cheevos, Achievement
|
||||
#include "defines.h" // Para PLAY_AREA_CENTER_X, GAMECANVAS_WIDTH
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT, REP...
|
||||
#include "options.h" // Para Options, options, SectionState, Section
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils.h" // Para stringToColor, PaletteColor, playMusic
|
||||
#include "game/gameplay/cheevos.hpp" // Para Cheevos, Achievement
|
||||
#include "utils/defines.hpp" // Para PLAY_AREA_CENTER_X, GAMECANVAS_WIDTH
|
||||
#include "utils/global_events.hpp" // Para check
|
||||
#include "core/input/global_inputs.hpp" // Para check
|
||||
#include "core/input/input.hpp" // Para Input, InputAction, INPUT_DO_NOT_ALLOW_REPEAT, REP...
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, SectionState, Section
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils/utils.hpp" // Para stringToColor, PaletteColor, playMusic
|
||||
|
||||
// Constructor
|
||||
Title::Title()
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "ui/notifier.h"
|
||||
#include "game/ui/notifier.hpp"
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "external/jail_audio.h" // Para JA_PlaySound
|
||||
#include "options.h" // Para Options, options, NotificationPosition
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "sprite/surface_sprite.h" // Para SSprite
|
||||
#include "surface.h" // Para Surface
|
||||
#include "text.h" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils.h" // Para PaletteColor
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, NotificationPosition
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
#include "core/rendering/screen.hpp" // Para Screen
|
||||
#include "core/rendering/surface_sprite.hpp" // Para SSprite
|
||||
#include "core/rendering/surface.hpp" // Para Surface
|
||||
#include "core/rendering/text.hpp" // Para Text, TEXT_CENTER, TEXT_COLOR
|
||||
#include "utils/utils.hpp" // Para PaletteColor
|
||||
|
||||
// [SINGLETON]
|
||||
Notifier* Notifier::notifier_ = nullptr;
|
||||
@@ -6,7 +6,7 @@ Empezado en Castalla el 01/07/2022.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "director.h"
|
||||
#include "core/system/director.hpp"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "utils.h"
|
||||
#include "utils/utils.hpp"
|
||||
|
||||
// Textos
|
||||
constexpr const char* WINDOW_CAPTION = "JailDoctor's Dilemma";
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global_events.h"
|
||||
#include "options.h" // Para Options, options, OptionsGame, OptionsAudio
|
||||
#include "mouse.h"
|
||||
#include "utils/global_events.hpp"
|
||||
#include "game/gameplay/options.hpp" // Para Options, options, OptionsGame, OptionsAudio
|
||||
#include "core/input/mouse.hpp"
|
||||
|
||||
namespace globalEvents
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "utils.h"
|
||||
#include "utils/utils.hpp"
|
||||
|
||||
#include <stdlib.h> // Para abs
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <utility> // Para pair
|
||||
|
||||
#include "external/jail_audio.h" // Para JA_GetMusicState, JA_Music_state, JA_PlayMusic
|
||||
#include "resource.h" // Para Resource
|
||||
#include "core/resources/resource.hpp" // Para Resource
|
||||
|
||||
// Calcula el cuadrado de la distancia entre dos puntos
|
||||
double distanceSquared(int x1, int y1, int x2, int y2) {
|
||||
Reference in New Issue
Block a user