# 8bpp_base.hpp

Go to the documentation of this file.

    00001 /* $Id: 8bpp_base.hpp 23448 2011-12-08 19:37:33Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef BLITTER_8BPP_BASE_HPP
    00013 #define BLITTER_8BPP_BASE_HPP
    00014
    00015 #include "base.hpp"
    00016
    00018 class Blitter_8bppBase : public Blitter {
    00019 public:
    00020   /* virtual */ uint8 GetScreenDepth() { return 8; }
    00021   /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
    00022   /* virtual */ void *MoveTo(void *video, int x, int y);
    00023   /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
    00024   /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
    00025   /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
    00026   /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
    00027   /* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
    00028   /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
    00029   /* virtual */ int BufferSize(int width, int height);
    00030   /* virtual */ void PaletteAnimate(const Palette &palette);
    00031   /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
    00032   /* virtual */ int GetBytesPerPixel() { return 1; }
    00033 };
    00034
    00035 #endif /* BLITTER_8BPP_BASE_HPP */