home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / qube / vertex.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-07  |  559 b   |  30 lines

  1. /***
  2. ****  QuBE --- Vertex manipulation routines.
  3. ***/
  4.  
  5. #include "qube.h"
  6. #include "vertex.h"
  7.  
  8. /*
  9. **  VertexList.  Dumps out the vertices in a BSP file.
  10. */
  11.  
  12. void VertexList(void)
  13. {
  14.     short int i, j, k;
  15.     unsigned long readcount;
  16.     vertex v;
  17.  
  18.     if (header.id != 0x17)
  19.         Error("Not a valid .BSP file");
  20.  
  21.     fseek(fi, header.vertices, SEEK_SET);
  22.  
  23.     for (i = 0, readcount = 0L; readcount < header.verticeslen; readcount += 12, i++) {
  24.         fread((char *)&v, 1, 12, fi);
  25.         printf("%4d:  %10.2f %10.2f %10.2f \n", i, v.x, v.y, v.z);
  26.         }
  27. }
  28.  
  29.  
  30.