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 8bpp_base.hpp Base for all 8 bpp blitters. */
10 #ifndef BLITTER_8BPP_BASE_HPP
11 #define BLITTER_8BPP_BASE_HPP
15 /** Base for all 8bpp blitters. */
16 class Blitter_8bppBase
: public Blitter
{
18 uint8
GetScreenDepth() override
{ return 8; }
19 void DrawColourMappingRect(void *dst
, int width
, int height
, PaletteID pal
) override
;
20 void *MoveTo(void *video
, int x
, int y
) override
;
21 void SetPixel(void *video
, int x
, int y
, uint8 colour
) override
;
22 void DrawLine(void *video
, int x
, int y
, int x2
, int y2
, int screen_width
, int screen_height
, uint8 colour
, int width
, int dash
) override
;
23 void DrawRect(void *video
, int width
, int height
, uint8 colour
) override
;
24 void CopyFromBuffer(void *video
, const void *src
, int width
, int height
) override
;
25 void CopyToBuffer(const void *video
, void *dst
, int width
, int height
) override
;
26 void CopyImageToBuffer(const void *video
, void *dst
, int width
, int height
, int dst_pitch
) override
;
27 void ScrollBuffer(void *video
, int &left
, int &top
, int &width
, int &height
, int scroll_x
, int scroll_y
) override
;
28 int BufferSize(int width
, int height
) override
;
29 void PaletteAnimate(const Palette
&palette
) override
;
30 Blitter::PaletteAnimation
UsePaletteAnimation() override
;
31 int GetBytesPerPixel() override
{ return 1; }
34 #endif /* BLITTER_8BPP_BASE_HPP */