OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef BLITTER_8BPP_BASE_HPP
11 #define BLITTER_8BPP_BASE_HPP
20 void *
MoveTo(
void *video,
int x,
int y)
override;
21 void SetPixel(
void *video,
int x,
int y, uint8 colour)
override;
22 void DrawLine(
void *video,
int x,
int y,
int x2,
int y2,
int screen_width,
int screen_height, uint8 colour,
int width,
int dash)
override;
23 void DrawRect(
void *video,
int width,
int height, uint8 colour)
override;
24 void CopyFromBuffer(
void *video,
const void *src,
int width,
int height)
override;
25 void CopyToBuffer(
const void *video,
void *dst,
int width,
int height)
override;
26 void CopyImageToBuffer(
const void *video,
void *dst,
int width,
int height,
int dst_pitch)
override;
27 void ScrollBuffer(
void *video,
int &left,
int &top,
int &width,
int &height,
int scroll_x,
int scroll_y)
override;
28 int BufferSize(
int width,
int height)
override;
void CopyToBuffer(const void *video, void *dst, int width, int height) override
Copy from the screen to a buffer.
How all blitters should look like.
Blitter::PaletteAnimation UsePaletteAnimation() override
Check if the blitter uses palette animation at all.
int GetBytesPerPixel() override
Get how many bytes are needed to store a pixel.
void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash) override
Draw a line with a given colour.
void PaletteAnimate(const Palette &palette) override
Called when the 8bpp palette is changed; you should redraw all pixels on the screen that are equal to...
Base for all 8bpp blitters.
PaletteAnimation
Types of palette animation.
void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override
Copy from the screen to a buffer in a palette format for 8bpp and RGBA format for 32bpp.
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override
Scroll the videobuffer some 'x' and 'y' value.
int BufferSize(int width, int height) override
Calculate how much memory there is needed for an image of this size in the video-buffer.
void SetPixel(void *video, int x, int y, uint8 colour) override
Draw a pixel with a given colour on the video-buffer.
uint32 PaletteID
The number of the palette.
void DrawRect(void *video, int width, int height, uint8 colour) override
Make a single horizontal line in a single colour on the video-buffer.
void * MoveTo(void *video, int x, int y) override
Move the destination pointer the requested amount x and y, keeping in mind any pitch and bpp of the r...
Information about the currently used palette.
void CopyFromBuffer(void *video, const void *src, int width, int height) override
Copy from a buffer to the screen.
void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override
Draw a colourtable to the screen.
uint8 GetScreenDepth() override
Get the screen depth this blitter works for.