corregit: el mode demo ja funciona correctament
This commit is contained in:
@@ -140,6 +140,9 @@ target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:RELEASE>:-Os -ffunctio
|
|||||||
# Definir _DEBUG en modo Debug
|
# Definir _DEBUG en modo Debug
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
|
||||||
|
|
||||||
|
# Descomentar la siguiente línea para activar el modo grabación de demos
|
||||||
|
# target_compile_definitions(${PROJECT_NAME} PRIVATE RECORDING)
|
||||||
|
|
||||||
|
|
||||||
# Configuración específica para cada plataforma
|
# Configuración específica para cada plataforma
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ scoreboard.skip_countdown_value 8 # Valor para saltar la cuenta atrás (
|
|||||||
|
|
||||||
# --- TITLE ---
|
# --- TITLE ---
|
||||||
title.press_start_position 180 # Posición Y del texto "Press Start"
|
title.press_start_position 180 # Posición Y del texto "Press Start"
|
||||||
title.title_duration 14 # Duración de la pantalla de título (segundos)
|
title.title_duration 1 # Duración de la pantalla de título (segundos)
|
||||||
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
||||||
title.title_c_c_position 80 # Posición Y del título principal
|
title.title_c_c_position 80 # Posición Y del título principal
|
||||||
title.bg_color 41526F # Color de fondo en la sección titulo
|
title.bg_color 41526F # Color de fondo en la sección titulo
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
data/demo/demo3.bin
Normal file
BIN
data/demo/demo3.bin
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -42,7 +42,7 @@ Director::Director(int argc, std::span<char *> argv) {
|
|||||||
Section::name = Section::Name::GAME;
|
Section::name = Section::Name::GAME;
|
||||||
Section::options = Section::Options::GAME_PLAY_1P;
|
Section::options = Section::Options::GAME_PLAY_1P;
|
||||||
#elif _DEBUG
|
#elif _DEBUG
|
||||||
Section::name = Section::Name::GAME;
|
Section::name = Section::Name::TITLE;
|
||||||
Section::options = Section::Options::GAME_PLAY_1P;
|
Section::options = Section::Options::GAME_PLAY_1P;
|
||||||
#else // NORMAL GAME
|
#else // NORMAL GAME
|
||||||
Section::name = Section::Name::LOGO;
|
Section::name = Section::Name::LOGO;
|
||||||
|
|||||||
@@ -217,6 +217,10 @@ void Screen::renderInfo() {
|
|||||||
// FPS
|
// FPS
|
||||||
const std::string FPS_TEXT = std::to_string(fps_.last_value) + " FPS";
|
const std::string FPS_TEXT = std::to_string(fps_.last_value) + " FPS";
|
||||||
debug_info_.text->writeDX(Text::COLOR | Text::STROKE, param.game.width - debug_info_.text->length(FPS_TEXT) - 2, 1 + debug_info_.text->getCharacterSize(), FPS_TEXT, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
debug_info_.text->writeDX(Text::COLOR | Text::STROKE, param.game.width - debug_info_.text->length(FPS_TEXT) - 2, 1 + debug_info_.text->getCharacterSize(), FPS_TEXT, 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||||
|
#ifdef RECORDING
|
||||||
|
// RECORDING
|
||||||
|
debug_info_.text->writeDX(Text::COLOR | Text::STROKE, param.game.width - debug_info_.text->length("RECORDING"), 2*(1 + debug_info_.text->getCharacterSize()), "RECORDING", 1, param.debug.color, 1, param.debug.color.DARKEN(150));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Game::Game(Player::Id player_id, int current_stage, bool demo)
|
Game::Game(Player::Id player_id, int current_stage, bool demo_enabled)
|
||||||
: renderer_(Screen::get()->getRenderer()),
|
: renderer_(Screen::get()->getRenderer()),
|
||||||
screen_(Screen::get()),
|
screen_(Screen::get()),
|
||||||
input_(Input::get()),
|
input_(Input::get()),
|
||||||
@@ -62,7 +62,7 @@ Game::Game(Player::Id player_id, int current_stage, bool demo)
|
|||||||
tabe_(std::make_unique<Tabe>()),
|
tabe_(std::make_unique<Tabe>()),
|
||||||
hit_(Hit(Resource::get()->getTexture("hit.png"))) {
|
hit_(Hit(Resource::get()->getTexture("hit.png"))) {
|
||||||
// Pasa variables
|
// Pasa variables
|
||||||
demo_.enabled = demo;
|
demo_.enabled = demo_enabled;
|
||||||
|
|
||||||
// Otras variables
|
// Otras variables
|
||||||
Section::name = Section::Name::GAME;
|
Section::name = Section::Name::GAME;
|
||||||
@@ -83,7 +83,9 @@ Game::Game(Player::Id player_id, int current_stage, bool demo)
|
|||||||
fade_in_->setPostDuration(0);
|
fade_in_->setPostDuration(0);
|
||||||
fade_in_->setType(Fade::Type::RANDOM_SQUARE2);
|
fade_in_->setType(Fade::Type::RANDOM_SQUARE2);
|
||||||
fade_in_->setMode(Fade::Mode::IN);
|
fade_in_->setMode(Fade::Mode::IN);
|
||||||
|
#ifndef RECORDING
|
||||||
fade_in_->activate();
|
fade_in_->activate();
|
||||||
|
#endif
|
||||||
|
|
||||||
fade_out_->setColor(param.fade.color);
|
fade_out_->setColor(param.fade.color);
|
||||||
fade_out_->setPostDuration(param.fade.post_duration_ms);
|
fade_out_->setPostDuration(param.fade.post_duration_ms);
|
||||||
@@ -109,6 +111,9 @@ Game::Game(Player::Id player_id, int current_stage, bool demo)
|
|||||||
pause_manager_->setServiceMenuPause(is_active);
|
pause_manager_->setServiceMenuPause(is_active);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#ifdef RECORDING
|
||||||
|
setState(State::PLAYING);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Game::~Game() {
|
Game::~Game() {
|
||||||
@@ -402,6 +407,7 @@ void Game::destroyAllItems() {
|
|||||||
|
|
||||||
// Comprueba la colisión entre el jugador y los globos activos
|
// Comprueba la colisión entre el jugador y los globos activos
|
||||||
auto Game::checkPlayerBalloonCollision(std::shared_ptr<Player>& player) -> std::shared_ptr<Balloon> {
|
auto Game::checkPlayerBalloonCollision(std::shared_ptr<Player>& player) -> std::shared_ptr<Balloon> {
|
||||||
|
#ifndef RECORDING
|
||||||
for (auto& balloon : balloon_manager_->getBalloons()) {
|
for (auto& balloon : balloon_manager_->getBalloons()) {
|
||||||
if (!balloon->isInvulnerable() && !balloon->isPowerBall()) {
|
if (!balloon->isInvulnerable() && !balloon->isPowerBall()) {
|
||||||
if (checkCollision(player->getCollider(), balloon->getCollider())) {
|
if (checkCollision(player->getCollider(), balloon->getCollider())) {
|
||||||
@@ -409,6 +415,7 @@ auto Game::checkPlayerBalloonCollision(std::shared_ptr<Player> &player) -> std::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return nullptr; // No se ha producido ninguna colisión
|
return nullptr; // No se ha producido ninguna colisión
|
||||||
}
|
}
|
||||||
@@ -909,9 +916,9 @@ void Game::update(float deltaTime) {
|
|||||||
screen_->update(deltaTime); // Actualiza el objeto screen
|
screen_->update(deltaTime); // Actualiza el objeto screen
|
||||||
Audio::update(); // Actualiza el objeto audio
|
Audio::update(); // Actualiza el objeto audio
|
||||||
|
|
||||||
updateDemo();
|
updateDemo(deltaTime);
|
||||||
#ifdef RECORDING
|
#ifdef RECORDING
|
||||||
updateRecording();
|
updateRecording(deltaTime);
|
||||||
#endif
|
#endif
|
||||||
updateGameStates(deltaTime);
|
updateGameStates(deltaTime);
|
||||||
fillCanvas();
|
fillCanvas();
|
||||||
@@ -1012,10 +1019,8 @@ void Game::run() {
|
|||||||
last_time_ = SDL_GetTicks();
|
last_time_ = SDL_GetTicks();
|
||||||
|
|
||||||
while (Section::name == Section::Name::GAME) {
|
while (Section::name == Section::Name::GAME) {
|
||||||
#ifndef RECORDING
|
|
||||||
checkInput();
|
|
||||||
#endif
|
|
||||||
const float delta_time = calculateDeltaTime();
|
const float delta_time = calculateDeltaTime();
|
||||||
|
checkInput();
|
||||||
update(delta_time);
|
update(delta_time);
|
||||||
handleEvents(); // Tiene que ir antes del render
|
handleEvents(); // Tiene que ir antes del render
|
||||||
render();
|
render();
|
||||||
@@ -1299,7 +1304,7 @@ void Game::demoHandleInput() {
|
|||||||
|
|
||||||
// Procesa las entradas para un jugador específico durante el modo demo.
|
// Procesa las entradas para un jugador específico durante el modo demo.
|
||||||
void Game::demoHandlePlayerInput(const std::shared_ptr<Player>& player, int index) {
|
void Game::demoHandlePlayerInput(const std::shared_ptr<Player>& player, int index) {
|
||||||
const auto &demo_data = demo_.data.at(index).at(demo_.counter);
|
const auto& demo_data = demo_.data.at(index).at(demo_.index);
|
||||||
|
|
||||||
if (demo_data.left == 1) {
|
if (demo_data.left == 1) {
|
||||||
player->setInput(Input::Action::LEFT);
|
player->setInput(Input::Action::LEFT);
|
||||||
@@ -1514,15 +1519,23 @@ void Game::handleNameInput(const std::shared_ptr<Player> &player) {
|
|||||||
|
|
||||||
// Inicializa las variables para el modo DEMO
|
// Inicializa las variables para el modo DEMO
|
||||||
void Game::initDemo(Player::Id player_id) {
|
void Game::initDemo(Player::Id player_id) {
|
||||||
|
#ifdef RECORDING
|
||||||
|
// En modo grabación, inicializar vector vacío para almacenar teclas
|
||||||
|
demo_.data.emplace_back(); // Vector vacío para grabación
|
||||||
|
demo_.data.at(0).reserve(TOTAL_DEMO_DATA); // Reservar espacio para 2000 elementos
|
||||||
|
#endif
|
||||||
|
|
||||||
if (demo_.enabled) {
|
if (demo_.enabled) {
|
||||||
// Cambia el estado del juego
|
// Cambia el estado del juego
|
||||||
setState(State::PLAYING);
|
setState(State::PLAYING);
|
||||||
|
|
||||||
// Aleatoriza la asignación del fichero con los datos del modo demostracion
|
#ifndef RECORDING
|
||||||
|
// Solo en modo reproducción: aleatoriza la asignación del fichero con los datos del modo demostracion
|
||||||
const auto DEMO1 = rand() % 2;
|
const auto DEMO1 = rand() % 2;
|
||||||
const auto DEMO2 = (DEMO1 == 0) ? 1 : 0;
|
const auto DEMO2 = (DEMO1 == 0) ? 1 : 0;
|
||||||
demo_.data.emplace_back(Resource::get()->getDemoData(DEMO1));
|
demo_.data.emplace_back(Resource::get()->getDemoData(DEMO1));
|
||||||
demo_.data.emplace_back(Resource::get()->getDemoData(DEMO2));
|
demo_.data.emplace_back(Resource::get()->getDemoData(DEMO2));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Selecciona una pantalla al azar
|
// Selecciona una pantalla al azar
|
||||||
constexpr auto NUM_DEMOS = 3;
|
constexpr auto NUM_DEMOS = 3;
|
||||||
@@ -1562,7 +1575,7 @@ void Game::initDemo(Player::Id player_id) {
|
|||||||
#else
|
#else
|
||||||
demo_.recording = false;
|
demo_.recording = false;
|
||||||
#endif
|
#endif
|
||||||
demo_.counter = 0;
|
demo_.index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inicializa el marcador
|
// Inicializa el marcador
|
||||||
@@ -1617,7 +1630,11 @@ void Game::initPlayers(Player::Id player_id) {
|
|||||||
// Crea al jugador uno y lo pone en modo espera
|
// Crea al jugador uno y lo pone en modo espera
|
||||||
Player::Config config_player1{
|
Player::Config config_player1{
|
||||||
.id = Player::Id::PLAYER1,
|
.id = Player::Id::PLAYER1,
|
||||||
|
#ifdef RECORDING
|
||||||
|
.x = param.game.play_area.center_x - (Player::WIDTH / 2),
|
||||||
|
#else
|
||||||
.x = param.game.play_area.first_quarter_x - (Player::WIDTH / 2),
|
.x = param.game.play_area.first_quarter_x - (Player::WIDTH / 2),
|
||||||
|
#endif
|
||||||
.y = Y,
|
.y = Y,
|
||||||
.demo = demo_.enabled,
|
.demo = demo_.enabled,
|
||||||
.play_area = ¶m.game.play_area.rect,
|
.play_area = ¶m.game.play_area.rect,
|
||||||
@@ -1634,7 +1651,11 @@ void Game::initPlayers(Player::Id player_id) {
|
|||||||
player1->setName(Lang::getText("[SCOREBOARD] 1"));
|
player1->setName(Lang::getText("[SCOREBOARD] 1"));
|
||||||
player1->setGamepad(Options::gamepad_manager.getGamepad(Player::Id::PLAYER1).instance);
|
player1->setGamepad(Options::gamepad_manager.getGamepad(Player::Id::PLAYER1).instance);
|
||||||
player1->setUsesKeyboard(Player::Id::PLAYER1 == Options::keyboard.player_id);
|
player1->setUsesKeyboard(Player::Id::PLAYER1 == Options::keyboard.player_id);
|
||||||
|
#ifdef RECORDING
|
||||||
|
player1->setPlayingState(Player::State::PLAYING);
|
||||||
|
#else
|
||||||
player1->setPlayingState((player_id == Player::Id::BOTH_PLAYERS || player_id == Player::Id::PLAYER1) ? STATE : Player::State::WAITING);
|
player1->setPlayingState((player_id == Player::Id::BOTH_PLAYERS || player_id == Player::Id::PLAYER1) ? STATE : Player::State::WAITING);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Crea al jugador dos y lo pone en modo espera
|
// Crea al jugador dos y lo pone en modo espera
|
||||||
Player::Config config_player2{
|
Player::Config config_player2{
|
||||||
@@ -1692,7 +1713,7 @@ void Game::stopMusic() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza las variables durante el modo demo
|
// Actualiza las variables durante el modo demo
|
||||||
void Game::updateDemo() {
|
void Game::updateDemo(float deltaTime) {
|
||||||
if (demo_.enabled) {
|
if (demo_.enabled) {
|
||||||
balloon_manager_->setCreationTimeEnabled(balloon_manager_->getNumBalloons() != 0);
|
balloon_manager_->setCreationTimeEnabled(balloon_manager_->getNumBalloons() != 0);
|
||||||
|
|
||||||
@@ -1700,16 +1721,12 @@ void Game::updateDemo() {
|
|||||||
fade_in_->update();
|
fade_in_->update();
|
||||||
fade_out_->update();
|
fade_out_->update();
|
||||||
|
|
||||||
// Incrementa el contador de la demo cada 1/60 segundos (16.67ms)
|
// Actualiza el contador de tiempo y el índice
|
||||||
static float demo_frame_timer = 0.0f;
|
demo_.elapsed_s += deltaTime;
|
||||||
demo_frame_timer += calculateDeltaTime();
|
demo_.index = static_cast<int>(demo_.elapsed_s * 60.0F);
|
||||||
if (demo_frame_timer >= 0.01667f && demo_.counter < TOTAL_DEMO_DATA) {
|
|
||||||
demo_.counter++;
|
|
||||||
demo_frame_timer -= 0.01667f; // Mantener precisión acumulada
|
|
||||||
}
|
|
||||||
|
|
||||||
// Activa el fundido antes de acabar con los datos de la demo
|
// Activa el fundido antes de acabar con los datos de la demo
|
||||||
if (demo_.counter == TOTAL_DEMO_DATA - 200) {
|
if (demo_.index == TOTAL_DEMO_DATA - 200) {
|
||||||
fade_out_->setType(Fade::Type::RANDOM_SQUARE2);
|
fade_out_->setType(Fade::Type::RANDOM_SQUARE2);
|
||||||
fade_out_->setPostDuration(param.fade.post_duration_ms);
|
fade_out_->setPostDuration(param.fade.post_duration_ms);
|
||||||
fade_out_->activate();
|
fade_out_->activate();
|
||||||
@@ -1725,22 +1742,28 @@ void Game::updateDemo() {
|
|||||||
|
|
||||||
#ifdef RECORDING
|
#ifdef RECORDING
|
||||||
// Actualiza las variables durante el modo de grabación
|
// Actualiza las variables durante el modo de grabación
|
||||||
void Game::updateRecording() {
|
void Game::updateRecording(float deltaTime) {
|
||||||
// Solo mira y guarda el input en cada update
|
// Actualiza el contador de tiempo y el índice
|
||||||
checkInput();
|
demo_.elapsed_s += deltaTime;
|
||||||
|
demo_.index = static_cast<int>(demo_.elapsed_s * 60.0F);
|
||||||
|
|
||||||
// Incrementa el contador de la demo cada 1/60 segundos (16.67ms)
|
if (demo_.index >= TOTAL_DEMO_DATA) {
|
||||||
static float recording_frame_timer = 0.0f;
|
Section::name = Section::Name::QUIT;
|
||||||
recording_frame_timer += calculateDeltaTime();
|
return;
|
||||||
if (recording_frame_timer >= 0.01667f && demo_.counter < TOTAL_DEMO_DATA) {
|
|
||||||
demo_.counter++;
|
|
||||||
recording_frame_timer -= 0.01667f; // Mantener precisión acumulada
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si se ha llenado el vector con datos, sale del programa
|
// Almacenar las teclas del frame actual en el vector de grabación
|
||||||
else {
|
if (demo_.index < TOTAL_DEMO_DATA && demo_.data.size() > 0) {
|
||||||
section::name = section::Name::QUIT;
|
// Asegurar que el vector tenga el tamaño suficiente
|
||||||
return;
|
if (demo_.data.at(0).size() <= static_cast<size_t>(demo_.index)) {
|
||||||
|
demo_.data.at(0).resize(demo_.index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Almacenar las teclas del frame actual
|
||||||
|
demo_.data.at(0).at(demo_.index) = demo_.keys;
|
||||||
|
|
||||||
|
// Resetear las teclas para el siguiente frame
|
||||||
|
demo_.keys = DemoKeys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class Game {
|
|||||||
static constexpr bool DEMO_ON = true; // Modo demo activado
|
static constexpr bool DEMO_ON = true; // Modo demo activado
|
||||||
|
|
||||||
// --- Constructor y destructor ---
|
// --- Constructor y destructor ---
|
||||||
Game(Player::Id player_id, int current_stage, bool demo); // Constructor principal
|
Game(Player::Id player_id, int current_stage, bool demo_enabled); // Constructor principal
|
||||||
~Game(); // Destructor
|
~Game(); // Destructor
|
||||||
|
|
||||||
// --- Bucle principal ---
|
// --- Bucle principal ---
|
||||||
@@ -325,7 +325,7 @@ class Game {
|
|||||||
|
|
||||||
// --- Modo demostración ---
|
// --- Modo demostración ---
|
||||||
void initDemo(Player::Id player_id); // Inicializa variables para el modo demostración
|
void initDemo(Player::Id player_id); // Inicializa variables para el modo demostración
|
||||||
void updateDemo(); // Actualiza lógica específica del modo demo
|
void updateDemo(float deltaTime); // Actualiza lógica específica del modo demo
|
||||||
|
|
||||||
// --- Recursos y renderizado ---
|
// --- Recursos y renderizado ---
|
||||||
void setResources(); // Asigna texturas y animaciones a los objetos
|
void setResources(); // Asigna texturas y animaciones a los objetos
|
||||||
@@ -346,7 +346,7 @@ class Game {
|
|||||||
|
|
||||||
// SISTEMA DE GRABACIÓN (CONDICIONAL)
|
// SISTEMA DE GRABACIÓN (CONDICIONAL)
|
||||||
#ifdef RECORDING
|
#ifdef RECORDING
|
||||||
void updateRecording(); // Actualiza variables durante modo de grabación
|
void updateRecording(float deltaTime); // Actualiza variables durante modo de grabación
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// --- Depuración (solo en modo DEBUG) ---
|
// --- Depuración (solo en modo DEBUG) ---
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ bool saveDemoFile(const std::string &file_path, const DemoData &dd) {
|
|||||||
if (file) {
|
if (file) {
|
||||||
// Guarda los datos
|
// Guarda los datos
|
||||||
for (const auto &data : dd) {
|
for (const auto &data : dd) {
|
||||||
if (SDL_RWwrite(file, &data, sizeof(DemoKeys), 1) != 1) {
|
if (SDL_WriteIO(file, &data, sizeof(DemoKeys)) != sizeof(DemoKeys)) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error al escribir el fichero %s", getFileName(file_path).c_str());
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error al escribir el fichero %s", getFileName(file_path).c_str());
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -53,20 +53,19 @@ struct DemoKeys {
|
|||||||
using DemoData = std::vector<DemoKeys>;
|
using DemoData = std::vector<DemoKeys>;
|
||||||
|
|
||||||
struct Demo {
|
struct Demo {
|
||||||
bool enabled; // Indica si está activo el modo demo
|
bool enabled = false; // Indica si está activo el modo demo
|
||||||
bool recording; // Indica si está activado el modo para grabar la demo
|
bool recording = false; // Indica si está activado el modo para grabar la demo
|
||||||
int counter; // Contador para el modo demo
|
float elapsed_s = 0.0F; // Segundos transcurridos de demo
|
||||||
|
int index = 0; // Contador para el modo demo
|
||||||
DemoKeys keys; // Variable con las pulsaciones de teclas del modo demo
|
DemoKeys keys; // Variable con las pulsaciones de teclas del modo demo
|
||||||
std::vector<DemoData> data; // Vector con diferentes sets de datos con los movimientos para la demo
|
std::vector<DemoData> data; // Vector con diferentes sets de datos con los movimientos para la demo
|
||||||
|
|
||||||
Demo()
|
Demo() = default;
|
||||||
: enabled(false),
|
|
||||||
recording(false),
|
|
||||||
counter(0) {}
|
|
||||||
Demo(bool e, bool r, int c, const DemoKeys& k, const std::vector<DemoData>& d)
|
Demo(bool e, bool r, int c, const DemoKeys& k, const std::vector<DemoData>& d)
|
||||||
: enabled(e),
|
: enabled(e),
|
||||||
recording(r),
|
recording(r),
|
||||||
counter(c),
|
index(c),
|
||||||
keys(k),
|
keys(k),
|
||||||
data(d) {}
|
data(d) {}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user