12 #ifndef BLITTER_32BPP_ANIM_HPP 13 #define BLITTER_32BPP_ANIM_HPP 40 void SetPixel(
void *video,
int x,
int y, uint8 colour);
41 void DrawRect(
void *video,
int width,
int height, uint8 colour);
42 void CopyFromBuffer(
void *video,
const void *src,
int width,
int height);
43 void CopyToBuffer(
const void *video,
void *dst,
int width,
int height);
44 void ScrollBuffer(
void *video,
int &left,
int &top,
int &width,
int &height,
int scroll_x,
int scroll_y);
49 const char *
GetName() {
return "32bpp-anim"; }
58 return this->palette.
palette[index];
uint32 PaletteID
The number of the palette.
Colour LookupColourInPalette(uint index)
Look up the colour in the current palette.
Information about the currently used palette.
void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
Draw a colourtable to the screen.
Colour palette[256]
Current palette. Entry 0 has to be always fully transparent!
void PostResize()
Post resize event.
uint16 * anim_buf
In this buffer we keep track of the 8bpp indexes so we can do palette animation.
int BufferSize(int width, int height)
Calculate how much memory there is needed for an image of this size in the video-buffer.
How all blitters should look like.
The optimised 32 bpp blitter with palette animation.
void DrawRect(void *video, int width, int height, uint8 colour)
Make a single horizontal line in a single colour on the video-buffer.
int anim_buf_height
The height of the animation buffer.
Parameters related to blitting.
const char * GetName()
Get the name of the blitter, the same as the Factory-instance returns.
int anim_buf_pitch
The pitch of the animation buffer.
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
Draw an image to the screen, given an amount of params defined above.
Blitter * CreateInstance()
Create an instance of this Blitter-class.
Palette _cur_palette
Current palette.
int GetBytesPerPixel()
Get how many bytes are needed to store a pixel.
ZoomLevel
All zoom levels we know.
int anim_buf_width
The width of the animation buffer.
Palette palette
The current palette.
Factory for the 32bpp blitter with animation.
void CopyToBuffer(const void *video, void *dst, int width, int height)
Copy from the screen to a buffer.
Blitter::PaletteAnimation UsePaletteAnimation()
Check if the blitter uses palette animation at all.
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
Scroll the videobuffer some 'x' and 'y' value.
void PaletteAnimate(const Palette &palette)
Called when the 8bpp palette is changed; you should redraw all pixels on the screen that are equal to...
Structure to access the alpha, red, green, and blue channels from a 32 bit number.
Optimized 32 bpp blitter.
BlitterMode
The modes of blitting we can do.
PaletteAnimation
Types of palette animation.
void SetPixel(void *video, int x, int y, uint8 colour)
Draw a pixel with a given colour on the video-buffer.
void CopyFromBuffer(void *video, const void *src, int width, int height)
Copy from a buffer to the screen.
The base factory, keeping track of all blitters.
The optimised 32 bpp blitter (without palette animation).