From 971d8be0dcd48539fdcf67fbaaa05a0773effc3d Mon Sep 17 00:00:00 2001 From: qihuanye <2728290997@qq.com> Date: Tue, 28 Apr 2026 20:31:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=90=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/source/Tetris.cpp | 17 +++++++---------- src/source/TetrisLogic.cpp | 4 +++- src/source/TetrisRogue.cpp | 9 ++++++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/source/Tetris.cpp b/src/source/Tetris.cpp index 839f332..5f5ee66 100644 --- a/src/source/Tetris.cpp +++ b/src/source/Tetris.cpp @@ -823,14 +823,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { shouldRefresh = true; } - if (shouldRefresh) - { - InvalidateRect(hWnd, nullptr, FALSE); - } - break; } - if (currentMode == MODE_ROGUE && rogueStats.feverTicks > 0) + if (currentMode == MODE_ROGUE && !IsRogueSkillDemoMode() && rogueStats.feverTicks > 0) { rogueStats.feverTicks--; currentFallInterval = GetRogueFallInterval(); @@ -839,6 +834,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } if (currentMode == MODE_ROGUE && + !IsRogueSkillDemoMode() && rogueStats.timeDilationTicks > 0 && currentScreen == SCREEN_PLAYING && !suspendFlag && @@ -850,7 +846,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) shouldRefresh = true; } - if (currentMode == MODE_ROGUE && rogueStats.extremeSlowTicks > 0) + if (currentMode == MODE_ROGUE && !IsRogueSkillDemoMode() && rogueStats.extremeSlowTicks > 0) { rogueStats.extremeSlowTicks--; currentFallInterval = GetRogueFallInterval(); @@ -859,6 +855,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } if (currentMode == MODE_ROGUE && + !IsRogueSkillDemoMode() && rogueStats.extremePlayerLevel > 0 && currentScreen == SCREEN_PLAYING && !suspendFlag && @@ -884,7 +881,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } } - if (currentMode == MODE_ROGUE && rogueStats.holdSlowTicks > 0) + if (currentMode == MODE_ROGUE && !IsRogueSkillDemoMode() && rogueStats.holdSlowTicks > 0) { rogueStats.holdSlowTicks--; currentFallInterval = GetRogueFallInterval(); @@ -896,7 +893,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) !suspendFlag && !gameOverFlag) { - if (currentMode == MODE_ROGUE) + if (currentMode == MODE_ROGUE && !IsRogueSkillDemoMode()) { int previousFallInterval = currentFallInterval; AdvanceRogueDifficulty(currentFallInterval > 0 ? currentFallInterval : GAME_TIMER_INTERVAL); @@ -906,7 +903,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } } - if (currentMode == MODE_ROGUE && rogueStats.timeDilationLevel > 0 && rogueStats.timeDilationTicks <= 0) + if (currentMode == MODE_ROGUE && !IsRogueSkillDemoMode() && rogueStats.timeDilationLevel > 0 && rogueStats.timeDilationTicks <= 0) { int occupiedHeight = 0; int playableHeight = GetRoguePlayableHeight(); diff --git a/src/source/TetrisLogic.cpp b/src/source/TetrisLogic.cpp index 06193e4..6a4e939 100644 --- a/src/source/TetrisLogic.cpp +++ b/src/source/TetrisLogic.cpp @@ -501,6 +501,7 @@ void Fixing() rogueStats.screenBombCount--; int clearedByTerminal = TriggerScreenBomb(); + ApplyBoardGravity(); rogueStats.feverTicks = 10; currentFallInterval = GetRogueFallInterval(); @@ -519,6 +520,7 @@ void Fixing() { DeleteOneLine(GetRoguePlayableHeight() - 1); } + ApplyBoardGravity(); SetFeedbackMessage( _T("ζœ€εŽδΈ€ζ"), @@ -743,7 +745,7 @@ int DeleteLines() } ApplyLineClearResult(clearedLines); - if (currentMode == MODE_CLASSIC && clearedLines > 0) + if (clearedLines > 0) { ApplyBoardGravity(); } diff --git a/src/source/TetrisRogue.cpp b/src/source/TetrisRogue.cpp index 348bd36..013fd88 100644 --- a/src/source/TetrisRogue.cpp +++ b/src/source/TetrisRogue.cpp @@ -272,7 +272,7 @@ static void ClearLockedRows() */ void AdvanceRogueDifficulty(int elapsedMs) { - if (currentMode != MODE_ROGUE || currentScreen != SCREEN_PLAYING || suspendFlag || gameOverFlag || elapsedMs <= 0) + if (currentMode != MODE_ROGUE || rogueDemoMode || currentScreen != SCREEN_PLAYING || suspendFlag || gameOverFlag || elapsedMs <= 0) { return; } @@ -303,6 +303,7 @@ void AdvanceRogueDifficulty(int elapsedMs) { rogueStats.lockedRows = nextLockedRows; ClearLockedRows(); + ApplyBoardGravity(); ComputeTarget(); } @@ -2224,6 +2225,8 @@ void ApplyLineClearResult(int linesCleared) if (clearedBySweeper > 0) { + ApplyBoardGravity(); + TCHAR sweeperDetail[128]; _stprintf_s( sweeperDetail, @@ -2322,6 +2325,10 @@ static void ResolvePendingUpgradeShockwave() pendingEvolutionImpactShockwave = false; int clearedRows = TriggerUpgradeShockwave(shockwaveRows); + if (clearedRows > 0) + { + ApplyBoardGravity(); + } int effectRows[4] = {}; int effectRowCount = clearedRows; if (effectRowCount > 4)