Redistribuits els .cpp en carpetes

Actualitzat cmake
Modificats els include de SDL2 a SDL3
This commit is contained in:
2025-10-15 08:28:57 +02:00
parent c3415fd106
commit 78c5333144
86 changed files with 6757 additions and 7610 deletions

View File

@@ -1,53 +1,53 @@
#pragma once
#include <SDL2/SDL_rect.h> // Para SDL_Point
#include <string> // Para string
#include <vector> // Para vector
#include <SDL3/SDL_rect.h> // Para SDL_Point
#include <string> // Para string
#include <vector> // Para vector
// Clase Debug
class Debug
{
private:
// [SINGLETON] Objeto privado
static Debug *debug_;
class Debug {
private:
// [SINGLETON] Objeto privado
static Debug* debug_;
// Variables
std::vector<std::string> slot_; // Vector con los textos a escribir
std::vector<std::string> log_; // Vector con los textos a escribir
int x_ = 0; // Posicion donde escribir el texto de debug
int y_ = 0; // Posición donde escribir el texto de debug
bool enabled_ = false; // Indica si esta activo el modo debug
// Variables
std::vector<std::string> slot_; // Vector con los textos a escribir
std::vector<std::string> log_; // Vector con los textos a escribir
int x_ = 0; // Posicion donde escribir el texto de debug
int y_ = 0; // Posición donde escribir el texto de debug
bool enabled_ = false; // Indica si esta activo el modo debug
// Constructor
Debug() = default;
// Constructor
Debug() = default;
// Destructor
~Debug() = default;
// Destructor
~Debug() = default;
public:
// [SINGLETON] Crearemos el objeto con esta función estática
static void init();
public:
// [SINGLETON] Crearemos el objeto con esta función estática
static void init();
// [SINGLETON] Destruiremos el objeto con esta función estática
static void destroy();
// [SINGLETON] Destruiremos el objeto con esta función estática
static void destroy();
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
static Debug *get();
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
static Debug* get();
// Dibuja en pantalla
void render();
// Dibuja en pantalla
void render();
// Establece la posición donde se colocará la información de debug
void setPos(SDL_Point p);
// Establece la posición donde se colocará la información de debug
void setPos(SDL_Point p);
// Getters
bool getEnabled() { return enabled_; }
// Getters
bool getEnabled() { return enabled_; }
// Setters
void add(std::string text) { slot_.push_back(text); }
void clear() { slot_.clear(); }
void addToLog(std::string text) { log_.push_back(text); }
void clearLog() { log_.clear(); }
void setEnabled(bool value) { enabled_ = value; }
void toggleEnabled() { enabled_ = !enabled_; }
// Setters
void add(std::string text) { slot_.push_back(text); }
void clear() { slot_.clear(); }
void addToLog(std::string text) { log_.push_back(text); }
void clearLog() { log_.clear(); }
void setEnabled(bool value) { enabled_ = value; }
void toggleEnabled() { enabled_ = !enabled_; }
};