12 #include "../stdafx.h" 15 #include "../safeguards.h" 19 return (uint32 *)video + x + y * _screen.pitch;
33 for (
int i = width; i > 0; i--) {
37 video = (uint32 *)video + _screen.pitch;
43 uint32 *dst = (uint32 *)video;
44 const uint32 *usrc = (
const uint32 *)src;
46 for (; height > 0; height--) {
47 memcpy(dst, usrc, width *
sizeof(uint32));
55 uint32 *udst = (uint32 *)dst;
56 const uint32 *src = (
const uint32 *)video;
58 for (; height > 0; height--) {
59 memcpy(udst, src, width *
sizeof(uint32));
67 uint32 *udst = (uint32 *)dst;
68 const uint32 *src = (
const uint32 *)video;
70 for (; height > 0; height--) {
71 memcpy(udst, src, width *
sizeof(uint32));
84 dst = (uint32 *)video + left + (top + height - 1) * _screen.pitch;
85 src = dst - scroll_y * _screen.pitch;
102 for (
int h = height; h > 0; h--) {
103 memcpy(dst, src, width *
sizeof(uint32));
104 src -= _screen.pitch;
105 dst -= _screen.pitch;
109 dst = (uint32 *)video + left + top * _screen.pitch;
110 src = dst - scroll_y * _screen.pitch;
128 for (
int h = height; h > 0; h--) {
129 memmove(dst, src, width *
sizeof(uint32));
130 src += _screen.pitch;
131 dst += _screen.pitch;
138 return width * height *
sizeof(uint32);
Blitter::PaletteAnimation UsePaletteAnimation()
Check if the blitter uses palette animation at all.
void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch)
Copy from the screen to a buffer in a palette format for 8bpp and RGBA format for 32bpp...
Information about the currently used palette.
void * MoveTo(void *video, int x, int y)
Move the destination pointer the requested amount x and y, keeping in mind any pitch and bpp of the r...
int BufferSize(int width, int height)
Calculate how much memory there is needed for an image of this size in the video-buffer.
static Colour LookupColourInPalette(uint index)
Look up the colour in the current palette.
void DrawRect(void *video, int width, int height, uint8 colour)
Make a single horizontal line in a single colour on the video-buffer.
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.
Base for all 32 bits blitters.
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.
void CopyToBuffer(const void *video, void *dst, int width, int height)
Copy from the screen to a buffer.
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.
PaletteAnimation
Types of palette animation.