mirror of
https://github.com/deater/tb1.git
synced 2024-11-20 03:31:50 +00:00
35 lines
738 B
C
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;
|
|
|
|
}
|
|
|