#pragma once #include "animatedsprite.h" #include "jail_audio.h" #include "utils.h" #ifndef MAP_H #define MAP_H // The player class Map { public: // Constructor Map(SDL_Renderer *renderer, LTexture *texture1, LTexture *texture2, LTexture *texture3, std::string file); // Destructor ~Map(); // Inicializa todas las variables void init(SDL_Renderer *renderer, LTexture *texture1, LTexture *texture2, LTexture *texture3, std::string file); // Carga el mapa a partir de un fichero void loadFromFile(std::string file); // Resetea ciertas variables void reset(); // Actualiza todas las variables void update(); // Dibuja el objeto void render(); private: AnimatedSprite *sprite_tile; // Sprite de los tiles del mapa AnimatedSprite *sprite_actor; // Sprite de los actores Sprite *background; // Fondo de la pantalla SDL_Rect src_rect; // Ni puta idea SDL_Rect dst_rect; // Ni puta idea Uint8 *tile; // Vector con los tiles Uint8 *actor; // Vector con los acores Uint8 w; // Anchura en habitaciones del mapa Uint8 h; // Altura en habitaciones del mapa Uint8 room; // Habitación actual del mapa std::string mapfile; // Ruta con el fichero del mapa }; #endif