mirror of
https://github.com/deater/tb1.git
synced 2024-12-23 04:29:42 +00:00
137d2b45fd
I'm merging all the the tom bombem projects into one git tree
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;
|
|
|
|
}
|
|
|