|
|
@ -64,12 +64,12 @@ static byte _dirty_blocks[DIRTY_BYTES_PER_LINE * MAX_SCREEN_HEIGHT / 8];
|
|
|
|
|
|
|
|
|
|
|
|
void memcpy_pitch(void *dst, void *src, int w, int h, int srcpitch, int dstpitch)
|
|
|
|
void memcpy_pitch(void *dst, void *src, int w, int h, int srcpitch, int dstpitch)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte *dstp = (byte*)dst;
|
|
|
|
Pixel *dstp = (Pixel *)dst;
|
|
|
|
byte *srcp = (byte*)src;
|
|
|
|
Pixel *srcp = (Pixel *)src;
|
|
|
|
|
|
|
|
|
|
|
|
assert(h >= 0);
|
|
|
|
assert(h >= 0);
|
|
|
|
for (; h != 0; --h) {
|
|
|
|
for (; h != 0; --h) {
|
|
|
|
memcpy(dstp, srcp, w);
|
|
|
|
memcpy(dstp, srcp, w * sizeof(Pixel));
|
|
|
|
dstp += dstpitch;
|
|
|
|
dstp += dstpitch;
|
|
|
|
srcp += srcpitch;
|
|
|
|
srcp += srcpitch;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -110,7 +110,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (ht = height; ht > 0; --ht) {
|
|
|
|
for (ht = height; ht > 0; --ht) {
|
|
|
|
memcpy(dst, src, width);
|
|
|
|
memcpy(dst, src, width * sizeof(Pixel));
|
|
|
|
src -= p;
|
|
|
|
src -= p;
|
|
|
|
dst -= p;
|
|
|
|
dst -= p;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -136,7 +136,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
|
|
|
/* the y-displacement may be 0 therefore we have to use memmove,
|
|
|
|
/* the y-displacement may be 0 therefore we have to use memmove,
|
|
|
|
* because source and destination may overlap */
|
|
|
|
* because source and destination may overlap */
|
|
|
|
for (ht = height; ht > 0; --ht) {
|
|
|
|
for (ht = height; ht > 0; --ht) {
|
|
|
|
memmove(dst, src, width);
|
|
|
|
memmove(dst, src, width * sizeof(Pixel));
|
|
|
|
src += p;
|
|
|
|
src += p;
|
|
|
|
dst += p;
|
|
|
|
dst += p;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -175,7 +175,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int color)
|
|
|
|
if (!HASBIT(color, PALETTE_MODIFIER_GREYOUT)) {
|
|
|
|
if (!HASBIT(color, PALETTE_MODIFIER_GREYOUT)) {
|
|
|
|
if (!HASBIT(color, USE_COLORTABLE)) {
|
|
|
|
if (!HASBIT(color, USE_COLORTABLE)) {
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
memset(dst, color, right);
|
|
|
|
memset(dst, color, right * sizeof(Pixel));
|
|
|
|
dst += dpi->pitch;
|
|
|
|
dst += dpi->pitch;
|
|
|
|
} while (--bottom);
|
|
|
|
} while (--bottom);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|