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

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