Cambiando printf a std::cout

This commit is contained in:
2022-10-30 22:23:24 +01:00
parent 995b3516e6
commit 531ac94bc0
7 changed files with 25 additions and 29 deletions

View File

@@ -1,4 +1,5 @@
#include "credits.h"
#include <iostream>
// Constructor
Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options)
@@ -32,7 +33,7 @@ Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Ass
textTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
if (textTexture == nullptr)
{
printf("Error: textTexture could not be created!\nSDL Error: %s\n", SDL_GetError());
std::cout << "Error: textTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
SDL_SetTextureBlendMode(textTexture, SDL_BLENDMODE_BLEND);
@@ -40,7 +41,7 @@ Credits::Credits(SDL_Renderer *renderer, Screen *screen, Resource *resource, Ass
coverTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
if (coverTexture == nullptr)
{
printf("Error: coverTexture could not be created!\nSDL Error: %s\n", SDL_GetError());
std::cout << "Error: textTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
}
SDL_SetTextureBlendMode(coverTexture, SDL_BLENDMODE_BLEND);
@@ -271,7 +272,7 @@ void Credits::render()
screen->clean();
if (counter < 1150)
{
{
// Dibuja la textura con el texto en pantalla
SDL_RenderCopy(renderer, textTexture, nullptr, nullptr);