canviat Options de struct a namespace

This commit is contained in:
2025-10-26 14:01:08 +01:00
parent 8f49e442de
commit df4965a84b
59 changed files with 1470 additions and 1533 deletions

View File

@@ -2,15 +2,15 @@
#include <SDL3/SDL.h>
#include "utils/defines.hpp" // Para GAME_SPEED
#include "utils/global_events.hpp" // Para check
#include "core/input/global_inputs.hpp" // Para check
#include "game/gameplay/options.hpp" // Para Options, SectionState, options, Section
#include "core/resources/resource.hpp" // Para Resource
#include "core/rendering/screen.hpp" // Para Screen
#include "core/input/global_inputs.hpp" // Para check
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
#include "core/rendering/surface_sprite.hpp" // Para SSprite
#include "core/rendering/surface.hpp" // Para Surface
#include "utils/utils.hpp" // Para PaletteColor
#include "core/resources/resource.hpp" // Para Resource
#include "game/gameplay/options.hpp" // Para Options, SectionState, options, Section
#include "utils/defines.hpp" // Para GAME_SPEED
#include "utils/global_events.hpp" // Para check
#include "utils/utils.hpp" // Para PaletteColor
// Constructor
Logo::Logo()
@@ -30,7 +30,7 @@ Logo::Logo()
}
// Inicializa variables
options.section.section = Section::LOGO;
Options::section.section = Options::Scene::LOGO;
// Inicializa el vector de colores
const std::vector<Uint8> COLORS = {
@@ -206,7 +206,7 @@ void Logo::render() {
// Bucle para el logo del juego
void Logo::run() {
while (options.section.section == Section::LOGO) {
while (Options::section.section == Options::Scene::LOGO) {
update();
checkEvents();
render();
@@ -215,11 +215,11 @@ void Logo::run() {
// Termina la sección
void Logo::endSection() {
if (options.section.subsection == Subsection::LOGO_TO_TITLE) {
options.section.section = Section::TITLE;
if (Options::section.subsection == Options::SceneOptions::LOGO_TO_TITLE) {
Options::section.section = Options::Scene::TITLE;
}
else if (options.section.subsection == Subsection::LOGO_TO_INTRO) {
options.section.section = Section::LOADING_SCREEN;
else if (Options::section.subsection == Options::SceneOptions::LOGO_TO_INTRO) {
Options::section.section = Options::Scene::LOADING_SCREEN;
}
}