fixed gameplay

This commit is contained in:
2025-12-20 15:17:35 +01:00
parent 9a3c1a0688
commit ad014e1de0
10 changed files with 176 additions and 25 deletions

View File

@ -221,11 +221,15 @@ void PlayingState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
bool exitPopup = ctx.showExitConfirmPopup && *ctx.showExitConfirmPopup;
bool countdown = (ctx.gameplayCountdownActive && *ctx.gameplayCountdownActive) ||
(ctx.menuPlayCountdownArmed && *ctx.menuPlayCountdownArmed);
bool challengeClearFx = ctx.challengeClearFxActive && *ctx.challengeClearFxActive;
const std::vector<int>* challengeClearOrder = ctx.challengeClearFxOrder;
double challengeClearElapsed = ctx.challengeClearFxElapsedMs ? *ctx.challengeClearFxElapsedMs : 0.0;
double challengeClearDuration = ctx.challengeClearFxDurationMs ? *ctx.challengeClearFxDurationMs : 0.0;
// Only blur if paused AND NOT in countdown (and not exit popup, though exit popup implies paused)
// Actually, exit popup should probably still blur/dim.
// But countdown should definitely NOT show the "PAUSED" overlay.
bool shouldBlur = paused && !countdown;
bool shouldBlur = paused && !countdown && !challengeClearFx;
if (shouldBlur && m_renderTarget) {
// Render game to texture
@ -260,8 +264,12 @@ void PlayingState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
1200.0f, // LOGICAL_W
1000.0f, // LOGICAL_H
logicalScale,
(float)winW,
(float)winH
(float)winW,
(float)winH,
challengeClearFx,
challengeClearOrder,
challengeClearElapsed,
challengeClearDuration
);
// Reset to screen
@ -351,7 +359,11 @@ void PlayingState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
1000.0f,
logicalScale,
(float)winW,
(float)winH
(float)winH,
challengeClearFx,
challengeClearOrder,
challengeClearElapsed,
challengeClearDuration
);
}
}