Fix #12973: Don't exclude high score after using sandbox
[openttd-github.git] / src / blitter / 32bpp_simple.hpp
blob902af2905ad0cfd7bd51c2ccd51b5c13b5a39b71
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file 32bpp_simple.hpp Simple 32 bpp blitter. */
10 #ifndef BLITTER_32BPP_SIMPLE_HPP
11 #define BLITTER_32BPP_SIMPLE_HPP
13 #include "32bpp_base.hpp"
14 #include "factory.hpp"
16 /** The most trivial 32 bpp blitter (without palette animation). */
17 class Blitter_32bppSimple : public Blitter_32bppBase {
18 struct Pixel {
19 uint8_t r; ///< Red-channel
20 uint8_t g; ///< Green-channel
21 uint8_t b; ///< Blue-channel
22 uint8_t a; ///< Alpha-channel
23 uint8_t m; ///< Remap-channel
24 uint8_t v; ///< Brightness-channel
26 public:
27 void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
28 void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
29 Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
31 std::string_view GetName() override { return "32bpp-simple"; }
34 /** Factory for the simple 32 bpp blitter. */
35 class FBlitter_32bppSimple : public BlitterFactory {
36 public:
37 FBlitter_32bppSimple() : BlitterFactory("32bpp-simple", "32bpp Simple Blitter (no palette animation)") {}
38 Blitter *CreateInstance() override { return new Blitter_32bppSimple(); }
41 #endif /* BLITTER_32BPP_SIMPLE_HPP */