unificats els resources en un namespace

This commit is contained in:
2025-11-11 10:04:57 +01:00
parent 1821b84e73
commit 54fc6d2902
35 changed files with 356 additions and 341 deletions

View File

@@ -11,7 +11,7 @@
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
#include "core/rendering/surface_sprite.hpp" // Para SSprite
#include "core/resources/resource.hpp" // Para Resource
#include "core/resources/resource_cache.hpp" // Para Resource
#include "core/system/global_events.hpp" // Para check
#include "game/options.hpp" // Para Options, options, SectionState, Options...
#include "game/scene_manager.hpp" // Para SceneManager
@@ -20,11 +20,11 @@
// Constructor
LoadingScreen::LoadingScreen()
: mono_loading_screen_surface_(Resource::get()->getSurface("loading_screen_bn.gif")),
color_loading_screen_surface_(Resource::get()->getSurface("loading_screen_color.gif")),
: mono_loading_screen_surface_(Resource::Cache::get()->getSurface("loading_screen_bn.gif")),
color_loading_screen_surface_(Resource::Cache::get()->getSurface("loading_screen_color.gif")),
mono_loading_screen_sprite_(std::make_unique<SurfaceSprite>(mono_loading_screen_surface_, 0, 0, mono_loading_screen_surface_->getWidth(), mono_loading_screen_surface_->getHeight())),
color_loading_screen_sprite_(std::make_unique<SurfaceSprite>(color_loading_screen_surface_, 0, 0, color_loading_screen_surface_->getWidth(), color_loading_screen_surface_->getHeight())),
program_sprite_(std::make_unique<SurfaceSprite>(Resource::get()->getSurface("program_jaildoc.gif"))),
program_sprite_(std::make_unique<SurfaceSprite>(Resource::Cache::get()->getSurface("program_jaildoc.gif"))),
screen_surface_(std::make_shared<Surface>(Options::game.width, Options::game.height)),
delta_timer_(std::make_unique<DeltaTimer>()) {
// Configura la superficie donde se van a pintar los sprites
@@ -312,7 +312,7 @@ void LoadingScreen::renderHeaderBorder() const {
const auto COLOR = carrier_.toggle ? static_cast<Uint8>(PaletteColor::RED) : static_cast<Uint8>(PaletteColor::CYAN);
const int WIDTH = Options::game.width + (Options::video.border.width * 2);
const int HEIGHT = Options::game.height + (Options::video.border.height * 2);
// Primera linea (con el color y tamaño de la portadora)
int row = 0;
const int FIRST_ROW_HEIGHT = static_cast<int>(carrier_.offset);
@@ -320,7 +320,7 @@ void LoadingScreen::renderHeaderBorder() const {
border->drawLine(0, i, WIDTH, i, COLOR);
}
row += FIRST_ROW_HEIGHT;
// Resto de lineas (siguen a la portadora)
bool draw_enabled = false;
while (row < HEIGHT) {