mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-27 16:39:09 +00:00
Codechange: Replicate cursor screen backup to chat message display, removing explicit memory management.
Incidentally, this makes Blitter::GetBytesPerPixel unneeed.
This commit is contained in:
@@ -48,7 +48,6 @@ public:
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override;
|
||||
|
||||
const char *GetName() override { return "32bpp-anim"; }
|
||||
int GetBytesPerPixel() override { return 6; }
|
||||
void PostResize() override;
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ public:
|
||||
size_t BufferSize(uint width, uint 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.
|
||||
|
@@ -33,7 +33,6 @@ public:
|
||||
bool NeedsAnimationBuffer() override;
|
||||
|
||||
const char *GetName() override { return "40bpp-anim"; }
|
||||
int GetBytesPerPixel() override { return 5; }
|
||||
|
||||
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
|
||||
|
@@ -28,7 +28,6 @@ public:
|
||||
size_t BufferSize(uint width, uint height) override;
|
||||
void PaletteAnimate(const Palette &palette) override;
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override;
|
||||
int GetBytesPerPixel() override { return 1; }
|
||||
};
|
||||
|
||||
#endif /* BLITTER_8BPP_BASE_HPP */
|
||||
|
@@ -198,11 +198,6 @@ public:
|
||||
*/
|
||||
virtual const char *GetName() = 0;
|
||||
|
||||
/**
|
||||
* Get how many bytes are needed to store a pixel.
|
||||
*/
|
||||
virtual int GetBytesPerPixel() = 0;
|
||||
|
||||
/**
|
||||
* Post resize event
|
||||
*/
|
||||
|
@@ -32,7 +32,6 @@ public:
|
||||
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. */
|
||||
|
Reference in New Issue
Block a user