mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 20:49:11 +00:00
Codechange: Use enum class for PaletteAnimation.
This commit is contained in:
@@ -532,7 +532,7 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
|
||||
|
||||
Blitter::PaletteAnimation Blitter_32bppAnim::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_BLITTER;
|
||||
return Blitter::PaletteAnimation::Blitter;
|
||||
}
|
||||
|
||||
void Blitter_32bppAnim::PostResize()
|
||||
|
||||
@@ -152,5 +152,5 @@ void Blitter_32bppBase::PaletteAnimate(const Palette &)
|
||||
|
||||
Blitter::PaletteAnimation Blitter_32bppBase::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_NONE;
|
||||
return Blitter::PaletteAnimation::None;
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ size_t Blitter_40bppAnim::BufferSize(uint width, uint height)
|
||||
|
||||
Blitter::PaletteAnimation Blitter_40bppAnim::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_VIDEO_BACKEND;
|
||||
return Blitter::PaletteAnimation::VideoBackend;
|
||||
}
|
||||
|
||||
bool Blitter_40bppAnim::NeedsAnimationBuffer()
|
||||
|
||||
@@ -156,5 +156,5 @@ void Blitter_8bppBase::PaletteAnimate(const Palette &)
|
||||
|
||||
Blitter::PaletteAnimation Blitter_8bppBase::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_VIDEO_BACKEND;
|
||||
return Blitter::PaletteAnimation::VideoBackend;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
};
|
||||
|
||||
/** Types of palette animation. */
|
||||
enum PaletteAnimation {
|
||||
PALETTE_ANIMATION_NONE, ///< No palette animation
|
||||
PALETTE_ANIMATION_VIDEO_BACKEND, ///< Palette animation should be done by video backend (8bpp only!)
|
||||
PALETTE_ANIMATION_BLITTER, ///< The blitter takes care of the palette animation
|
||||
enum class PaletteAnimation : uint8_t {
|
||||
None, ///< No palette animation
|
||||
VideoBackend, ///< Palette animation should be done by video backend (8bpp only!)
|
||||
Blitter, ///< The blitter takes care of the palette animation
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
void ScrollBuffer(void *, int &, int &, int &, int &, int, int) override {};
|
||||
size_t BufferSize(uint, uint) override { return 0; };
|
||||
void PaletteAnimate(const Palette &) override { };
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override { return Blitter::PALETTE_ANIMATION_NONE; };
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override { return Blitter::PaletteAnimation::None; };
|
||||
|
||||
std::string_view GetName() override { return "null"; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user