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/>.
8 /** @file 32bpp_noanim.hpp 32bpp blitter without animation support. */
10 #ifndef BLITTER_32BPP_NOANIM_HPP
11 #define BLITTER_32BPP_NOANIM_HPP
13 #include "32bpp_base.hpp"
14 #include "../gfx_func.h"
16 /** Base for 32bpp blitters without animation. */
17 class Blitter_32bppNoanim
: public Blitter_32bppBase
{
19 static const PaletteAnimation palette_animation
= PALETTE_ANIMATION_NONE
; ///< Palette animation.
22 * Look up the colour in the current palette.
24 static inline Colour
LookupColourInPalette (uint index
)
26 return _cur_palette
[index
];
29 /** Blitting surface. */
30 struct Surface
: Blitter_32bppBase::Surface
{
31 Surface (void *ptr
, uint width
, uint height
, uint pitch
)
32 : Blitter_32bppBase::Surface (ptr
, width
, height
, pitch
)
36 void set_pixel (void *video
, int x
, int y
, uint8 colour
) OVERRIDE
;
38 void draw_rect (void *video
, int width
, int height
, uint8 colour
) OVERRIDE
;
40 void recolour_rect (void *video
, int width
, int height
, PaletteID pal
) OVERRIDE
;
42 void draw_checker (void *video
, uint width
, uint height
, uint8 colour
, byte bo
) OVERRIDE
;
44 void copy (Buffer
*dst
, int x
, int y
, uint width
, uint height
) OVERRIDE
;
46 void paste (const Buffer
*src
, int x
, int y
) OVERRIDE
;
50 #endif /* BLITTER_32BPP_NOANIM_HPP */