#include <stdio.h>

typedef struct
{
  long tableloc;
  long tablelen;
  FILE *p;
} pak_t;

typedef struct
{
  char name[56];
  long loc;
  long len;
} pakentry_t;

typedef struct
{
  int grid;        		//grid on?
  int snapgrid;			//snap to grid
  int gridsize;			//size of grid
  //defaults
  int dwalltext, dfloortext, dceiltext;
  int dceil,dfloor;//ceiling
  int dtop,dbottom;
  int gamma; //gamma correction as requested
  char reserved[44];
} config_t;

extern pak_t pak;
extern pakentry_t pakentry;
extern config_t config;
extern char *mapfile;
extern char *wadname;
extern char *pakname;


void openpak();
void getname();
void getentry(int e);
void showentry();
void export(int e, char*filename);
int selectmap();
void showmenu(int showE, int curE);
int findfile(char *filename);
