1
0
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:
Michael Lutz
2023-11-04 15:20:21 +01:00
parent bbd64bbe2b
commit 071fdab236
7 changed files with 4 additions and 16 deletions

View File

@@ -48,7 +48,6 @@ public:
Blitter::PaletteAnimation UsePaletteAnimation() override;
const char *GetName() override { return "32bpp-anim"; }
int GetBytesPerPixel() override { return 6; }
void PostResize() override;
/**

View File

@@ -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.

View File

@@ -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);

View File

@@ -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 */

View File

@@ -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
*/

View File

@@ -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. */