corregits alguns parametres de ms a s
This commit is contained in:
@@ -15,8 +15,8 @@ namespace Game {
|
||||
constexpr float WIDTH = 320.0F;
|
||||
constexpr float HEIGHT = 256.0F;
|
||||
constexpr float ITEM_SIZE = 20.0F;
|
||||
constexpr int NAME_ENTRY_IDLE_TIME = 10000; // 10 segundos en milisegundos
|
||||
constexpr int NAME_ENTRY_TOTAL_TIME = 60000; // 60 segundos en milisegundos
|
||||
constexpr int NAME_ENTRY_IDLE_TIME = 10;
|
||||
constexpr int NAME_ENTRY_TOTAL_TIME = 60;
|
||||
constexpr bool HIT_STOP = false;
|
||||
constexpr int HIT_STOP_MS = 500;
|
||||
constexpr const char* ITEM_TEXT_OUTLINE_COLOR = "FFFFFF00"; // 255, 255, 255, 0
|
||||
@@ -58,7 +58,7 @@ constexpr int SKIP_COUNTDOWN_VALUE = 8;
|
||||
// --- TITLE ---
|
||||
namespace Title {
|
||||
constexpr int PRESS_START_POSITION = 180;
|
||||
constexpr float DURATION = 14000;
|
||||
constexpr float DURATION_S = 14.0F;
|
||||
constexpr int ARCADE_EDITION_POSITION = 123;
|
||||
constexpr int TITLE_C_C_POSITION = 80;
|
||||
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)
|
||||
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
|
||||
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(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(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(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²
|
||||
}};
|
||||
|
||||
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::options = Section::Options::GAME_PLAY_1P;
|
||||
#elif _DEBUG
|
||||
Section::name = Section::Name::GAME;
|
||||
Section::name = Section::Name::LOGO;
|
||||
Section::options = Section::Options::GAME_PLAY_1P;
|
||||
#else // NORMAL GAME
|
||||
Section::name = Section::Name::LOGO;
|
||||
|
||||
@@ -38,7 +38,7 @@ struct ParamFade {
|
||||
// --- Parámetros de la pantalla de título ---
|
||||
struct ParamTitle {
|
||||
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 title_c_c_position = GameDefaults::Title::TITLE_C_C_POSITION;
|
||||
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_total_time_accumulator_ += 1.0f;
|
||||
|
||||
// Convierte límites de param (milisegundos) a segundos para comparación
|
||||
const float NAME_ENTRY_TOTAL_TIME_S = param.game.name_entry_total_time / 1000.0f;
|
||||
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)) {
|
||||
if ((name_entry_total_time_accumulator_ >= param.game.name_entry_total_time) ||
|
||||
(name_entry_idle_time_accumulator_ >= param.game.name_entry_idle_time)) {
|
||||
name_entry_total_time_accumulator_ = 0.0f;
|
||||
name_entry_idle_time_accumulator_ = 0.0f;
|
||||
if (playing_state_ == State::ENTERING_NAME) {
|
||||
|
||||
Reference in New Issue
Block a user