Precàrrega de tots els recursos al inici del joc

8.000.000 de cherrypickings que he anat fent pel codi
This commit is contained in:
2024-10-20 11:06:10 +02:00
parent f23dcae5b6
commit a4b4e188cd
32 changed files with 532 additions and 364 deletions

View File

@@ -1,16 +1,16 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for unique_ptr, shared_ptr
#include <vector> // for vector
#include <SDL2/SDL_rect.h> // for SDL_Point, SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Texture, SDL_Renderer
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for unique_ptr, shared_ptr
#include <vector> // for vector
class Fade;
class Sprite;
class Text;
class Texture;
class Tiledbg;
struct JA_Music_t; // lines 14-14
class TiledBG;
struct JA_Music_t; // lines 14-14
/*
Esta clase gestiona un estado del programa. Se encarga de poner en pantalla
@@ -33,7 +33,7 @@ private:
std::vector<std::shared_ptr<Texture>> item_textures_; // Vector con las texturas de los items
std::vector<std::unique_ptr<Sprite>> sprites_; // Vector con los sprites de los items
std::unique_ptr<Text> text_; // Objeto para escribir texto
std::unique_ptr<Tiledbg> tiled_bg_; // Objeto para dibujar el mosaico animado de fondo
std::unique_ptr<TiledBG> tiled_bg_; // Objeto para dibujar el mosaico animado de fondo
std::unique_ptr<Fade> fade_; // Objeto para renderizar fades
SDL_Renderer *renderer_; // El renderizador de la ventana