mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-02 15:16:46 +00:00
GRAPHICS: Use override and final keywords
This commit is contained in:
parent
e50e010a9e
commit
6a6cdc2bce
@ -27,16 +27,16 @@
|
||||
class DotMatrixPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
DotMatrixPlugin();
|
||||
virtual void initialize(const Graphics::PixelFormat &format);
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 0; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual void initialize(const Graphics::PixelFormat &format) override;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 0; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
private:
|
||||
// Allocate enough for 32bpp formats
|
||||
uint32 lookup[16];
|
||||
|
@ -28,21 +28,21 @@ class EdgePlugin : public SourceScaler {
|
||||
public:
|
||||
|
||||
EdgePlugin();
|
||||
virtual void initialize(const Graphics::PixelFormat &format);
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual bool useOldSource() const { return true; }
|
||||
virtual uint extraPixels() const { return 1; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual void initialize(const Graphics::PixelFormat &format) override;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual bool useOldSource() const override { return true; }
|
||||
virtual uint extraPixels() const override { return 1; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void internScale(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch,
|
||||
const uint8 *oldSrcPtr, uint32 oldSrcPitch,
|
||||
int width, int height, const uint8 *buffer, uint32 bufferPitch);
|
||||
int width, int height, const uint8 *buffer, uint32 bufferPitch) override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -27,17 +27,17 @@
|
||||
class HQPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
HQPlugin();
|
||||
virtual void initialize(const Graphics::PixelFormat &format);
|
||||
virtual void deinitialize();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 1; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual void initialize(const Graphics::PixelFormat &format) override;
|
||||
virtual void deinitialize() override;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 1; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -27,15 +27,15 @@
|
||||
class NormalPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
NormalPlugin();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return true; }
|
||||
virtual uint extraPixels() const { return 0; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return true; }
|
||||
virtual uint extraPixels() const override { return 0; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -28,13 +28,13 @@ class PMPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
PMPlugin();
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 1; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 1; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -27,43 +27,43 @@
|
||||
class SAIPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
SAIPlugin();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 2; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 2; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
};
|
||||
|
||||
class SuperSAIPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
SuperSAIPlugin();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 2; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 2; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
};
|
||||
|
||||
class SuperEaglePlugin : public ScalerPluginObject {
|
||||
public:
|
||||
SuperEaglePlugin();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 2; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 2; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
protected:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -45,13 +45,13 @@ class AdvMamePlugin : public ScalerPluginObject {
|
||||
public:
|
||||
AdvMamePlugin();
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return true; }
|
||||
virtual uint extraPixels() const { return 4; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return true; }
|
||||
virtual uint extraPixels() const override { return 4; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -27,15 +27,15 @@
|
||||
class TVPlugin : public ScalerPluginObject {
|
||||
public:
|
||||
TVPlugin();
|
||||
virtual uint increaseFactor();
|
||||
virtual uint decreaseFactor();
|
||||
virtual bool canDrawCursor() const { return false; }
|
||||
virtual uint extraPixels() const { return 0; }
|
||||
virtual const char *getName() const;
|
||||
virtual const char *getPrettyName() const;
|
||||
virtual uint increaseFactor() override;
|
||||
virtual uint decreaseFactor() override;
|
||||
virtual bool canDrawCursor() const override { return false; }
|
||||
virtual uint extraPixels() const override { return 0; }
|
||||
virtual const char *getName() const override;
|
||||
virtual const char *getPrettyName() const override;
|
||||
private:
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch,
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) override;
|
||||
template<typename ColorMask>
|
||||
void scaleIntern(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
|
||||
uint32 dstPitch, int width, int height);
|
||||
|
@ -161,16 +161,16 @@ public:
|
||||
SourceScaler();
|
||||
virtual ~SourceScaler();
|
||||
|
||||
virtual void deinitialize();
|
||||
virtual void deinitialize() override;
|
||||
|
||||
virtual void setSource(const byte *src, uint pitch, int width, int height, int padding);
|
||||
virtual void setSource(const byte *src, uint pitch, int width, int height, int padding) final;
|
||||
|
||||
virtual void enableSource(bool enable) { _enable = enable; }
|
||||
virtual void enableSource(bool enable) final { _enable = enable; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
|
||||
uint32 dstPitch, int width, int height, int x, int y);
|
||||
uint32 dstPitch, int width, int height, int x, int y) final;
|
||||
|
||||
/**
|
||||
* Scalers must implement this function. It will be called by oldSrcScale.
|
||||
|
Loading…
Reference in New Issue
Block a user