www.pudn.com > fatmap2.zip > MAIN.CPP
/* * Simple test program * * This source is part of the fatmap2.txt document by * Mats Byggmastar, mri@penti.sit.fi * 17.4.1997 Jakobstad, Finland * * Companies with self respect are encouraged to contact me if * any of this code is to be used as part of a commercial product. */ #include#include #include #include #include "misc.h" #define SEED 12 #define SECONDS 3 #define XLIMIT 320 #define YLIMIT 200 #define CLIMIT 256 #define ULIMIT 256 #define VLIMIT 256 char * WritePagePtr = (char *) 0xa0000; int WritePageWidth = 320; void setmode(int mode); #pragma aux setmode = "int 10h" parm [eax] inline int backface(vertexuvfloat * vtx) { return (vtx[0].x - vtx[1].x) * (vtx[2].y - vtx[1].y) - (vtx[2].x - vtx[1].x) * (vtx[0].y - vtx[1].y) < 0.0; } void readbuffer(char * buf, int bytes) { // Fill cache by reading each byte volatile char p=0; for(int n=0; n