5871d29d48
Tots els tipus, fitxers, namespace, enums i metodes relacionats amb
les escenes passen del catala a l'angles seguint el .clang-tidy:
Fitxers (renames git):
- source/game/escenes/escena_joc.{hpp,cpp} -> game/scenes/game_scene.{hpp,cpp}
- source/game/escenes/escena_titol.{hpp,cpp} -> game/scenes/title_scene.{hpp,cpp}
- source/game/escenes/escena_logo.{hpp,cpp} -> game/scenes/logo_scene.{hpp,cpp}
- source/core/system/context_escenes.hpp -> core/system/scene_context.hpp
- Carpeta game/escenes/ -> game/scenes/
Tipus (CamelCase):
- EscenaJoc -> GameScene
- EscenaTitol -> TitleScene
- EscenaLogo -> LogoScene
- ContextEscenes -> SceneContext
- Escena (enum class) -> SceneType
- Opcio -> Option
- EstatGameOver -> GameOverState
- EstatTitol -> TitleState
- EstatAnimacio -> AnimationState
- ConfigPartida -> MatchConfig
Namespace:
- GestorEscenes -> SceneManager
Valors d'enum SceneType:
- TITOL -> TITLE
- JOC -> GAME
- EIXIR -> EXIT
(LOGO mantingut)
Metodes (camelBack):
- executar -> run
- canviar_escena -> setNextScene
- escena_desti -> nextScene
- opcio (getter) -> option
- consumir_opcio -> consumeOption
- reset_opcio -> resetOption
- set_config_partida -> setMatchConfig
- get_config_partida -> getMatchConfig
Camps privats (lower_case_):
- escena_desti_ -> next_scene_
- opcio_ -> option_
- config_partida_ -> match_config_
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
509 B
C++
20 lines
509 B
C++
// global_events.hpp - Events globals del joc
|
|
// Basat en el patró del projecte "pollo"
|
|
// © 2025 Port a C++20
|
|
|
|
#pragma once
|
|
|
|
#include <SDL3/SDL.h>
|
|
|
|
// Forward declarations
|
|
class SDLManager;
|
|
namespace SceneManager {
|
|
class SceneContext;
|
|
}
|
|
|
|
namespace GlobalEvents {
|
|
// Processa events globals (F1/F2/F3/ESC/QUIT)
|
|
// Retorna true si l'event ha estat processat i no cal seguir processant-lo
|
|
bool handle(const SDL_Event& event, SDLManager& sdl, SceneManager::SceneContext& context);
|
|
} // namespace GlobalEvents
|