12 #include "../stdafx.h"
13 #include "../gfx_func.h"
16 #include "../safeguards.h"
20 const uint8 *ctab = GetNonSprite(pal,
ST_RECOLOUR) + 1;
23 for (
int i = 0; i != width; i++) *((uint8 *)dst + i) = ctab[((uint8 *)dst)[i]];
24 dst = (uint8 *)dst + _screen.pitch;
30 return (uint8 *)video + x + y * _screen.pitch;
35 *((uint8 *)video + x + y * _screen.pitch) = colour;
41 memset(video, colour, width);
42 video = (uint8 *)video + _screen.pitch;
48 uint8 *dst = (uint8 *)video;
49 const uint8 *usrc = (
const uint8 *)src;
51 for (; height > 0; height--) {
52 memcpy(dst, usrc, width *
sizeof(uint8));
60 uint8 *udst = (uint8 *)dst;
61 const uint8 *src = (
const uint8 *)video;
63 for (; height > 0; height--) {
64 memcpy(udst, src, width *
sizeof(uint8));
72 uint8 *udst = (uint8 *)dst;
73 const uint8 *src = (
const uint8 *)video;
75 for (; height > 0; height--) {
76 memcpy(udst, src, width *
sizeof(uint8));
89 dst = (uint8 *)video + left + (top + height - 1) * _screen.pitch;
90 src = dst - scroll_y * _screen.pitch;
107 for (
int h = height; h > 0; h--) {
108 memcpy(dst, src, width *
sizeof(uint8));
109 src -= _screen.pitch;
110 dst -= _screen.pitch;
114 dst = (uint8 *)video + left + top * _screen.pitch;
115 src = dst - scroll_y * _screen.pitch;
133 for (
int h = height; h > 0; h--) {
134 memmove(dst, src, width *
sizeof(uint8));
135 src += _screen.pitch;
136 dst += _screen.pitch;
143 return width * height;