fixed timer functions

This commit is contained in:
2025-11-23 18:41:52 +01:00
parent d5fdae397d
commit adec55526e
7 changed files with 100 additions and 22 deletions

View File

@ -30,6 +30,9 @@ namespace Config {
constexpr double ARR_RATE = 40.0; // Auto Repeat Rate in ms
constexpr float LEVEL_FADE_DURATION = 3500.0f; // Level background fade time in ms
constexpr int MAX_LEVELS = 20; // Maximum selectable starting level
// Gravity speed multiplier: 1.0 = normal, 2.0 = 2x slower, 0.5 = 2x faster
constexpr double GRAVITY_SPEED_MULTIPLIER = 1;
}
// UI Layout constants

View File

@ -512,6 +512,11 @@ bool ApplicationManager::initializeGame() {
m_game = std::make_unique<Game>(m_startLevelSelection);
// Wire up sound callbacks as main.cpp did
if (m_game) {
// Apply global gravity speed multiplier from config
m_game->setGravityGlobalMultiplier(Config::Gameplay::GRAVITY_SPEED_MULTIPLIER);
// Reset to recalculate gravity with the new multiplier
m_game->reset(m_startLevelSelection);
m_game->setSoundCallback([&](int linesCleared){
SoundEffectManager::instance().playSound("clear_line", 1.0f);
// voice lines handled via asset manager loaded sounds