2000-09-16 04:49:00 +00:00
|
|
|
/* Page Flipping Routines for the Super VMW Graphics Library */
|
|
|
|
|
|
|
|
#include "svmwgraph.h"
|
|
|
|
|
|
|
|
#include <string.h> /* For memcpy() */
|
|
|
|
|
|
|
|
void vmwFlipVirtual(vmwVisual *destination,
|
2000-09-16 23:23:00 +00:00
|
|
|
vmwVisual *source, int xsize,int ysize) {
|
2000-09-16 04:49:00 +00:00
|
|
|
|
2000-09-16 23:23:00 +00:00
|
|
|
memcpy(destination->memory,source->memory,xsize*ysize);
|
2000-09-16 04:49:00 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int vmwArbitraryCrossBlit(vmwVisual *src,int x1,int y1,int w,int h,
|
|
|
|
vmwVisual *dest,int x2,int y2)
|
|
|
|
{
|
|
|
|
|
|
|
|
int y;
|
|
|
|
unsigned char *source,*destination;
|
|
|
|
|
|
|
|
source=src->memory+(src->xsize*y1);
|
|
|
|
destination=dest->memory+(dest->xsize*y2);
|
|
|
|
|
|
|
|
for(y=0;y<h;y++) {
|
|
|
|
memcpy ((destination+x2),(source+x1),w);
|
|
|
|
source+=src->xsize;
|
2000-09-16 23:23:00 +00:00
|
|
|
destination+=dest->xsize;
|
2000-09-16 04:49:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|