summaryrefslogtreecommitdiff
path: root/src/blitter
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-03-03 22:25:13 +0000
committerMichael Lutz <michi@icosahedron.de>2019-03-24 16:10:04 +0100
commitaf7d9020a15c1b1a14b3981ac73c70d2e58cc877 (patch)
tree1dcff3e01382ea3a0a4733a4637659dbbfd4bad5 /src/blitter
parent31260e66252fb4d0dda6f992520faeeb96929cfe (diff)
downloadopenttd-af7d9020a15c1b1a14b3981ac73c70d2e58cc877.tar.xz
Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/32bpp_anim.hpp30
-rw-r--r--src/blitter/32bpp_anim_sse2.hpp6
-rw-r--r--src/blitter/32bpp_anim_sse4.hpp10
-rw-r--r--src/blitter/32bpp_base.hpp26
-rw-r--r--src/blitter/32bpp_optimized.hpp8
-rw-r--r--src/blitter/32bpp_simple.hpp10
-rw-r--r--src/blitter/32bpp_sse2.hpp8
-rw-r--r--src/blitter/32bpp_sse4.hpp6
-rw-r--r--src/blitter/32bpp_ssse3.hpp6
-rw-r--r--src/blitter/8bpp_base.hpp28
-rw-r--r--src/blitter/8bpp_optimized.hpp8
-rw-r--r--src/blitter/8bpp_simple.hpp8
-rw-r--r--src/blitter/null.hpp38
13 files changed, 96 insertions, 96 deletions
diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp
index ecf6dcfca..f8fd89281 100644
--- a/src/blitter/32bpp_anim.hpp
+++ b/src/blitter/32bpp_anim.hpp
@@ -37,21 +37,21 @@ public:
~Blitter_32bppAnim();
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
- /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
- /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash);
- /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
- /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
- /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
- /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
- /* virtual */ int BufferSize(int width, int height);
- /* virtual */ void PaletteAnimate(const Palette &palette);
- /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
+ void SetPixel(void *video, int x, int y, uint8 colour) override;
+ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override;
+ void DrawRect(void *video, int width, int height, uint8 colour) override;
+ void CopyFromBuffer(void *video, const void *src, int width, int height) override;
+ void CopyToBuffer(const void *video, void *dst, int width, int height) override;
+ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
+ int BufferSize(int width, int height) override;
+ void PaletteAnimate(const Palette &palette) override;
+ Blitter::PaletteAnimation UsePaletteAnimation() override;
- /* virtual */ const char *GetName() { return "32bpp-anim"; }
- /* virtual */ int GetBytesPerPixel() { return 6; }
- /* virtual */ void PostResize();
+ const char *GetName() override { return "32bpp-anim"; }
+ int GetBytesPerPixel() override { return 6; }
+ void PostResize() override;
/**
* Look up the colour in the current palette.
@@ -77,7 +77,7 @@ public:
class FBlitter_32bppAnim : public BlitterFactory {
public:
FBlitter_32bppAnim() : BlitterFactory("32bpp-anim", "32bpp Animation Blitter (palette animation)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppAnim(); }
};
#endif /* BLITTER_32BPP_ANIM_HPP */
diff --git a/src/blitter/32bpp_anim_sse2.hpp b/src/blitter/32bpp_anim_sse2.hpp
index 0d4a5f1e6..aed11026c 100644
--- a/src/blitter/32bpp_anim_sse2.hpp
+++ b/src/blitter/32bpp_anim_sse2.hpp
@@ -28,15 +28,15 @@
/** A partially 32 bpp blitter with palette animation. */
class Blitter_32bppSSE2_Anim : public Blitter_32bppAnim {
public:
- /* virtual */ void PaletteAnimate(const Palette &palette);
- /* virtual */ const char *GetName() { return "32bpp-sse2-anim"; }
+ void PaletteAnimate(const Palette &palette) override;
+ const char *GetName() override { return "32bpp-sse2-anim"; }
};
/** Factory for the partially 32bpp blitter with animation. */
class FBlitter_32bppSSE2_Anim : public BlitterFactory {
public:
FBlitter_32bppSSE2_Anim() : BlitterFactory("32bpp-sse2-anim", "32bpp partially SSE2 Animation Blitter (palette animation)", HasCPUIDFlag(1, 3, 26)) {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE2_Anim(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSSE2_Anim(); }
};
#endif /* WITH_SSE */
diff --git a/src/blitter/32bpp_anim_sse4.hpp b/src/blitter/32bpp_anim_sse4.hpp
index 5ff1fb01b..2fefd3001 100644
--- a/src/blitter/32bpp_anim_sse4.hpp
+++ b/src/blitter/32bpp_anim_sse4.hpp
@@ -35,19 +35,19 @@ private:
public:
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent, bool animated>
- /* virtual */ void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) {
+ void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override {
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
}
- /* virtual */ const char *GetName() { return "32bpp-sse4-anim"; }
+ const char *GetName() override { return "32bpp-sse4-anim"; }
};
/** Factory for the SSE4 32 bpp blitter (with palette animation). */
class FBlitter_32bppSSE4_Anim: public BlitterFactory {
public:
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE4_Anim(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSSE4_Anim(); }
};
#endif /* WITH_SSE */
diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp
index 697593da6..e481c15cc 100644
--- a/src/blitter/32bpp_base.hpp
+++ b/src/blitter/32bpp_base.hpp
@@ -20,19 +20,19 @@
/** Base for all 32bpp blitters. */
class Blitter_32bppBase : public Blitter {
public:
- /* virtual */ uint8 GetScreenDepth() { return 32; }
- /* virtual */ void *MoveTo(void *video, int x, int y);
- /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
- /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash);
- /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
- /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
- /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
- /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
- /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
- /* virtual */ int BufferSize(int width, int height);
- /* virtual */ void PaletteAnimate(const Palette &palette);
- /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
- /* virtual */ int GetBytesPerPixel() { return 4; }
+ uint8 GetScreenDepth() override { return 32; }
+ void *MoveTo(void *video, int x, int y) override;
+ void SetPixel(void *video, int x, int y, uint8 colour) override;
+ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override;
+ void DrawRect(void *video, int width, int height, uint8 colour) override;
+ void CopyFromBuffer(void *video, const void *src, int width, int height) override;
+ void CopyToBuffer(const void *video, void *dst, int width, int height) override;
+ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override;
+ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
+ int BufferSize(int width, int height) override;
+ void PaletteAnimate(const Palette &palette) override;
+ Blitter::PaletteAnimation UsePaletteAnimation() override;
+ int GetBytesPerPixel() override { return 4; }
/**
* Look up the colour in the current palette.
diff --git a/src/blitter/32bpp_optimized.hpp b/src/blitter/32bpp_optimized.hpp
index c261aa33d..fc8a40653 100644
--- a/src/blitter/32bpp_optimized.hpp
+++ b/src/blitter/32bpp_optimized.hpp
@@ -23,10 +23,10 @@ public:
byte data[]; ///< Data, all zoomlevels.
};
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
- /* virtual */ const char *GetName() { return "32bpp-optimized"; }
+ const char *GetName() override { return "32bpp-optimized"; }
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
};
@@ -35,7 +35,7 @@ public:
class FBlitter_32bppOptimized : public BlitterFactory {
public:
FBlitter_32bppOptimized() : BlitterFactory("32bpp-optimized", "32bpp Optimized Blitter (no palette animation)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppOptimized(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppOptimized(); }
};
#endif /* BLITTER_32BPP_OPTIMIZED_HPP */
diff --git a/src/blitter/32bpp_simple.hpp b/src/blitter/32bpp_simple.hpp
index 0751f6f75..3d43971e9 100644
--- a/src/blitter/32bpp_simple.hpp
+++ b/src/blitter/32bpp_simple.hpp
@@ -26,18 +26,18 @@ class Blitter_32bppSimple : public Blitter_32bppBase {
uint8 v; ///< Brightness-channel
};
public:
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
- /* virtual */ const char *GetName() { return "32bpp-simple"; }
+ const char *GetName() override { return "32bpp-simple"; }
};
/** Factory for the simple 32 bpp blitter. */
class FBlitter_32bppSimple : public BlitterFactory {
public:
FBlitter_32bppSimple() : BlitterFactory("32bpp-simple", "32bpp Simple Blitter (no palette animation)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSimple(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSimple(); }
};
#endif /* BLITTER_32BPP_SIMPLE_HPP */
diff --git a/src/blitter/32bpp_sse2.hpp b/src/blitter/32bpp_sse2.hpp
index d6b17f679..1628f1fa2 100644
--- a/src/blitter/32bpp_sse2.hpp
+++ b/src/blitter/32bpp_sse2.hpp
@@ -82,22 +82,22 @@ DECLARE_ENUM_AS_BIT_SET(Blitter_32bppSSE_Base::SpriteFlags);
/** The SSE2 32 bpp blitter (without palette animation). */
class Blitter_32bppSSE2 : public Blitter_32bppSimple, public Blitter_32bppSSE_Base {
public:
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) {
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override {
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
}
- /* virtual */ const char *GetName() { return "32bpp-sse2"; }
+ const char *GetName() override { return "32bpp-sse2"; }
};
/** Factory for the SSE2 32 bpp blitter (without palette animation). */
class FBlitter_32bppSSE2 : public BlitterFactory {
public:
FBlitter_32bppSSE2() : BlitterFactory("32bpp-sse2", "32bpp SSE2 Blitter (no palette animation)", HasCPUIDFlag(1, 3, 26)) {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE2(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSSE2(); }
};
#endif /* WITH_SSE */
diff --git a/src/blitter/32bpp_sse4.hpp b/src/blitter/32bpp_sse4.hpp
index 9c59d253f..36b5b16d4 100644
--- a/src/blitter/32bpp_sse4.hpp
+++ b/src/blitter/32bpp_sse4.hpp
@@ -27,17 +27,17 @@
/** The SSE4 32 bpp blitter (without palette animation). */
class Blitter_32bppSSE4 : public Blitter_32bppSSSE3 {
public:
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
- /* virtual */ const char *GetName() { return "32bpp-sse4"; }
+ const char *GetName() override { return "32bpp-sse4"; }
};
/** Factory for the SSE4 32 bpp blitter (without palette animation). */
class FBlitter_32bppSSE4: public BlitterFactory {
public:
FBlitter_32bppSSE4() : BlitterFactory("32bpp-sse4", "32bpp SSE4 Blitter (no palette animation)", HasCPUIDFlag(1, 2, 19)) {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE4(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSSE4(); }
};
#endif /* WITH_SSE */
diff --git a/src/blitter/32bpp_ssse3.hpp b/src/blitter/32bpp_ssse3.hpp
index e9cac8ff0..3d6152e9e 100644
--- a/src/blitter/32bpp_ssse3.hpp
+++ b/src/blitter/32bpp_ssse3.hpp
@@ -27,17 +27,17 @@
/** The SSSE3 32 bpp blitter (without palette animation). */
class Blitter_32bppSSSE3 : public Blitter_32bppSSE2 {
public:
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
- /* virtual */ const char *GetName() { return "32bpp-ssse3"; }
+ const char *GetName() override { return "32bpp-ssse3"; }
};
/** Factory for the SSSE3 32 bpp blitter (without palette animation). */
class FBlitter_32bppSSSE3: public BlitterFactory {
public:
FBlitter_32bppSSSE3() : BlitterFactory("32bpp-ssse3", "32bpp SSSE3 Blitter (no palette animation)", HasCPUIDFlag(1, 2, 9)) {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSSE3(); }
+ Blitter *CreateInstance() override { return new Blitter_32bppSSSE3(); }
};
#endif /* WITH_SSE */
diff --git a/src/blitter/8bpp_base.hpp b/src/blitter/8bpp_base.hpp
index 8f75dda5d..7ab3f6378 100644
--- a/src/blitter/8bpp_base.hpp
+++ b/src/blitter/8bpp_base.hpp
@@ -17,20 +17,20 @@
/** Base for all 8bpp blitters. */
class Blitter_8bppBase : public Blitter {
public:
- /* virtual */ uint8 GetScreenDepth() { return 8; }
- /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
- /* virtual */ void *MoveTo(void *video, int x, int y);
- /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
- /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash);
- /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
- /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
- /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
- /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
- /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
- /* virtual */ int BufferSize(int width, int height);
- /* virtual */ void PaletteAnimate(const Palette &palette);
- /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
- /* virtual */ int GetBytesPerPixel() { return 1; }
+ uint8 GetScreenDepth() override { return 8; }
+ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
+ void *MoveTo(void *video, int x, int y) override;
+ void SetPixel(void *video, int x, int y, uint8 colour) override;
+ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override;
+ void DrawRect(void *video, int width, int height, uint8 colour) override;
+ void CopyFromBuffer(void *video, const void *src, int width, int height) override;
+ void CopyToBuffer(const void *video, void *dst, int width, int height) override;
+ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override;
+ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
+ int BufferSize(int width, int height) override;
+ void PaletteAnimate(const Palette &palette) override;
+ Blitter::PaletteAnimation UsePaletteAnimation() override;
+ int GetBytesPerPixel() override { return 1; }
};
#endif /* BLITTER_8BPP_BASE_HPP */
diff --git a/src/blitter/8bpp_optimized.hpp b/src/blitter/8bpp_optimized.hpp
index b5b5324b9..509edb8c4 100644
--- a/src/blitter/8bpp_optimized.hpp
+++ b/src/blitter/8bpp_optimized.hpp
@@ -24,17 +24,17 @@ public:
byte data[]; ///< Data, all zoomlevels.
};
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
- /* virtual */ const char *GetName() { return "8bpp-optimized"; }
+ const char *GetName() override { return "8bpp-optimized"; }
};
/** Factory for the 8bpp blitter optimised for speed. */
class FBlitter_8bppOptimized : public BlitterFactory {
public:
FBlitter_8bppOptimized() : BlitterFactory("8bpp-optimized", "8bpp Optimized Blitter (compression + all-ZoomLevel cache)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_8bppOptimized(); }
+ Blitter *CreateInstance() override { return new Blitter_8bppOptimized(); }
};
#endif /* BLITTER_8BPP_OPTIMIZED_HPP */
diff --git a/src/blitter/8bpp_simple.hpp b/src/blitter/8bpp_simple.hpp
index c00c75ac0..e48bc3758 100644
--- a/src/blitter/8bpp_simple.hpp
+++ b/src/blitter/8bpp_simple.hpp
@@ -18,17 +18,17 @@
/** Most trivial 8bpp blitter. */
class Blitter_8bppSimple FINAL : public Blitter_8bppBase {
public:
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
- /* virtual */ const char *GetName() { return "8bpp-simple"; }
+ const char *GetName() override { return "8bpp-simple"; }
};
/** Factory for the most trivial 8bpp blitter. */
class FBlitter_8bppSimple : public BlitterFactory {
public:
FBlitter_8bppSimple() : BlitterFactory("8bpp-simple", "8bpp Simple Blitter (relative slow, but never wrong)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_8bppSimple(); }
+ Blitter *CreateInstance() override { return new Blitter_8bppSimple(); }
};
#endif /* BLITTER_8BPP_SIMPLE_HPP */
diff --git a/src/blitter/null.hpp b/src/blitter/null.hpp
index a6fed2ebc..8dc98646c 100644
--- a/src/blitter/null.hpp
+++ b/src/blitter/null.hpp
@@ -17,31 +17,31 @@
/** Blitter that does nothing. */
class Blitter_Null : public Blitter {
public:
- /* virtual */ uint8 GetScreenDepth() { return 0; }
- /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
- /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) {};
- /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
- /* virtual */ void *MoveTo(void *video, int x, int y) { return NULL; };
- /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
- /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {};
- /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) {};
- /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {};
- /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {};
- /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};
- /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
- /* virtual */ int BufferSize(int width, int height) { return 0; };
- /* virtual */ void PaletteAnimate(const Palette &palette) { };
- /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
-
- /* virtual */ const char *GetName() { return "null"; }
- /* virtual */ int GetBytesPerPixel() { return 0; }
+ uint8 GetScreenDepth() override { return 0; }
+ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override {};
+ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override {};
+ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) override;
+ void *MoveTo(void *video, int x, int y) override { return NULL; };
+ void SetPixel(void *video, int x, int y, uint8 colour) override {};
+ void DrawRect(void *video, int width, int height, uint8 colour) override {};
+ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override {};
+ void CopyFromBuffer(void *video, const void *src, int width, int height) override {};
+ void CopyToBuffer(const void *video, void *dst, int width, int height) override {};
+ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override {};
+ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override {};
+ int BufferSize(int width, int height) override { return 0; };
+ void PaletteAnimate(const Palette &palette) override { };
+ Blitter::PaletteAnimation UsePaletteAnimation() override { return Blitter::PALETTE_ANIMATION_NONE; };
+
+ const char *GetName() override { return "null"; }
+ int GetBytesPerPixel() override { return 0; }
};
/** Factory for the blitter that does nothing. */
class FBlitter_Null : public BlitterFactory {
public:
FBlitter_Null() : BlitterFactory("null", "Null Blitter (does nothing)") {}
- /* virtual */ Blitter *CreateInstance() { return new Blitter_Null(); }
+ Blitter *CreateInstance() override { return new Blitter_Null(); }
};
#endif /* BLITTER_NULL_HPP */