#include <stdio.h>
char mapname[52];
long mapx, mapy;
float zoom;
int numvertex;
int main()
{
    FILE *f;
    char magic[10];
    int t;
    int version; //0 = no things
    f = fopen("scott2.eqm", "rb");
    if (!f) return;
    fread(magic,10,1,f);
    clrscr();
    printf("MAGIC ID:%s\n",magic);
    fread(&version,2,1,f);
    printf("EdQuake Map version:%i\n",version);
    fread(mapname,52,1,f);
    printf("Mapname:%s\n",mapname);
    fread(&mapx,4,1,f);
    fread(&mapy,4,1,f);
    fread(&zoom,4,1,f);
    fread(&numvertex,2,1,f);
    printf("Number of vertices:%i\n",numvertex);
/*    for (t = 1; t <= numvertex; t++)
      fread(&mapvertex[t],8,1,f);
    fread(&numlines,2,1,f);
    for (t = 1; t <= numlines; t++)
      fread(&mapline[t],14,1,f);
    fread(&numrooms,2,1,f);
    for (t = 1; t <= numrooms; t++)
      fread(&maproom[t],54,1,f);*/
    fclose(f);
    getch();
}
