2007-06-12 20:24:12 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00: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 15:11:33 +00:00
|
|
|
/** @file null.hpp The blitter that doesn't blit. */
|
2007-06-12 20:24:12 +00:00
|
|
|
|
|
|
|
#ifndef BLITTER_NULL_HPP
|
|
|
|
#define BLITTER_NULL_HPP
|
|
|
|
|
2007-06-17 20:30:28 +00:00
|
|
|
#include "factory.hpp"
|
2007-06-12 20:24:12 +00:00
|
|
|
|
2011-05-01 10:15:33 +00:00
|
|
|
/** Blitter that does nothing. */
|
2007-06-12 20:24:12 +00:00
|
|
|
class Blitter_Null : public Blitter {
|
|
|
|
public:
|
|
|
|
/* virtual */ uint8 GetScreenDepth() { return 0; }
|
2007-06-17 20:30:28 +00:00
|
|
|
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
|
2010-01-21 01:44:51 +00:00
|
|
|
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) {};
|
2011-01-14 15:34:33 +00:00
|
|
|
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
2007-06-17 20:30:28 +00:00
|
|
|
/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
|
2009-02-09 02:57:15 +00:00
|
|
|
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
|
|
|
|
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {};
|
2011-05-01 10:15:33 +00:00
|
|
|
/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width) {};
|
2007-06-21 12:36:46 +00: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 20:08:21 +00:00
|
|
|
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
|
2007-06-17 20:30:28 +00:00
|
|
|
/* virtual */ int BufferSize(int width, int height) { return 0; };
|
2007-06-19 15:04:08 +00:00
|
|
|
/* virtual */ void PaletteAnimate(uint start, uint count) { };
|
|
|
|
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
|
2007-06-21 13:56:59 +00:00
|
|
|
|
|
|
|
/* virtual */ const char *GetName() { return "null"; }
|
2008-08-15 22:06:58 +00:00
|
|
|
/* virtual */ int GetBytesPerPixel() { return 0; }
|
2007-06-12 20:24:12 +00:00
|
|
|
};
|
|
|
|
|
2011-05-01 10:15:33 +00:00
|
|
|
/** Factory for the blitter that doesn nothing. */
|
2007-06-12 20:24:12 +00:00
|
|
|
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {
|
|
|
|
public:
|
|
|
|
/* virtual */ const char *GetName() { return "null"; }
|
|
|
|
/* virtual */ const char *GetDescription() { return "Null Blitter (does nothing)"; }
|
|
|
|
/* virtual */ Blitter *CreateInstance() { return new Blitter_Null(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* BLITTER_NULL_HPP */
|