/*........................... BENCH_BitBlt.C ................ 2-24-96 ......*/ #include #include #include #include #include #include #include #include #include /*..... #include .....*/ extern unsigned _stklen = 10000; /* This is for Borland C Only ! */ void cube_3d(int,int); float SIN_LUT[1024]; void main() { char text[100]; clock_t clk,delta; unsigned mode,op[5]={0,1,2,3,6}; unsigned i,j,m[1000],n[1000],image_size,xx,yy,a,b,c,d,k,l; unsigned long num_loops; float timer,pixs[5]; unsigned char *image; num_loops = 200; /*..........................................................................*/ /* Initialize sin look up table. */ /* Index 'i' goes from 0 to 1023 and is equivalent to 0 to 360 degrees. */ /*..........................................................................*/ for(i=0;i<1024;i++) SIN_LUT[i] = sin(i*6.28/1024.0); printf("input graphics mode (hex): "); scanf("%x",&mode); vsa_init(mode); xx = XResolution; yy = YResolution; /*..........................................................................*/ /* Initialize array of BitBlt positions */ /*..........................................................................*/ k = 0; l = 256; c = .09*xx; d = .12*yy; for(i=0;i