Desaparición de la carpeta media
This commit is contained in:
1 parent
75c6acdd53
commit
8c87534848
32 files changed
+37
-47
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
tileset_img=tiles_surface.png
|
tileset_img=surface.png
|
||||||
bg_img=bg_surface.png
|
|
||||||
|
|
||||||
room_up=0
|
room_up=0
|
||||||
room_down=0
|
room_down=0
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
tileset_img=tiles_surface.png
|
tileset_img=surface.png
|
||||||
bg_img=bg_surface.png
|
|
||||||
|
|
||||||
room_up=0
|
room_up=0
|
||||||
room_down=03.map
|
room_down=03.map
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
tileset_img=tiles_surface.png
|
tileset_img=surface.png
|
||||||
bg_img=bg_surface.png
|
|
||||||
|
|
||||||
room_up=02.map
|
room_up=02.map
|
||||||
room_down=0
|
room_down=0
|
||||||
|
|||||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<tileset version="1.9" tiledversion="1.9.1" name="surface" tilewidth="8" tileheight="8" tilecount="1024" columns="32">
|
||||||
<image source="../../../volcano_2022/media/gfx/tiles_surface.png" width="256" height="256"/>
|
<image source="./surface.png" width="256" height="256"/>
|
||||||
</tileset>
|
</tileset>
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
+8
-9
@@ -15,10 +15,8 @@ Map::Map(std::string file, SDL_Renderer *renderer, Asset *asset)
|
|||||||
|
|
||||||
// Crea los objetos
|
// Crea los objetos
|
||||||
texture_tile = new LTexture();
|
texture_tile = new LTexture();
|
||||||
texture_bg = new LTexture();
|
|
||||||
load(file);
|
load(file);
|
||||||
loadTextureFromFile(texture_tile, asset->get(tileset_img), renderer);
|
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
|
// 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);
|
map_texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
|
||||||
@@ -36,9 +34,6 @@ Map::~Map()
|
|||||||
texture_tile->unload();
|
texture_tile->unload();
|
||||||
delete texture_tile;
|
delete texture_tile;
|
||||||
|
|
||||||
texture_bg->unload();
|
|
||||||
delete texture_bg;
|
|
||||||
|
|
||||||
SDL_DestroyTexture(map_texture);
|
SDL_DestroyTexture(map_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,12 +175,16 @@ void Map::fillMapTexture()
|
|||||||
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
|
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
// Dibuja la textura de fondo
|
// Dibuja el degradado de fondo
|
||||||
SDL_Rect clip = {0, 0, 320, 208};
|
for (int i = 0; i < 208; i++)
|
||||||
texture_bg->render(renderer, 0, 0, &clip);
|
{
|
||||||
|
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
|
// 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 y = 0; y < map_height; y++)
|
||||||
for (int x = 0; x < map_width; x++)
|
for (int x = 0; x < map_width; x++)
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ private:
|
|||||||
std::string bg_img; // Imagen con los graficos para la habitación
|
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
|
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_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
|
SDL_Texture *map_texture; // Textura para dibujar el mapa de la habitación
|
||||||
|
|
||||||
int tile_size; // Ancho del tile en pixels
|
int tile_size; // Ancho del tile en pixels
|
||||||
|
|||||||
+24
-29
@@ -137,45 +137,40 @@ bool Prog::initSDL()
|
|||||||
// Crea el indice de ficheros de recursos
|
// Crea el indice de ficheros de recursos
|
||||||
bool Prog::setFileList()
|
bool Prog::setFileList()
|
||||||
{
|
{
|
||||||
// Ficheros binarios
|
// Ficheros del mapa
|
||||||
asset->add("/data/map/01.map", data);
|
asset->add("/data/map/01.map", data);
|
||||||
asset->add("/data/map/01.tmx", data);
|
asset->add("/data/map/01.tmx", data);
|
||||||
asset->add("/data/map/02.map", data);
|
asset->add("/data/map/02.map", data);
|
||||||
asset->add("/data/map/02.tmx", data);
|
asset->add("/data/map/02.tmx", data);
|
||||||
asset->add("/data/map/03.map", data);
|
asset->add("/data/map/03.map", data);
|
||||||
asset->add("/data/map/03.tmx", 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/config.bin", data, false);
|
||||||
asset->add("/data/gamecontrollerdb.txt", data);
|
asset->add("/data/input/gamecontrollerdb.txt", data);
|
||||||
asset->add("/data/animations/player.ani", data);
|
|
||||||
|
// Ficheros del jugador
|
||||||
|
asset->add("/data/player/player.png", bitmap);
|
||||||
|
asset->add("/data/player/player.ani", data);
|
||||||
|
|
||||||
// Texturas
|
// Ficheros de sonido
|
||||||
asset->add("/media/gfx/actors.png", bitmap);
|
asset->add("/data/sound/sound_player_coin.wav", sound);
|
||||||
asset->add("/media/gfx/bg_surface.png", bitmap);
|
asset->add("/data/sound/sound_player_death.wav", sound);
|
||||||
asset->add("/media/gfx/filter.png", bitmap);
|
asset->add("/data/sound/sound_drop_enemy.wav", sound);
|
||||||
asset->add("/media/gfx/hud.png", bitmap);
|
asset->add("/data/sound/sound_drop_splat.wav", sound);
|
||||||
asset->add("/media/gfx/menu_animation.png", bitmap);
|
asset->add("/data/sound/sound_player_jump.wav", sound);
|
||||||
asset->add("/media/gfx/menu.png", bitmap);
|
asset->add("/data/sound/sound_menu_logo.wav", sound);
|
||||||
asset->add("/media/gfx/player.png", bitmap);
|
asset->add("/data/sound/sound_menu_start.wav", sound);
|
||||||
asset->add("/media/gfx/tiles_surface.png", bitmap);
|
|
||||||
asset->add("/media/gfx/tiles_volcano.png", bitmap);
|
|
||||||
|
|
||||||
// Sonidos
|
// Ficheros con musica
|
||||||
asset->add("/media/sound/sound_player_coin.wav", sound);
|
asset->add("/data/music/music_menu.ogg", music);
|
||||||
asset->add("/media/sound/sound_player_death.wav", sound);
|
asset->add("/data/music/music_surface.ogg", music);
|
||||||
asset->add("/media/sound/sound_drop_enemy.wav", sound);
|
asset->add("/data/music/music_volcano.ogg", music);
|
||||||
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);
|
|
||||||
|
|
||||||
// Musicas
|
// Ficheros de fuentes de texto
|
||||||
asset->add("/media/music/music_menu.ogg", music);
|
asset->add("/data/font/debug.png", font);
|
||||||
asset->add("/media/music/music_surface.ogg", music);
|
asset->add("/data/font/debug.txt", font);
|
||||||
asset->add("/media/music/music_volcano.ogg", music);
|
|
||||||
|
|
||||||
// Texto
|
|
||||||
asset->add("/media/font/debug.png", font);
|
|
||||||
asset->add("/media/font/debug.txt", font);
|
|
||||||
|
|
||||||
return asset->check();
|
return asset->check();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user