tb1/svmwgraph/vmw_flip.c
2012-11-30 00:45:30 -05:00

35 lines
738 B
C

/* Page Flipping Routines for the Super VMW Graphics Library */
#include "svmwgraph.h"
#include <string.h> /* For memcpy() */
void vmwFlipVirtual(vmwVisual *destination,
vmwVisual *source, int xsize,int ysize) {
memcpy(destination->memory,source->memory,xsize*ysize);
}
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;
destination+=dest->xsize;
}
return 0;
}