tb1/tb1_linux/svmwgraph/vmw_flip.c
Vince Weaver 137d2b45fd Move tb1 into its own subdir
I'm merging all the the tom bombem projects into one git tree
2012-12-18 21:24:06 -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;
}