corregits alguns parametres de ms a s
This commit is contained in:
@@ -10,8 +10,8 @@ game.play_area.rect.x 0 # Posición X de la zona jugable
|
|||||||
game.play_area.rect.y 0 # Posición Y de la zona jugable
|
game.play_area.rect.y 0 # Posición Y de la zona jugable
|
||||||
game.play_area.rect.w 320 # Ancho de la zona jugable
|
game.play_area.rect.w 320 # Ancho de la zona jugable
|
||||||
game.play_area.rect.h 200 # Alto de la zona jugable
|
game.play_area.rect.h 200 # Alto de la zona jugable
|
||||||
game.name_entry_idle_time 10000 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
||||||
game.name_entry_total_time 60000 # Segundos totales para introducir el nombre al finalizar la partida
|
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
||||||
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
||||||
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
||||||
|
|
||||||
@@ -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 14000 # Duración de la pantalla de título (milisegundos)
|
title.title_duration 14 # 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
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ game.play_area.rect.x 0 # Posición X de la zona jugable
|
|||||||
game.play_area.rect.y 0 # Posición Y de la zona jugable
|
game.play_area.rect.y 0 # Posición Y de la zona jugable
|
||||||
game.play_area.rect.w 320 # Ancho de la zona jugable
|
game.play_area.rect.w 320 # Ancho de la zona jugable
|
||||||
game.play_area.rect.h 216 # Alto de la zona jugable
|
game.play_area.rect.h 216 # Alto de la zona jugable
|
||||||
game.name_entry_idle_time 10000 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
||||||
game.name_entry_total_time 60000 # Segundos totales para introducir el nombre al finalizar la partida
|
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
||||||
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
||||||
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
||||||
|
|
||||||
@@ -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 14000 # Duración de la pantalla de título (milisegundos)
|
title.title_duration 14 # 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
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ namespace Game {
|
|||||||
constexpr float WIDTH = 320.0F;
|
constexpr float WIDTH = 320.0F;
|
||||||
constexpr float HEIGHT = 256.0F;
|
constexpr float HEIGHT = 256.0F;
|
||||||
constexpr float ITEM_SIZE = 20.0F;
|
constexpr float ITEM_SIZE = 20.0F;
|
||||||
constexpr int NAME_ENTRY_IDLE_TIME = 10000; // 10 segundos en milisegundos
|
constexpr int NAME_ENTRY_IDLE_TIME = 10;
|
||||||
constexpr int NAME_ENTRY_TOTAL_TIME = 60000; // 60 segundos en milisegundos
|
constexpr int NAME_ENTRY_TOTAL_TIME = 60;
|
||||||
constexpr bool HIT_STOP = false;
|
constexpr bool HIT_STOP = false;
|
||||||
constexpr int HIT_STOP_MS = 500;
|
constexpr int HIT_STOP_MS = 500;
|
||||||
constexpr const char* ITEM_TEXT_OUTLINE_COLOR = "FFFFFF00"; // 255, 255, 255, 0
|
constexpr const char* ITEM_TEXT_OUTLINE_COLOR = "FFFFFF00"; // 255, 255, 255, 0
|
||||||
@@ -58,7 +58,7 @@ constexpr int SKIP_COUNTDOWN_VALUE = 8;
|
|||||||
// --- TITLE ---
|
// --- TITLE ---
|
||||||
namespace Title {
|
namespace Title {
|
||||||
constexpr int PRESS_START_POSITION = 180;
|
constexpr int PRESS_START_POSITION = 180;
|
||||||
constexpr float DURATION = 14000;
|
constexpr float DURATION_S = 14.0F;
|
||||||
constexpr int ARCADE_EDITION_POSITION = 123;
|
constexpr int ARCADE_EDITION_POSITION = 123;
|
||||||
constexpr int TITLE_C_C_POSITION = 80;
|
constexpr int TITLE_C_C_POSITION = 80;
|
||||||
constexpr const char* BG_COLOR = "41526F";
|
constexpr const char* BG_COLOR = "41526F";
|
||||||
@@ -82,10 +82,10 @@ struct BalloonSettings {
|
|||||||
|
|
||||||
// Valores para deltaTime en segundos: vel en pixels/s, grav en pixels/s² (aceleración)
|
// Valores para deltaTime en segundos: vel en pixels/s, grav en pixels/s² (aceleración)
|
||||||
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
|
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
|
||||||
BalloonSettings(165.0F, 320.0F), // Globo 0: vel=165 pixels/s, grav=320 pixels/s²
|
BalloonSettings(165.0F, 320.0F), // Globo 0: vel=165 pixels/s, grav=320 pixels/s²
|
||||||
BalloonSettings(222.0F, 360.0F), // Globo 1: vel=222 pixels/s, grav=360 pixels/s²
|
BalloonSettings(222.0F, 360.0F), // Globo 1: vel=222 pixels/s, grav=360 pixels/s²
|
||||||
BalloonSettings(282.0F, 360.0F), // Globo 2: vel=282 pixels/s, grav=360 pixels/s²
|
BalloonSettings(282.0F, 360.0F), // Globo 2: vel=282 pixels/s, grav=360 pixels/s²
|
||||||
BalloonSettings(327.0F, 360.0F) // Globo 3: vel=327 pixels/s, grav=360 pixels/s²
|
BalloonSettings(327.0F, 360.0F) // Globo 3: vel=327 pixels/s, grav=360 pixels/s²
|
||||||
}};
|
}};
|
||||||
|
|
||||||
constexpr std::array<const char*, 4> COLORS = {
|
constexpr std::array<const char*, 4> COLORS = {
|
||||||
|
|||||||
@@ -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::LOGO;
|
||||||
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;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ struct ParamFade {
|
|||||||
// --- Parámetros de la pantalla de título ---
|
// --- Parámetros de la pantalla de título ---
|
||||||
struct ParamTitle {
|
struct ParamTitle {
|
||||||
int press_start_position = GameDefaults::Title::PRESS_START_POSITION;
|
int press_start_position = GameDefaults::Title::PRESS_START_POSITION;
|
||||||
float title_duration = GameDefaults::Title::DURATION;
|
float title_duration = GameDefaults::Title::DURATION_S;
|
||||||
int arcade_edition_position = GameDefaults::Title::ARCADE_EDITION_POSITION;
|
int arcade_edition_position = GameDefaults::Title::ARCADE_EDITION_POSITION;
|
||||||
int title_c_c_position = GameDefaults::Title::TITLE_C_C_POSITION;
|
int title_c_c_position = GameDefaults::Title::TITLE_C_C_POSITION;
|
||||||
Color bg_color = Color::fromHex(GameDefaults::Title::BG_COLOR);
|
Color bg_color = Color::fromHex(GameDefaults::Title::BG_COLOR);
|
||||||
|
|||||||
@@ -875,12 +875,8 @@ void Player::decNameEntryCounter() {
|
|||||||
name_entry_idle_time_accumulator_ += 1.0f;
|
name_entry_idle_time_accumulator_ += 1.0f;
|
||||||
name_entry_total_time_accumulator_ += 1.0f;
|
name_entry_total_time_accumulator_ += 1.0f;
|
||||||
|
|
||||||
// Convierte límites de param (milisegundos) a segundos para comparación
|
if ((name_entry_total_time_accumulator_ >= param.game.name_entry_total_time) ||
|
||||||
const float NAME_ENTRY_TOTAL_TIME_S = param.game.name_entry_total_time / 1000.0f;
|
(name_entry_idle_time_accumulator_ >= param.game.name_entry_idle_time)) {
|
||||||
const float NAME_ENTRY_IDLE_TIME_S = param.game.name_entry_idle_time / 1000.0f;
|
|
||||||
|
|
||||||
if ((name_entry_total_time_accumulator_ >= NAME_ENTRY_TOTAL_TIME_S) ||
|
|
||||||
(name_entry_idle_time_accumulator_ >= NAME_ENTRY_IDLE_TIME_S)) {
|
|
||||||
name_entry_total_time_accumulator_ = 0.0f;
|
name_entry_total_time_accumulator_ = 0.0f;
|
||||||
name_entry_idle_time_accumulator_ = 0.0f;
|
name_entry_idle_time_accumulator_ = 0.0f;
|
||||||
if (playing_state_ == State::ENTERING_NAME) {
|
if (playing_state_ == State::ENTERING_NAME) {
|
||||||
|
|||||||
Reference in New Issue
Block a user