Desaparición de la carpeta media

This commit is contained in:
2022-08-20 17:30:11 +02:00
parent 75c6acdd53
commit 8c87534848
32 changed files with 37 additions and 47 deletions

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 689 B

View File

@@ -1,5 +1,4 @@
tileset_img=tiles_surface.png
bg_img=bg_surface.png
tileset_img=surface.png
room_up=0
room_down=0

View File

@@ -1,5 +1,4 @@
tileset_img=tiles_surface.png
bg_img=bg_surface.png
tileset_img=surface.png
room_up=0
room_down=03.map

View File

@@ -1,5 +1,4 @@
tileset_img=tiles_surface.png
bg_img=bg_surface.png
tileset_img=surface.png
room_up=02.map
room_down=0

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.9" tiledversion="1.9.1" name="tiles_surface" tilewidth="8" tileheight="8" tilecount="1024" columns="32">
<image source="../../../volcano_2022/media/gfx/tiles_surface.png" width="256" height="256"/>
<tileset version="1.9" tiledversion="1.9.1" name="surface" tilewidth="8" tileheight="8" tilecount="1024" columns="32">
<image source="./surface.png" width="256" height="256"/>
</tileset>

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 KiB

View File

@@ -15,10 +15,8 @@ Map::Map(std::string file, SDL_Renderer *renderer, Asset *asset)
// Crea los objetos
texture_tile = new LTexture();
texture_bg = new LTexture();
load(file);
loadTextureFromFile(texture_tile, asset->get(tileset_img), renderer);
loadTextureFromFile(texture_bg, asset->get(bg_img), renderer);
// Crea la textura para el mapa de tiles de la habitación
map_texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
@@ -36,9 +34,6 @@ Map::~Map()
texture_tile->unload();
delete texture_tile;
texture_bg->unload();
delete texture_bg;
SDL_DestroyTexture(map_texture);
}
@@ -180,12 +175,16 @@ void Map::fillMapTexture()
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
SDL_RenderClear(renderer);
// Dibuja la textura de fondo
SDL_Rect clip = {0, 0, 320, 208};
texture_bg->render(renderer, 0, 0, &clip);
// Dibuja el degradado de fondo
for (int i = 0; i < 208; i++)
{
SDL_SetRenderDrawColor(renderer, 234, 171, 159, 0xFF);
SDL_SetRenderDrawColor(renderer, 144, 225, 231, 0xFF);
SDL_RenderDrawLine(renderer, 0, i, 320, i);
}
// Dibuja el mapeado de tiles
clip = {0, 0, tile_size, tile_size};
SDL_Rect clip = {0, 0, tile_size, tile_size};
for (int y = 0; y < map_height; y++)
for (int x = 0; x < map_width; x++)

View File

@@ -42,7 +42,6 @@ private:
std::string bg_img; // Imagen con los graficos para la habitación
std::vector<int> tilemap; // Indice de los tiles a dibujar en la habitación
LTexture *texture_tile; // Textura con los graficos de los tiles habitación
LTexture *texture_bg; // Textura con los graficos de fondo de la habitación
SDL_Texture *map_texture; // Textura para dibujar el mapa de la habitación
int tile_size; // Ancho del tile en pixels

View File

@@ -137,45 +137,40 @@ bool Prog::initSDL()
// Crea el indice de ficheros de recursos
bool Prog::setFileList()
{
// Ficheros binarios
// Ficheros del mapa
asset->add("/data/map/01.map", data);
asset->add("/data/map/01.tmx", data);
asset->add("/data/map/02.map", data);
asset->add("/data/map/02.tmx", data);
asset->add("/data/map/03.map", data);
asset->add("/data/map/03.tmx", data);
asset->add("/data/map/surface.png", bitmap);
// Ficheros de configuración
asset->add("/data/config.bin", data, false);
asset->add("/data/gamecontrollerdb.txt", data);
asset->add("/data/animations/player.ani", data);
asset->add("/data/input/gamecontrollerdb.txt", data);
// Ficheros del jugador
asset->add("/data/player/player.png", bitmap);
asset->add("/data/player/player.ani", data);
// Texturas
asset->add("/media/gfx/actors.png", bitmap);
asset->add("/media/gfx/bg_surface.png", bitmap);
asset->add("/media/gfx/filter.png", bitmap);
asset->add("/media/gfx/hud.png", bitmap);
asset->add("/media/gfx/menu_animation.png", bitmap);
asset->add("/media/gfx/menu.png", bitmap);
asset->add("/media/gfx/player.png", bitmap);
asset->add("/media/gfx/tiles_surface.png", bitmap);
asset->add("/media/gfx/tiles_volcano.png", bitmap);
// Ficheros de sonido
asset->add("/data/sound/sound_player_coin.wav", sound);
asset->add("/data/sound/sound_player_death.wav", sound);
asset->add("/data/sound/sound_drop_enemy.wav", sound);
asset->add("/data/sound/sound_drop_splat.wav", sound);
asset->add("/data/sound/sound_player_jump.wav", sound);
asset->add("/data/sound/sound_menu_logo.wav", sound);
asset->add("/data/sound/sound_menu_start.wav", sound);
// Sonidos
asset->add("/media/sound/sound_player_coin.wav", sound);
asset->add("/media/sound/sound_player_death.wav", sound);
asset->add("/media/sound/sound_drop_enemy.wav", sound);
asset->add("/media/sound/sound_drop_splat.wav", sound);
asset->add("/media/sound/sound_player_jump.wav", sound);
asset->add("/media/sound/sound_menu_logo.wav", sound);
asset->add("/media/sound/sound_menu_start.wav", sound);
// Ficheros con musica
asset->add("/data/music/music_menu.ogg", music);
asset->add("/data/music/music_surface.ogg", music);
asset->add("/data/music/music_volcano.ogg", music);
// Musicas
asset->add("/media/music/music_menu.ogg", music);
asset->add("/media/music/music_surface.ogg", music);
asset->add("/media/music/music_volcano.ogg", music);
// Texto
asset->add("/media/font/debug.png", font);
asset->add("/media/font/debug.txt", font);
// Ficheros de fuentes de texto
asset->add("/data/font/debug.png", font);
asset->add("/data/font/debug.txt", font);
return asset->check();
}