author | rubidium |
Wed, 07 May 2008 21:09:51 +0000 | |
branch | noai |
changeset 10455 | 22c441f5adf9 |
parent 9703 | d2a6acdbd665 |
child 11126 | 72d4c9314c72 |
permissions | -rw-r--r-- |
9629 | 1 |
/* $Id$ */ |
2 |
||
10455
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
9703
diff
changeset
|
3 |
/** @file 32bpp_anim.hpp A 32 bpp blitter with animation support. */ |
9629 | 4 |
|
5 |
#ifndef BLITTER_32BPP_ANIM_HPP |
|
6 |
#define BLITTER_32BPP_ANIM_HPP |
|
7 |
||
9703
d2a6acdbd665
(svn r11146) [NoAI] -Sync: with trunk r11035:11045.
rubidium
parents:
9629
diff
changeset
|
8 |
#include "32bpp_optimized.hpp" |
9629 | 9 |
#include "factory.hpp" |
10 |
||
9703
d2a6acdbd665
(svn r11146) [NoAI] -Sync: with trunk r11035:11045.
rubidium
parents:
9629
diff
changeset
|
11 |
class Blitter_32bppAnim : public Blitter_32bppOptimized { |
9629 | 12 |
private: |
13 |
uint8 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation |
|
14 |
int anim_buf_width; |
|
15 |
int anim_buf_height; |
|
16 |
||
17 |
public: |
|
18 |
Blitter_32bppAnim() : |
|
19 |
anim_buf(NULL), |
|
20 |
anim_buf_width(0), |
|
21 |
anim_buf_height(0) |
|
22 |
{} |
|
23 |
||
24 |
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); |
|
25 |
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); |
|
26 |
/* virtual */ void SetPixel(void *video, int x, int y, uint8 color); |
|
27 |
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); |
|
28 |
/* virtual */ void DrawRect(void *video, int width, int height, uint8 color); |
|
29 |
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); |
|
30 |
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); |
|
31 |
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y); |
|
32 |
/* virtual */ int BufferSize(int width, int height); |
|
33 |
/* virtual */ void PaletteAnimate(uint start, uint count); |
|
34 |
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation(); |
|
35 |
||
36 |
/* virtual */ const char *GetName() { return "32bpp-anim"; } |
|
37 |
}; |
|
38 |
||
39 |
class FBlitter_32bppAnim: public BlitterFactory<FBlitter_32bppAnim> { |
|
40 |
public: |
|
41 |
/* virtual */ const char *GetName() { return "32bpp-anim"; } |
|
42 |
/* virtual */ const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; } |
|
43 |
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); } |
|
44 |
}; |
|
45 |
||
46 |
#endif /* BLITTER_32BPP_ANIM_HPP */ |