src/blitter/8bpp_base.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
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     1
/* $Id$ */
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
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: 6985
diff changeset
     3
/** @file 8bpp_base.hpp Base for all 8 bpp blitters. */
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     4
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     5
#ifndef BLITTER_8BPP_BASE_HPP
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     6
#define BLITTER_8BPP_BASE_HPP
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     7
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     8
#include "base.hpp"
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
     9
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    10
class Blitter_8bppBase : public Blitter {
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    11
public:
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    12
	/* virtual */ uint8 GetScreenDepth() { return 8; }
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    13
//	/* 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:
diff changeset
    14
	/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal);
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    15
//	/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    16
	/* virtual */ void *MoveTo(const void *video, int x, int y);
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    17
	/* 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:
diff changeset
    18
	/* 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
    19
	/* 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
    20
	/* 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
    21
	/* 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
    22
	/* 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
    23
	/* 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
    24
	/* 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:
diff changeset
    25
	/* virtual */ int BufferSize(int width, int height);
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
    26
	/* 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
    27
	/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
6937
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    28
};
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    29
40c760fcf1f6 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
truelight
parents:
diff changeset
    30
#endif /* BLITTER_8BPP_BASE_HPP */