forked from jaildesigner-jailgames/jaildoctors_dilemma
mogut options.section a SceneManager
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
|
||||
// Forward declarations from Options namespace
|
||||
namespace Options {
|
||||
enum class Scene;
|
||||
enum class SceneOptions;
|
||||
enum class ControlScheme;
|
||||
enum class NotificationPosition;
|
||||
} // namespace Options
|
||||
@@ -65,12 +63,6 @@ constexpr Options::NotificationPosition NOTIFICATION_POSITION = Options::Notific
|
||||
constexpr bool NOTIFICATION_SOUND = true; // Sonido de las notificaciones por defecto
|
||||
const Uint8 NOTIFICATION_COLOR = static_cast<Uint8>(PaletteColor::BLUE); // Color de las notificaciones por defecto
|
||||
|
||||
// =============================================================================
|
||||
// SCENE
|
||||
// =============================================================================
|
||||
constexpr Options::Scene SCENE = Options::Scene::LOGO; // Sección por defecto
|
||||
constexpr Options::SceneOptions SUBSECTION = Options::SceneOptions::LOGO_TO_INTRO; // Subsección por defecto
|
||||
|
||||
// =============================================================================
|
||||
// CONTROL
|
||||
// =============================================================================
|
||||
|
||||
@@ -26,18 +26,14 @@ Notification notifications; // Opciones relativas a las notificaciones;
|
||||
Window window; // Opciones relativas a la ventana
|
||||
Audio audio; // Opciones relativas al audio
|
||||
ControlScheme keys; // Teclas usadas para jugar
|
||||
SceneState section; // Sección actual del programa
|
||||
|
||||
bool setOptions(const std::string& var, const std::string& value);
|
||||
|
||||
// Crea e inicializa las opciones del programa
|
||||
void init() {
|
||||
|
||||
#ifdef DEBUG
|
||||
section = SceneState(Scene::ENDING2, SceneOptions::LOGO_TO_INTRO);
|
||||
console = true;
|
||||
#else
|
||||
section = SceneState(Scene::LOGO, SceneOptions::LOGO_TO_INTRO);
|
||||
console = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -20,29 +20,6 @@ constexpr int convertVolume(int volume_percent) {
|
||||
}
|
||||
} // namespace VolumeHelpers
|
||||
|
||||
// Secciones del programa
|
||||
enum class Scene {
|
||||
LOGO,
|
||||
LOADING_SCREEN,
|
||||
TITLE,
|
||||
CREDITS,
|
||||
GAME,
|
||||
DEMO,
|
||||
GAME_OVER,
|
||||
ENDING,
|
||||
ENDING2,
|
||||
QUIT
|
||||
};
|
||||
|
||||
// Subsecciones
|
||||
enum class SceneOptions {
|
||||
NONE,
|
||||
LOGO_TO_INTRO,
|
||||
LOGO_TO_TITLE,
|
||||
TITLE_WITH_LOADING_SCREEN,
|
||||
TITLE_WITHOUT_LOADING_SCREEN
|
||||
};
|
||||
|
||||
// Posiciones de las notificaciones
|
||||
enum class NotificationPosition {
|
||||
UPPER_LEFT,
|
||||
@@ -125,22 +102,6 @@ struct Notification {
|
||||
}
|
||||
};
|
||||
|
||||
// Estructura para saber la seccion y subseccion del programa
|
||||
struct SceneState {
|
||||
Scene section;
|
||||
SceneOptions subsection;
|
||||
|
||||
// Constructor por defecto
|
||||
SceneState()
|
||||
: section(GameDefaults::SCENE),
|
||||
subsection(GameDefaults::SUBSECTION) {}
|
||||
|
||||
// Constructor
|
||||
SceneState(Scene scene, SceneOptions scene_options)
|
||||
: section(scene),
|
||||
subsection(scene_options) {}
|
||||
};
|
||||
|
||||
// Estructura para albergar trucos
|
||||
struct Cheat {
|
||||
enum class State : bool {
|
||||
@@ -362,7 +323,6 @@ extern Notification notifications; // Opciones relativas a las notificaciones;
|
||||
extern Window window; // Opciones relativas a la ventana
|
||||
extern Audio audio; // Opciones relativas al audio
|
||||
extern ControlScheme keys; // Teclas usadas para jugar
|
||||
extern SceneState section; // Sección actual del programa
|
||||
|
||||
// --- Funciones ---
|
||||
void init(); // Crea e inicializa las opciones del programa
|
||||
|
||||
Reference in New Issue
Block a user