Passant std::cout a SDL_Log

This commit is contained in:
2025-03-27 19:57:30 +01:00
parent c6288918b2
commit 8afca398e9
27 changed files with 588 additions and 764 deletions

View File

@@ -1,21 +1,25 @@
#include "screen.h"
#include <SDL3/SDL.h> // Para SDL_PixelFormat
#include <SDL3/SDL_pixels.h> // Para SDL_PixelFormat
#include <SDL3/SDL_timer.h> // Para SDL_GetTicks
#include <SDL3/SDL_init.h> // Para SDL_Init, SDL_INIT_VIDEO
#include <algorithm> // Para max, min
#include <fstream> // Para basic_ifstream, ifstream
#include <iterator> // Para istreambuf_iterator, operator==
#include <memory> // Para __shared_ptr_access, shared_ptr
#include <string> // Para string, operator+, to_string
#include "asset.h" // Para Asset
#include "jail_shader.h" // Para init, render
#include "mouse.h" // Para updateCursorVisibility
#include "notifier.h" // Para Notifier
#include "on_screen_help.h" // Para OnScreenHelp
#include "options.h" // Para Options, VideoOptions, options, WindowO...
#include "resource.h" // Para Resource
#include "text.h" // Para Text
#include <SDL3/SDL_blendmode.h> // Para SDL_BLENDMODE_BLEND
#include <SDL3/SDL_error.h> // Para SDL_GetError
#include <SDL3/SDL_hints.h> // Para SDL_SetHint, SDL_HINT_RENDER_DRIVER
#include <SDL3/SDL_init.h> // Para SDL_Init, SDL_INIT_VIDEO
#include <SDL3/SDL_log.h> // Para SDL_LogCategory, SDL_LogError, SDL_L...
#include <SDL3/SDL_pixels.h> // Para SDL_PixelFormat
#include <SDL3/SDL_surface.h> // Para SDL_ScaleMode
#include <SDL3/SDL_timer.h> // Para SDL_GetTicks
#include <algorithm> // Para min, max
#include <fstream> // Para basic_ifstream, ifstream
#include <iterator> // Para istreambuf_iterator, operator==
#include <memory> // Para __shared_ptr_access, shared_ptr
#include <string> // Para allocator, char_traits, operator+
#include "asset.h" // Para Asset
#include "jail_shader.h" // Para init, render
#include "mouse.h" // Para updateCursorVisibility
#include "notifier.h" // Para Notifier
#include "on_screen_help.h" // Para OnScreenHelp
#include "options.h" // Para Options, options, WindowOptions, Vid...
#include "resource.h" // Para Resource
#include "text.h" // Para Text
// [SINGLETON]
Screen *Screen::screen_ = nullptr;
@@ -220,10 +224,10 @@ void Screen::renderInfo()
// FPS
const std::string FPS_TEXT = std::to_string(fps_.lastValue) + " FPS";
text->writeColored(param.game.width - text->lenght(FPS_TEXT), 0, FPS_TEXT, orange_soft_color);
text->writeColored(param.game.width - text->lenght(FPS_TEXT), 0, FPS_TEXT, ORANGE_SOFT_COLOR);
// Resolution
text->writeColored(0, 0, options.video.info, orange_soft_color);
text->writeColored(0, 0, options.video.info, ORANGE_SOFT_COLOR);
}
}