int main(int argc, char **argv) { long x, y, z; int i; mainworld mw; if((argc < 4) || (argc > 5)) { printf("Usage: name X Y Z [num]\n"); exit(1); } x = atol(argv[1]); y = atol(argv[2]); z = atol(argv[3]); if(argc == 5) { i = atoi(argv[4]); } else { i = 1; } if(mainwrld(&mw, x, y, z) == 0) { exit(0); } time(&x); sRand(x); while(i--) { printf("%s\n", getname()); } }
void ReadPixSanityTest::checkStencil(ReadPixSanityResult& r, Window& w) { DrawingSurfaceConfig& config = *r.config; RandomBits sRand(config.s, 10101); r.passStencil = true; for (int i = 0; i < 100 && r.passStencil; ++i) { GLuint expected = sRand.next(); glClearStencil(expected); glClear(GL_STENCIL_BUFFER_BIT); GLuint buf[READPIX_SANITY_WIN_SIZE][READPIX_SANITY_WIN_SIZE]; glReadPixels(0, 0, READPIX_SANITY_WIN_SIZE, READPIX_SANITY_WIN_SIZE, GL_STENCIL_INDEX, GL_UNSIGNED_INT, buf); for (int y = 0; y < READPIX_SANITY_WIN_SIZE && r.passStencil; ++y) for (int x = 0; x < READPIX_SANITY_WIN_SIZE; ++x) if (buf[y][x] != expected) { r.passStencil = false; r.xStencil = x; r.yStencil = y; r.expectedStencil = expected; r.actualStencil = buf[y][x]; break; } w.swap(); } } // ReadPixSanityTest::checkStencil
void main() { int i; int buf[20][28]; long l; time(&l); sRand(l); filltri(buf); Initialise(); for(i = 0; i < 5; i++) { plottri(buf[i], 28, 1, 7 + 13*i, 0); plottri(buf[i+5], 28, 0, 7 + 13*i, 12); plottri(buf[i+10], 28, 1, 14 + 13*i, 7); plottri(buf[i+15], 28, 0, 14 + 13*i, 19); } getch(); closegraph(); restorecrtmode(); }