Merdetes en la faena, básicament arreglar uns quants iniciadors de variables en les clases

This commit is contained in:
2024-10-23 14:00:19 +02:00
parent 528533fd9b
commit 95478134dd
15 changed files with 79 additions and 134 deletions

View File

@@ -11,15 +11,14 @@
// Constructor
TiledBG::TiledBG(SDL_Rect pos, TiledBGMode mode)
: renderer_(Screen::get()->getRenderer()),
// Crea la textura para el mosaico de fondo
canvas_(SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, pos_.w * 2, pos_.h * 2)),
pos_(pos),
// Coloca la ventana que recorre el mosaico de fondo de manera que coincida
// con el mosaico que hay pintado en el titulo al iniciar
window_({128, 96, pos_.w, pos_.h}),
pos_(pos),
counter_(0),
mode_(mode == TiledBGMode::RANDOM ? static_cast<TiledBGMode>(rand() % 2) : mode)
{
// Crea la textura para el mosaico de fondo
canvas_ = SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, pos_.w * 2, pos_.h * 2);
// Rellena la textura con el contenido
fillTexture();