manuals tidy tier 2: empty-catch, enum-size, trivially-destructible
This commit is contained in:
@@ -26,14 +26,14 @@ struct SDLFreeDeleter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// --- Public Enums ---
|
// --- Public Enums ---
|
||||||
enum JA_Channel_state {
|
enum JA_Channel_state : std::uint8_t {
|
||||||
JA_CHANNEL_INVALID,
|
JA_CHANNEL_INVALID,
|
||||||
JA_CHANNEL_FREE,
|
JA_CHANNEL_FREE,
|
||||||
JA_CHANNEL_PLAYING,
|
JA_CHANNEL_PLAYING,
|
||||||
JA_CHANNEL_PAUSED,
|
JA_CHANNEL_PAUSED,
|
||||||
JA_SOUND_DISABLED,
|
JA_SOUND_DISABLED,
|
||||||
};
|
};
|
||||||
enum JA_Music_state {
|
enum JA_Music_state : std::uint8_t {
|
||||||
JA_MUSIC_INVALID,
|
JA_MUSIC_INVALID,
|
||||||
JA_MUSIC_PLAYING,
|
JA_MUSIC_PLAYING,
|
||||||
JA_MUSIC_PAUSED,
|
JA_MUSIC_PAUSED,
|
||||||
@@ -42,7 +42,7 @@ enum JA_Music_state {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// --- Struct Definitions ---
|
// --- Struct Definitions ---
|
||||||
enum {
|
enum : std::uint8_t {
|
||||||
JA_MAX_SIMULTANEOUS_CHANNELS = 20,
|
JA_MAX_SIMULTANEOUS_CHANNELS = 20,
|
||||||
JA_MAX_GROUPS = 2
|
JA_MAX_GROUPS = 2
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ auto JD8_LoadSurface(const char* file) -> JD8_Surface {
|
|||||||
memcpy(image, cached.data(), 64000);
|
memcpy(image, cached.data(), 64000);
|
||||||
return image;
|
return image;
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
// No està al cache (asset no llistat al manifest). Fallback.
|
// @INTENTIONAL: no està al cache (asset no llistat al manifest), fallback al loader.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ auto JD8_LoadPalette(const char* file) -> JD8_Palette {
|
|||||||
memcpy(palette, cached.data(), 768);
|
memcpy(palette, cached.data(), 768);
|
||||||
return palette;
|
return palette;
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
// No està al cache — fallback a lectura + LoadPalette.
|
// @INTENTIONAL: no està al cache, fallback a lectura + LoadPalette.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ void JD8_SetPaletteColor(Uint8 index, Uint8 r, Uint8 g, Uint8 b) {
|
|||||||
// el caller decideix quan fer Flip.
|
// el caller decideix quan fer Flip.
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
enum class FadeType {
|
enum class FadeType : std::uint8_t {
|
||||||
None = 0,
|
None = 0,
|
||||||
Out,
|
Out,
|
||||||
ToPal,
|
ToPal,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
void JI_DisableKeyboard(Uint32 time);
|
void JI_DisableKeyboard(Uint32 time);
|
||||||
|
|
||||||
// Bloqueja tot l'input cap al joc (JI_KeyPressed retorna false per a tot)
|
// Bloqueja tot l'input cap al joc (JI_KeyPressed retorna false per a tot)
|
||||||
@@ -9,7 +11,7 @@ void JI_SetInputBlocked(bool blocked);
|
|||||||
// Estableix l'estat d'una tecla virtual. Múltiples fonts (gamepad, remap)
|
// Estableix l'estat d'una tecla virtual. Múltiples fonts (gamepad, remap)
|
||||||
// s'agrupen per OR. JI_KeyPressed retorna true si el teclat real O qualsevol
|
// s'agrupen per OR. JI_KeyPressed retorna true si el teclat real O qualsevol
|
||||||
// font virtual està premuda.
|
// font virtual està premuda.
|
||||||
enum JI_VirtualSource {
|
enum JI_VirtualSource : std::uint8_t {
|
||||||
JI_VSRC_GAMEPAD = 0,
|
JI_VSRC_GAMEPAD = 0,
|
||||||
JI_VSRC_REMAP = 1,
|
JI_VSRC_REMAP = 1,
|
||||||
JI_VSRC_COUNT = 2
|
JI_VSRC_COUNT = 2
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ namespace Locale {
|
|||||||
} else if (node.is_scalar()) {
|
} else if (node.is_scalar()) {
|
||||||
try {
|
try {
|
||||||
strings_[prefix] = node.get_value<std::string>();
|
strings_[prefix] = node.get_value<std::string>();
|
||||||
} catch (...) {}
|
} catch (...) {
|
||||||
|
// @INTENTIONAL: si el valor no és string vàlid, l'ignorem i continuem.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace Menu {
|
|||||||
static constexpr float HEIGHT_RATE = 12.0F; // smoothing exponencial de l'alçada (~150 ms al 90%)
|
static constexpr float HEIGHT_RATE = 12.0F; // smoothing exponencial de l'alçada (~150 ms al 90%)
|
||||||
|
|
||||||
// --- Items ---
|
// --- Items ---
|
||||||
enum class ItemKind { Toggle,
|
enum class ItemKind : std::uint8_t { Toggle,
|
||||||
Cycle,
|
Cycle,
|
||||||
IntRange,
|
IntRange,
|
||||||
Submenu,
|
Submenu,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Overlay {
|
|||||||
|
|
||||||
// --- Estat de les notificacions ---
|
// --- Estat de les notificacions ---
|
||||||
|
|
||||||
enum class Status { RISING,
|
enum class Status : std::uint8_t { RISING,
|
||||||
STAY,
|
STAY,
|
||||||
VANISHING,
|
VANISHING,
|
||||||
FINISHED };
|
FINISHED };
|
||||||
@@ -73,7 +73,7 @@ namespace Overlay {
|
|||||||
|
|
||||||
// --- Crèdits cinematogràfics ---
|
// --- Crèdits cinematogràfics ---
|
||||||
// Usen el sistema de notificacions en posició TOP_CENTER_DROP.
|
// Usen el sistema de notificacions en posició TOP_CENTER_DROP.
|
||||||
enum class CreditsPhase { IDLE,
|
enum class CreditsPhase : std::uint8_t { IDLE,
|
||||||
DELAY,
|
DELAY,
|
||||||
PLAYING_1,
|
PLAYING_1,
|
||||||
GAP,
|
GAP,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@
|
|||||||
namespace Rendering {
|
namespace Rendering {
|
||||||
|
|
||||||
/** @brief Identificador del shader de post-procesado activo */
|
/** @brief Identificador del shader de post-procesado activo */
|
||||||
enum class ShaderType { POSTFX,
|
enum class ShaderType : std::uint8_t { POSTFX,
|
||||||
CRTPI };
|
CRTPI };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -42,7 +43,7 @@ namespace Resource {
|
|||||||
private:
|
private:
|
||||||
Cache() = default;
|
Cache() = default;
|
||||||
|
|
||||||
enum class LoadStage {
|
enum class LoadStage : std::uint8_t {
|
||||||
MUSICS,
|
MUSICS,
|
||||||
SOUNDS,
|
SOUNDS,
|
||||||
BITMAPS,
|
BITMAPS,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
@@ -13,7 +14,7 @@ namespace Resource {
|
|||||||
// iterar per categoria a l'hora de carregar.
|
// iterar per categoria a l'hora de carregar.
|
||||||
class List {
|
class List {
|
||||||
public:
|
public:
|
||||||
enum class Type : int {
|
enum class Type : std::uint8_t {
|
||||||
DATA,
|
DATA,
|
||||||
BITMAP,
|
BITMAP,
|
||||||
MUSIC,
|
MUSIC,
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
#include "game/info.hpp"
|
#include "game/info.hpp"
|
||||||
#include "game/prota.hpp"
|
#include "game/prota.hpp"
|
||||||
|
|
||||||
enum {
|
enum : std::uint8_t {
|
||||||
CONTE_RES = 0,
|
CONTE_RES = 0,
|
||||||
CONTE_TRESOR = 1,
|
CONTE_TRESOR = 1,
|
||||||
CONTE_FARAO = 2,
|
CONTE_FARAO = 2,
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Marcador::Marcador(JD8_Surface gfx, Prota* sam) {
|
|||||||
this->sam = sam;
|
this->sam = sam;
|
||||||
}
|
}
|
||||||
|
|
||||||
Marcador::~Marcador() = default;
|
|
||||||
|
|
||||||
void Marcador::draw() {
|
void Marcador::draw() {
|
||||||
if (info::ctx.num_piramide < 6) {
|
if (info::ctx.num_piramide < 6) {
|
||||||
this->pintaNumero(55, 2, info::ctx.num_piramide);
|
this->pintaNumero(55, 2, info::ctx.num_piramide);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
class Marcador {
|
class Marcador {
|
||||||
public:
|
public:
|
||||||
explicit Marcador(JD8_Surface gfx, Prota* sam);
|
explicit Marcador(JD8_Surface gfx, Prota* sam);
|
||||||
~Marcador();
|
~Marcador() = default;
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ class ModuleGame : public scenes::Scene {
|
|||||||
[[nodiscard]] auto nextState() const -> int override;
|
[[nodiscard]] auto nextState() const -> int override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase : std::uint8_t {
|
||||||
FadingIn,
|
FadingIn,
|
||||||
Playing,
|
Playing,
|
||||||
FadingOut,
|
FadingOut,
|
||||||
|
|||||||
+15
-7
@@ -441,7 +441,9 @@ namespace Options {
|
|||||||
if (node.contains(key)) {
|
if (node.contains(key)) {
|
||||||
try {
|
try {
|
||||||
target = node[key].get_value<float>();
|
target = node[key].get_value<float>();
|
||||||
} catch (...) {}
|
} catch (...) {
|
||||||
|
// @INTENTIONAL: si el camp YAML no és float vàlid, mantenim el valor per defecte.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,32 +563,38 @@ namespace Options {
|
|||||||
if (p.contains("mask_type")) {
|
if (p.contains("mask_type")) {
|
||||||
try {
|
try {
|
||||||
preset.mask_type = p["mask_type"].get_value<int>();
|
preset.mask_type = p["mask_type"].get_value<int>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p.contains("enable_scanlines")) {
|
if (p.contains("enable_scanlines")) {
|
||||||
try {
|
try {
|
||||||
preset.enable_scanlines = p["enable_scanlines"].get_value<bool>();
|
preset.enable_scanlines = p["enable_scanlines"].get_value<bool>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p.contains("enable_multisample")) {
|
if (p.contains("enable_multisample")) {
|
||||||
try {
|
try {
|
||||||
preset.enable_multisample = p["enable_multisample"].get_value<bool>();
|
preset.enable_multisample = p["enable_multisample"].get_value<bool>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p.contains("enable_gamma")) {
|
if (p.contains("enable_gamma")) {
|
||||||
try {
|
try {
|
||||||
preset.enable_gamma = p["enable_gamma"].get_value<bool>();
|
preset.enable_gamma = p["enable_gamma"].get_value<bool>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p.contains("enable_curvature")) {
|
if (p.contains("enable_curvature")) {
|
||||||
try {
|
try {
|
||||||
preset.enable_curvature = p["enable_curvature"].get_value<bool>();
|
preset.enable_curvature = p["enable_curvature"].get_value<bool>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p.contains("enable_sharper")) {
|
if (p.contains("enable_sharper")) {
|
||||||
try {
|
try {
|
||||||
preset.enable_sharper = p["enable_sharper"].get_value<bool>();
|
preset.enable_sharper = p["enable_sharper"].get_value<bool>();
|
||||||
} catch (...) {}
|
} catch (...) { /* @INTENTIONAL: camp YAML invàlid, mantenim el valor per defecte. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
crtpi_presets.push_back(preset);
|
crtpi_presets.push_back(preset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -19,17 +20,17 @@ namespace Options {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Posició del render info
|
// Posició del render info
|
||||||
enum class RenderInfoPosition { OFF = 0,
|
enum class RenderInfoPosition : std::uint8_t { OFF = 0,
|
||||||
TOP = 1,
|
TOP = 1,
|
||||||
BOTTOM = 2 };
|
BOTTOM = 2 };
|
||||||
|
|
||||||
// Filtre de textura per a l'upscale final (sempre, no només en 4:3)
|
// Filtre de textura per a l'upscale final (sempre, no només en 4:3)
|
||||||
enum class TextureFilter { NEAREST = 0,
|
enum class TextureFilter : std::uint8_t { NEAREST = 0,
|
||||||
LINEAR = 1 };
|
LINEAR = 1 };
|
||||||
|
|
||||||
// Mode de presentació lògica (escala finestra): mapeja directament
|
// Mode de presentació lògica (escala finestra): mapeja directament
|
||||||
// als valors de SDL_RendererLogicalPresentation.
|
// als valors de SDL_RendererLogicalPresentation.
|
||||||
enum class ScalingMode { DISABLED = 0,
|
enum class ScalingMode : std::uint8_t { DISABLED = 0,
|
||||||
STRETCH = 1,
|
STRETCH = 1,
|
||||||
LETTERBOX = 2,
|
LETTERBOX = 2,
|
||||||
OVERSCAN = 3,
|
OVERSCAN = 3,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
#include "game/scenes/scene.hpp"
|
#include "game/scenes/scene.hpp"
|
||||||
#include "game/scenes/surface_handle.hpp"
|
#include "game/scenes/surface_handle.hpp"
|
||||||
@@ -26,7 +28,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto nextState() const -> int override { return 0; }
|
[[nodiscard]] auto nextState() const -> int override { return 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase { FadingIn,
|
enum class Phase : std::uint8_t { FadingIn,
|
||||||
Showing,
|
Showing,
|
||||||
FadingOut,
|
FadingOut,
|
||||||
Done };
|
Done };
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
#include "game/scenes/frame_animator.hpp"
|
#include "game/scenes/frame_animator.hpp"
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
@@ -31,7 +33,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase { Rolling,
|
enum class Phase : std::uint8_t { Rolling,
|
||||||
FadingOut,
|
FadingOut,
|
||||||
Done };
|
Done };
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
@@ -39,7 +40,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase : std::uint8_t {
|
||||||
Initial, // pantalla negra 1000 ms
|
Initial, // pantalla negra 1000 ms
|
||||||
Revealing, // 9 × 2 frames × 150 ms cada un
|
Revealing, // 9 × 2 frames × 150 ms cada un
|
||||||
FullLogoFlash, // logo complet + cursor, 200 ms
|
FullLogoFlash, // logo complet + cursor, 200 ms
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
@@ -40,7 +41,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase : std::uint8_t {
|
||||||
InitialWait, // 1000 ms pantalla negra
|
InitialWait, // 1000 ms pantalla negra
|
||||||
Reveal, // 15 passos del wordmark
|
Reveal, // 15 passos del wordmark
|
||||||
PaletteCycle, // 256 × 20 ms mutant pal[16..31]
|
PaletteCycle, // 256 × 20 ms mutant pal[16..31]
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "game/scenes/frame_animator.hpp"
|
#include "game/scenes/frame_animator.hpp"
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
#include "game/scenes/scene.hpp"
|
#include "game/scenes/scene.hpp"
|
||||||
@@ -29,7 +31,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase { FadingIn,
|
enum class Phase : std::uint8_t { FadingIn,
|
||||||
Showing,
|
Showing,
|
||||||
FadingOut,
|
FadingOut,
|
||||||
Done };
|
Done };
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
#include "game/scenes/scene.hpp"
|
#include "game/scenes/scene.hpp"
|
||||||
#include "game/scenes/surface_handle.hpp"
|
#include "game/scenes/surface_handle.hpp"
|
||||||
@@ -21,7 +23,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
[[nodiscard]] auto done() const -> bool override { return phase_ == Phase::Done; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase { FadingIn,
|
enum class Phase : std::uint8_t { FadingIn,
|
||||||
Showing,
|
Showing,
|
||||||
FadingOut,
|
FadingOut,
|
||||||
Done };
|
Done };
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
#include "game/scenes/scene.hpp"
|
#include "game/scenes/scene.hpp"
|
||||||
@@ -35,7 +37,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto nextState() const -> int override { return 0; }
|
[[nodiscard]] auto nextState() const -> int override { return 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase : std::uint8_t {
|
||||||
InitialFadeOut,
|
InitialFadeOut,
|
||||||
Tomba1ScrollIn,
|
Tomba1ScrollIn,
|
||||||
Tomba1Hold,
|
Tomba1Hold,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "core/jail/jdraw8.hpp"
|
#include "core/jail/jdraw8.hpp"
|
||||||
#include "game/scenes/palette_fade.hpp"
|
#include "game/scenes/palette_fade.hpp"
|
||||||
#include "game/scenes/scene.hpp"
|
#include "game/scenes/scene.hpp"
|
||||||
@@ -44,7 +46,7 @@ namespace scenes {
|
|||||||
[[nodiscard]] auto nextState() const -> int override { return next_state_; }
|
[[nodiscard]] auto nextState() const -> int override { return next_state_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Phase {
|
enum class Phase : std::uint8_t {
|
||||||
Slide1Enter,
|
Slide1Enter,
|
||||||
Slide1Hold,
|
Slide1Hold,
|
||||||
FadeOut1,
|
FadeOut1,
|
||||||
|
|||||||
Reference in New Issue
Block a user