增加难度上升机制

This commit is contained in:
2026-04-26 09:55:21 +08:00
parent 72df9d474a
commit 30ccac8cbd
5 changed files with 198 additions and 35 deletions
+13 -2
View File
@@ -221,10 +221,21 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
!suspendFlag &&
!gameOverFlag)
{
if (currentMode == MODE_ROGUE)
{
int previousFallInterval = currentFallInterval;
AdvanceRogueDifficulty(currentFallInterval > 0 ? currentFallInterval : GAME_TIMER_INTERVAL);
if (currentFallInterval != previousFallInterval)
{
ResetGameTimer(hWnd);
}
}
if (currentMode == MODE_ROGUE && rogueStats.timeDilationLevel > 0 && rogueStats.timeDilationTicks <= 0)
{
int occupiedHeight = 0;
for (int y = 0; y < nGameHeight; y++)
int playableHeight = GetRoguePlayableHeight();
for (int y = 0; y < playableHeight; y++)
{
bool hasCell = false;
for (int x = 0; x < nGameWidth; x++)
@@ -237,7 +248,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
if (hasCell)
{
occupiedHeight = nGameHeight - y;
occupiedHeight = playableHeight - y;
break;
}
}