added challenge level text

This commit is contained in:
2025-12-20 20:47:04 +01:00
parent 6c48af0bec
commit eb9822dac7
5 changed files with 190 additions and 4 deletions

View File

@ -269,7 +269,9 @@ void PlayingState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
challengeClearFx,
challengeClearOrder,
challengeClearElapsed,
challengeClearDuration
challengeClearDuration,
ctx.challengeStoryText,
ctx.challengeStoryAlpha ? *ctx.challengeStoryAlpha : 0.0f
);
// Reset to screen
@ -363,7 +365,9 @@ void PlayingState::render(SDL_Renderer* renderer, float logicalScale, SDL_Rect l
challengeClearFx,
challengeClearOrder,
challengeClearElapsed,
challengeClearDuration
challengeClearDuration,
ctx.challengeStoryText,
ctx.challengeStoryAlpha ? *ctx.challengeStoryAlpha : 0.0f
);
}
}

View File

@ -73,6 +73,9 @@ struct StateContext {
double* challengeClearFxElapsedMs = nullptr;
double* challengeClearFxDurationMs = nullptr;
std::vector<int>* challengeClearFxOrder = nullptr;
std::string* challengeStoryText = nullptr; // Per-level briefing string for Challenge mode
int* challengeStoryLevel = nullptr; // Cached level for the current story line
float* challengeStoryAlpha = nullptr; // Current render alpha for story text fade
std::string* playerName = nullptr; // Shared player name buffer for highscores/options
bool* fullscreenFlag = nullptr; // Tracks current fullscreen state when available
std::function<void(bool)> applyFullscreen; // Allows states to request fullscreen changes