Implementadas las animaciones en el jugador
This commit is contained in:
@@ -184,9 +184,11 @@ void Map::fillMapTexture()
|
||||
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
SDL_Rect clip = {0, 0, 320, 240};
|
||||
// Dibuja la textura de fondo
|
||||
SDL_Rect clip = {0, 0, 320, 240-32};
|
||||
texture_bg->render(renderer, 0, 0, &clip);
|
||||
|
||||
// Dibuja el mapeado de tiles
|
||||
const int tile_size = 16;
|
||||
const int tileset_width_in_tiles = 16;
|
||||
const int map_width_in_tiles = 20;
|
||||
@@ -208,8 +210,6 @@ void Map::fillMapTexture()
|
||||
// Dibuja el mapa en pantalla
|
||||
void Map::render()
|
||||
{
|
||||
// Dibuja el fondo
|
||||
|
||||
// Dibuja la textura con el mapa en pantalla
|
||||
SDL_Rect rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT};
|
||||
SDL_RenderCopy(renderer, map_texture, &rect, NULL);
|
||||
|
||||
Reference in New Issue
Block a user