2007-06-12 22:24:12 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file 8bpp_base.hpp Base for all 8 bpp blitters. */
|
2007-06-12 22:24:12 +02:00
|
|
|
|
2007-06-17 22:30:28 +02:00
|
|
|
#ifndef BLITTER_8BPP_BASE_HPP
|
|
|
|
#define BLITTER_8BPP_BASE_HPP
|
2007-06-12 22:24:12 +02:00
|
|
|
|
2007-06-17 22:30:28 +02:00
|
|
|
#include "base.hpp"
|
2007-06-12 22:24:12 +02:00
|
|
|
|
2011-05-01 12:15:33 +02:00
|
|
|
/** Base for all 8bpp blitters. */
|
2007-06-17 22:30:28 +02:00
|
|
|
class Blitter_8bppBase : public Blitter {
|
2007-06-12 22:24:12 +02:00
|
|
|
public:
|
2007-06-17 22:30:28 +02:00
|
|
|
/* virtual */ uint8 GetScreenDepth() { return 8; }
|
2010-01-21 02:44:51 +01:00
|
|
|
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
2011-11-12 09:26:30 +01:00
|
|
|
/* virtual */ void *MoveTo(void *video, int x, int y);
|
2009-02-09 03:57:15 +01:00
|
|
|
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
|
|
|
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
2007-06-21 14:36:46 +02:00
|
|
|
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
|
|
|
|
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
|
|
|
|
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
|
2007-06-18 22:08:21 +02:00
|
|
|
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
|
2007-06-12 22:24:12 +02:00
|
|
|
/* virtual */ int BufferSize(int width, int height);
|
2011-12-08 20:37:33 +01:00
|
|
|
/* virtual */ void PaletteAnimate(const Palette &palette);
|
2007-06-19 17:04:08 +02:00
|
|
|
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
|
2008-08-16 00:06:58 +02:00
|
|
|
/* virtual */ int GetBytesPerPixel() { return 1; }
|
2007-06-12 22:24:12 +02:00
|
|
|
};
|
|
|
|
|
2007-06-17 22:30:28 +02:00
|
|
|
#endif /* BLITTER_8BPP_BASE_HPP */
|