/*- Prototypes -------------------------------------------------------------*/

void ExitProgram(int);
int  RetriveOpenFileName(char*);
int  RetriveSaveFileName(char*);
void OpenWadFile(char *);
void Printname(struct directory *);
int  FindDir(char *);
void GetThings(void);
void GetVertexes(void);
void GetLinedefs(void);
void GetSidedefs(void);
void GetSectors(void);
void         _fastcall  FindLimits(struct Seg *);

struct Seg*             CreateSegs(void);

struct Node* _fastcall  CreateNode(struct Seg *);
void         		DivideSegs(struct Seg *,struct Seg **,struct Seg **);
int          _fastcall	IsItConvex(struct Seg *);
int 	     _fastcall	CreateSSector(struct Seg *);
int	     		IsLineDefInside(int,int,int,int,int);
int	     		Reference(int);

struct Seg*             PickNode(struct Seg *);
void         _fastcall	ComputeIntersection(short int *,short int *);
int 	                DoLinesIntersect(void);
int 	                SplitDist(struct Seg *);

void ReverseNodes(struct Node *);
long CreateBlockmap(void);

void progress(void);

