src/blitter/null.hpp
author richk
Mon, 26 May 2008 20:45:25 +0000
branchNewGRF_ports
changeset 10724 68a692eacf22
parent 6720 35756db7e577
permissions -rw-r--r--
(svn r13274) [NewGRF_ports] -Sync: with trunk r12806:13144.
6720
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     1
/* $Id$ */
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     2
10724
68a692eacf22 (svn r13274) [NewGRF_ports] -Sync: with trunk r12806:13144.
richk
parents: 6720
diff changeset
     3
/** @file null.hpp The blitter that doesn't blit. */
6720
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     4
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     5
#ifndef BLITTER_NULL_HPP
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     6
#define BLITTER_NULL_HPP
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     7
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     8
#include "base.hpp"
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
     9
#include "factory.hpp"
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    10
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    11
class Blitter_Null : public Blitter {
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    12
public:
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    13
	/* virtual */ uint8 GetScreenDepth() { return 0; }
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    14
	/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    15
	/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    16
	/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    17
	/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    18
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    19
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    20
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    21
	/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    22
	/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    23
	/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    24
	/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    25
	/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    26
	/* virtual */ int BufferSize(int width, int height) { return 0; };
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    27
	/* virtual */ void PaletteAnimate(uint start, uint count) { };
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    28
	/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    29
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    30
	/* virtual */ const char *GetName() { return "null"; }
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    31
};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    32
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    33
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    34
public:
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    35
	/* virtual */ const char *GetName() { return "null"; }
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    36
	/* virtual */ const char *GetDescription() { return "Null Blitter (does nothing)"; }
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    37
	/* virtual */ Blitter *CreateInstance() { return new Blitter_Null(); }
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    38
};
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    39
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
diff changeset
    40
#endif /* BLITTER_NULL_HPP */