Intro: les targetes ja no tenen res siniestro per darrere
This commit is contained in:
@@ -354,22 +354,22 @@ void Intro::initSprites()
|
||||
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 0, 0, 0, 0);
|
||||
SDL_RenderClear(Screen::get()->getRenderer());
|
||||
|
||||
// Pone color en el marco y el fondo de la textura
|
||||
// Pone color en el marco de la textura
|
||||
auto color = param.intro.card_color;
|
||||
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), color.r, color.g, color.b, color.a);
|
||||
SDL_FRect rect1 = {1, 0, SHADOW_SPRITE_WIDTH - 2, SHADOW_SPRITE_HEIGHT};
|
||||
SDL_FRect rect2 = {0, 1, SHADOW_SPRITE_WIDTH, SHADOW_SPRITE_HEIGHT - 2};
|
||||
SDL_RenderFillRect(Screen::get()->getRenderer(), &rect1);
|
||||
SDL_RenderFillRect(Screen::get()->getRenderer(), &rect2);
|
||||
SDL_RenderRect(Screen::get()->getRenderer(), &rect1);
|
||||
SDL_RenderRect(Screen::get()->getRenderer(), &rect2);
|
||||
|
||||
// Copia la textura con el dibujo sobre la textura de color aplicando blend modes
|
||||
SDL_FRect rect = {BORDER / 2, BORDER / 2, SPRITE_WIDTH, SPRITE_HEIGHT};
|
||||
auto inner_texture = Resource::get()->getTexture(TEXTURE_LIST.at(i))->getSDLTexture();
|
||||
SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_BLEND);
|
||||
SDL_SetTextureAlphaMod(inner_texture, 64);
|
||||
SDL_RenderTexture(Screen::get()->getRenderer(), inner_texture, nullptr, &rect);
|
||||
SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_NONE);
|
||||
SDL_SetTextureAlphaMod(inner_texture, 255);
|
||||
// SDL_FRect rect = {BORDER / 2, BORDER / 2, SPRITE_WIDTH, SPRITE_HEIGHT};
|
||||
// auto inner_texture = Resource::get()->getTexture(TEXTURE_LIST.at(i))->getSDLTexture();
|
||||
// SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_BLEND);
|
||||
// SDL_SetTextureAlphaMod(inner_texture, 64);
|
||||
// SDL_RenderTexture(Screen::get()->getRenderer(), inner_texture, nullptr, &rect);
|
||||
// SDL_SetTextureBlendMode(inner_texture, SDL_BLENDMODE_NONE);
|
||||
// SDL_SetTextureAlphaMod(inner_texture, 255);
|
||||
|
||||
// Deja el renderizador como estaba y añade la textura a la lista
|
||||
SDL_SetRenderTarget(Screen::get()->getRenderer(), temp);
|
||||
|
||||
Reference in New Issue
Block a user