Added intro video

This commit is contained in:
2025-12-25 09:38:06 +01:00
parent d28feb3276
commit 14cb96345c
16 changed files with 859 additions and 15 deletions

View File

@ -156,9 +156,19 @@ void StateManager::render(RenderManager& renderer) {
}
bool StateManager::isValidState(AppState state) const {
// All enum values are currently valid
return static_cast<int>(state) >= static_cast<int>(AppState::Loading) &&
static_cast<int>(state) <= static_cast<int>(AppState::GameOver);
switch (state) {
case AppState::Loading:
case AppState::Video:
case AppState::Menu:
case AppState::Options:
case AppState::LevelSelector:
case AppState::Playing:
case AppState::LevelSelect:
case AppState::GameOver:
return true;
default:
return false;
}
}
bool StateManager::canTransitionTo(AppState newState) const {
@ -169,6 +179,7 @@ bool StateManager::canTransitionTo(AppState newState) const {
const char* StateManager::getStateName(AppState state) const {
switch (state) {
case AppState::Loading: return "Loading";
case AppState::Video: return "Video";
case AppState::Menu: return "Menu";
case AppState::Options: return "Options";
case AppState::LevelSelector: return "LevelSelector";