Arreglos en la estructura i format del codi

This commit is contained in:
2025-03-01 22:36:22 +01:00
parent 360ebfd2e6
commit aca2be98af
27 changed files with 371 additions and 560 deletions

View File

@@ -1,13 +1,13 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Point
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
class Screen; // lines 9-9
class Text; // lines 10-10
class Texture; // lines 11-11
#include <SDL2/SDL_rect.h> // for SDL_Point
#include <SDL2/SDL_render.h> // for SDL_Renderer
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
class Screen; // lines 9-9
class Text; // lines 10-10
class Texture; // lines 11-11
// Clase Debug
class Debug
@@ -16,11 +16,6 @@ private:
// [SINGLETON] Objeto privado
static Debug *debug_;
// Objetos y punteros
Screen *screen_; // Objeto encargado de dibujar en pantalla
SDL_Renderer *renderer_; // El renderizador de la ventana
std::shared_ptr<Text> text_; // Objeto encargado de escribir texto en pantalla
// Variables
std::vector<std::string> slot_; // Vector con los textos a escribir
std::vector<std::string> log_; // Vector con los textos a escribir
@@ -29,7 +24,7 @@ private:
bool enabled_ = false; // Indica si esta activo el modo debug
// Constructor
Debug();
Debug() = default;
// Destructor
~Debug() = default;
@@ -59,5 +54,5 @@ public:
void addToLog(std::string text) { log_.push_back(text); }
void clearLog() { log_.clear(); }
void setEnabled(bool value) { enabled_ = value; }
void switchEnabled() { enabled_ = !enabled_; }
void toggleEnabled() { enabled_ = !enabled_; }
};