src/blitter/null.hpp
author bjarni
Thu, 19 Jun 2008 17:54:23 +0000
changeset 9561 f236daaaf93a
parent 9111 48ce04029fe4
child 9925 e6abeb1fc804
permissions -rw-r--r--
(svn r13584) -Fix: [OSX] Fixed issue where 10.5 failed to switch to fullscreen
This is done by selecting the 32bpp-anim blitter by default as it seems Apple removed some 8bpp support
Since this is done at runtime the same binary will still select 8bpp on 10.3 and 10.4
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     1
/* $Id$ */
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     2
9111
48ce04029fe4 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents: 6989
diff changeset
     3
/** @file null.hpp The blitter that doesn't blit. */
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     4
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     5
#ifndef BLITTER_NULL_HPP
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     6
#define BLITTER_NULL_HPP
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
     7
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
     8
#include "base.hpp"
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
     9
#include "factory.hpp"
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    10
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    11
class Blitter_Null : public Blitter {
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    12
public:
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    13
	/* virtual */ uint8 GetScreenDepth() { return 0; }
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    14
	/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    15
	/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal) {};
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    16
	/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    17
	/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    18
	/* virtual */ void SetPixel(void *video, int x, int y, uint8 color) {};
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    19
	/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {};
6947
2e14760f63f9 (svn r10201) -Codechange: Replace Blitter::SetHorizontalLine with Blitter::DrawRect, as the former was only used by the rectangle drawing code anyway. This lets us draw rectangles in one go.
peter1138
parents: 6940
diff changeset
    20
	/* virtual */ void DrawRect(void *video, int width, int height, uint8 color) {};
6948
d7d326482813 (svn r10203) -Codechange: more moving things to blitter-layer: DrawLine
truelight
parents: 6947
diff changeset
    21
	/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {};
6985
d50d59dca7c1 (svn r10241) -Codechange: CopyToBuffer now produces a buffer that is unreadable from outside the blitter, so the blitter can store anything he likes
truelight
parents: 6960
diff changeset
    22
	/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height) {};
d50d59dca7c1 (svn r10241) -Codechange: CopyToBuffer now produces a buffer that is unreadable from outside the blitter, so the blitter can store anything he likes
truelight
parents: 6960
diff changeset
    23
	/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height) {};
d50d59dca7c1 (svn r10241) -Codechange: CopyToBuffer now produces a buffer that is unreadable from outside the blitter, so the blitter can store anything he likes
truelight
parents: 6960
diff changeset
    24
	/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};
6951
b24e0f108ede (svn r10206) -Codechange: more moving things to blitter-layer: ScrollBuffer
truelight
parents: 6948
diff changeset
    25
	/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents: 6889
diff changeset
    26
	/* virtual */ int BufferSize(int width, int height) { return 0; };
6960
356d856462b6 (svn r10216) -Fix: palette animation always redid all palette entries, where in fact only a few indexes were needed
truelight
parents: 6951
diff changeset
    27
	/* virtual */ void PaletteAnimate(uint start, uint count) { };
356d856462b6 (svn r10216) -Fix: palette animation always redid all palette entries, where in fact only a few indexes were needed
truelight
parents: 6951
diff changeset
    28
	/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
6989
1768ca0091cb (svn r10245) -Codechange: added GetName also to all Blitters, instead of only the Factory
truelight
parents: 6985
diff changeset
    29
1768ca0091cb (svn r10245) -Codechange: added GetName also to all Blitters, instead of only the Factory
truelight
parents: 6985
diff changeset
    30
	/* virtual */ const char *GetName() { return "null"; }
6878
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    31
};
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    32
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    33
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    34
public:
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    35
	/* virtual */ const char *GetName() { return "null"; }
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    36
	/* virtual */ const char *GetDescription() { return "Null Blitter (does nothing)"; }
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    37
	/* virtual */ Blitter *CreateInstance() { return new Blitter_Null(); }
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    38
};
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    39
5cefd3ac59c7 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
truelight
parents:
diff changeset
    40
#endif /* BLITTER_NULL_HPP */