Files
coffee_crisis_arcade_edition/source/defaults.h

149 lines
4.4 KiB
C++

#pragma once
#include <array>
#include "color.h"
#include "ui/notifier.h"
// Configuración centralizada con todos los valores por defecto del juego
namespace GameDefaults {
// --- GAME ---
namespace Game {
constexpr float WIDTH = 320.0f;
constexpr float HEIGHT = 256.0f;
constexpr float ITEM_SIZE = 20.0f;
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;
// Play area por defecto
constexpr float PLAY_AREA_X = 0.0f;
constexpr float PLAY_AREA_Y = 0.0f;
constexpr float PLAY_AREA_W = 320.0f;
constexpr float PLAY_AREA_H = 216.0f;
} // namespace Game
// --- FADE ---
namespace Fade {
constexpr const char* COLOR = "1F2B30";
constexpr float NUM_SQUARES_WIDTH = 160.0f;
constexpr float NUM_SQUARES_HEIGHT = 128.0f;
constexpr int RANDOM_SQUARES_DELAY = 1;
constexpr int RANDOM_SQUARES_MULT = 500;
constexpr int POST_DURATION = 80;
constexpr float VENETIAN_SIZE = 12.0f;
} // namespace Fade
// --- SCOREBOARD ---
namespace Scoreboard {
constexpr float RECT_X = 0.0f;
constexpr float RECT_Y = 216.0f;
constexpr float RECT_W = 320.0f;
constexpr float RECT_H = 40.0f;
constexpr bool SEPARATOR_AUTOCOLOR = true;
constexpr const char* SEPARATOR_COLOR = "0D1A2B";
constexpr const char* EASY_COLOR = "4B692F";
constexpr const char* NORMAL_COLOR = "2E3F47";
constexpr const char* HARD_COLOR = "76428A";
constexpr bool TEXT_AUTOCOLOR = true;
constexpr const char* TEXT_COLOR1 = "FFFFFF";
constexpr const char* TEXT_COLOR2 = "FFFFFF";
constexpr int SKIP_COUNTDOWN_VALUE = 8;
} // namespace Scoreboard
// --- TITLE ---
namespace Title {
constexpr int PRESS_START_POSITION = 180;
constexpr int DURATION = 800;
constexpr int ARCADE_EDITION_POSITION = 123;
constexpr int TITLE_C_C_POSITION = 80;
constexpr const char* BG_COLOR = "41526F";
} // namespace Title
// --- BACKGROUND ---
namespace Background {
constexpr const char* ATTENUATE_COLOR = "FFFFFF00";
}
// --- BALLOONS ---
namespace Balloon {
// Configuración de física para cada nivel de globo
struct BalloonSettings {
float vel;
float grav;
constexpr BalloonSettings(float v, float g) : vel(v), grav(g) {}
};
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
BalloonSettings(2.75f, 0.09f), // Globo 0
BalloonSettings(3.70f, 0.10f), // Globo 1
BalloonSettings(4.70f, 0.10f), // Globo 2
BalloonSettings(5.45f, 0.10f) // Globo 3
}};
constexpr std::array<const char*, 4> COLORS = {
"blue", "orange", "red", "green"};
constexpr bool BOUNCING_SOUND = false;
} // namespace Balloon
// --- NOTIFICATION ---
namespace Notification {
constexpr Notifier::Position POS_V = Notifier::Position::TOP;
constexpr Notifier::Position POS_H = Notifier::Position::LEFT;
constexpr bool SOUND = false;
constexpr const char* COLOR = "303030";
} // namespace Notification
// --- SERVICE MENU ---
namespace ServiceMenu {
constexpr const char* TITLE_COLOR = "99FF62";
constexpr const char* TEXT_COLOR = "FFFFFF";
constexpr const char* SELECTED_COLOR = "FFDC44";
constexpr const char* BG_COLOR = "000F00F5";
constexpr bool DROP_SHADOW = false;
// WindowMessage defaults
namespace WindowMessage {
constexpr const char* BG_COLOR = "141E32F0"; // Color(20, 30, 50, 240)
constexpr const char* BORDER_COLOR = "6496C8FF"; // Color(100, 150, 200, 255)
constexpr const char* TITLE_COLOR = "6496C8FF"; // Color(100, 150, 200, 255)
constexpr const char* TEXT_COLOR = "DCDCDCFF"; // Color(220, 220, 220, 255)
constexpr float PADDING = 15.0f;
constexpr float LINE_SPACING = 5.0f;
constexpr float TITLE_SEPARATOR_SPACING = 10.0f; // Cambiado a float
constexpr float MIN_WIDTH = 250.0f;
constexpr float MIN_HEIGHT = 32.0f; // Cambiado a float
constexpr float MAX_WIDTH_RATIO = 0.8f; // Nuevo
constexpr float MAX_HEIGHT_RATIO = 0.8f; // Nuevo
constexpr float TEXT_SAFETY_MARGIN = 15.0f;
constexpr float ANIMATION_DURATION = 0.3f;
} // namespace WindowMessage
} // namespace ServiceMenu
// --- INTRO ---
namespace Intro {
constexpr const char* BG_COLOR = "4664BD";
constexpr const char* CARD_COLOR = "CBDBFC";
constexpr const char* SHADOW_COLOR = "00000080";
constexpr int TEXT_DISTANCE_FROM_BOTTOM = 48;
} // namespace Intro
// --- DEBUG ---
namespace Debug {
constexpr const char* COLOR = "00FFFF";
}
// --- RESOURCE ---
namespace Resource {
constexpr const char* COLOR = "FFFFFF";
}
// --- TABE ---
namespace Tabe {
constexpr float MIN_SPAWN_TIME = 2.0f;
constexpr float MAX_SPAWN_TIME = 3.0f;
} // namespace Tabe
} // namespace GameDefaults