/* ***********************************************************
 * *                                                         *
 * *       Header file for Maps library definitions          *
 * *                                                         *
 * ***********************************************************
 * File: include/maps_lib.h
 *
 *   COPYRIGHT (c) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003  BY
 *          SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */
#define SIGMET_MAPS_LIB_H 1

#ifdef __cplusplus
extern "C" {
#endif
  
#define         BADOVERO       1
#define MAPSLIB_BADOVERO       (MAPSLIB_FACILITY+BADOVERO)
#define         BADOVERR       2
#define MAPSLIB_BADOVERR       (MAPSLIB_FACILITY+BADOVERR)
#define         CATCH_DUP      3
#define MAPSLIB_CATCH_DUP      (MAPSLIB_FACILITY+CATCH_DUP)
#define         CATCH_EMPTY    4
#define MAPSLIB_CATCH_EMPTY    (MAPSLIB_FACILITY+CATCH_EMPTY)
#define         CATCH_LABEL    5
#define MAPSLIB_CATCH_LABEL    (MAPSLIB_FACILITY+CATCH_LABEL)
#define         CATCH_MISSING  6
#define MAPSLIB_CATCH_MISSING  (MAPSLIB_FACILITY+CATCH_MISSING)
#define         FILLFUL        7
#define MAPSLIB_FILLFUL        (MAPSLIB_FACILITY+FILLFUL)
#define         FNF            8
#define MAPSLIB_FNF            (MAPSLIB_FACILITY+FNF)
#define         ICON_COUNT     9
#define MAPSLIB_ICON_COUNT     (MAPSLIB_FACILITY+ICON_COUNT)
#define         ICON_ERROR     10
#define MAPSLIB_ICON_ERROR     (MAPSLIB_FACILITY+ICON_ERROR)
#define         ICON_SIZE      11
#define MAPSLIB_ICON_SIZE      (MAPSLIB_FACILITY+ICON_SIZE)
#define         LAYERFUL       12
#define MAPSLIB_LAYERFUL       (MAPSLIB_FACILITY+LAYERFUL)

#define         BLOCK_BLOCK    14
#define MAPSLIB_BLOCK_BLOCK    (MAPSLIB_FACILITY+BLOCK_BLOCK)
#define         BLOCK_EMPTY    15
#define MAPSLIB_BLOCK_EMPTY    (MAPSLIB_FACILITY+BLOCK_EMPTY)
#define         BLOCK_SITE     16
#define MAPSLIB_BLOCK_SITE     (MAPSLIB_FACILITY+BLOCK_SITE)
#define         BLOCK_SWEEP    17
#define MAPSLIB_BLOCK_SWEEP    (MAPSLIB_FACILITY+BLOCK_SWEEP)

#define         OVERLAY_FULL   20
#define MAPSLIB_OVERLAY_FULL   (MAPSLIB_FACILITY+OVERLAY_FULL)
#define         OVERLAY_HEAP   21
#define MAPSLIB_OVERLAY_HEAP   (MAPSLIB_FACILITY+OVERLAY_HEAP)
#define         POINTFUL       22
#define MAPSLIB_POINTFUL       (MAPSLIB_FACILITY+POINTFUL)
#define         TEXTFUL        23
#define MAPSLIB_TEXTFUL        (MAPSLIB_FACILITY+TEXTFUL)
#define         GIFFUL         24
#define MAPSLIB_GIFFUL         (MAPSLIB_FACILITY+GIFFUL)

#define         SURFACE_EMPTY    30
#define MAPSLIB_SURFACE_EMPTY    (MAPSLIB_FACILITY+SURFACE_EMPTY)
#define         SURFACE_NOAZRES  31
#define MAPSLIB_SURFACE_NOAZRES  (MAPSLIB_FACILITY+SURFACE_NOAZRES)
#define         SURFACE_NORNGRES 32
#define MAPSLIB_SURFACE_NORNGRES (MAPSLIB_FACILITY+SURFACE_NORNGRES)
#define         SURFACE_NOSITE   33
#define MAPSLIB_SURFACE_NOSITE   (MAPSLIB_FACILITY+SURFACE_NOSITE)
#define         SURFACE_RNGOVR   34
#define MAPSLIB_SURFACE_RNGOVR   (MAPSLIB_FACILITY+SURFACE_RNGOVR)
#define         SURFACE_SITE     35
#define MAPSLIB_SURFACE_SITE     (MAPSLIB_FACILITY+SURFACE_SITE)
#define         SURFACE_SYNTAX   36
#define MAPSLIB_SURFACE_SYNTAX   (MAPSLIB_FACILITY+SURFACE_SYNTAX)

#ifndef MESSAGE_ONLY                      

#ifdef SIGMET_PROJECTION_H
MESSAGE AddToOverlay		/* File: OverlaySave.c */
( struct overlay_file_header8 *pHeader_a,      /* Overlay header, will be modified */
  UINT1 **pHeap_a,                       /* Overlay heap, will be modified */
  SINT4 *pHeapSize_a,                    /* Size of heap, will be modified */
  const struct overlay_text8  *pText_a,  /* Possible new text point, NULL if none */
  const struct overlay_point8 *pFill_a,  /* Possible new fill point, NULL if none */
  const struct overlay_gif8 *pGif_a );   /* Possible new gifs, NULL if none */
#endif  /* #ifdef SIGMET_PROJECTION_H */

#ifdef SIGMET_PROJECTION_H
MESSAGE DeleteFromOverlay
( struct overlay_file_header8 *pHeader_a, /* Overlay header, will be modified */
  UINT1 **pHeap_a,		  /* Overlay heap, will be modified */
  SINT4 *pHeapSize_a,		  /* Size of heap, will be modified */
  struct overlay_text8  *pText_a, /* Pointer to Text to delete, NULL if none */
  struct overlay_point8 *pFill_a, /* Pointer to fill point, NULL if none */
  struct overlay_gif8 *pGif_a );  /* Pointer to gifs to delete, NULL if none */

MESSAGE DeleteSelectedFromOverlay
( struct overlay_file_header8 *pHeader_a, /* Overlay header, will be modified */
  UINT1 **pHeap_a,		/* Overlay heap, will be modified */
  SINT4 *pHeapSize_a );		/* Size of heap, will be modified */
#endif  /* #ifdef SIGMET_PROJECTION_H */

void GetCatchInvPath		/*File: catch_load.c */
( char sPath_a[PATHNAME_SIZE] );

#ifdef SIGMET_PROJECTION_H
  const struct catch_inventory8 *GetCatchInvPtr /* File: catch_load.c */
  ( void ) ;
#endif  /* #ifdef SIGMET_PROJECTION_H */
  
  void GetOverlayInvPath          /* File: overlay_files.c */
  ( char sPath_a[PATHNAME_SIZE],
    const char *sWho_a );   /* Who the creator is */

#ifdef SIGMET_PROJECTION_H
  const struct overlay_inventory8 *GetOverlayInvPtr  /* File: overlay_files.c */
  (const char *sWho_a );   /* Who the creator is */

void IconFiles			/* File: overlay_load.c */
( volatile struct layer_dir *pLayerInv_a );
#endif  /* #ifdef SIGMET_PROJECTION_H */
  
#ifdef SIGMET_PROJECTION_H
MESSAGE LoadBlockageFile
( struct block_site_header **pFileHeader_a ); /* Fills in header here */
#endif  /* #ifdef SIGMET_PROJECTION_H */

#ifdef SIGMET_PROJECTION_H
  MESSAGE LoadCatchFile		/* File: catch_load.c */
( const char *sfile_a,		/* Input catch file name */
  volatile struct catch_file_header8 *pFileHeader_a, /* Fills in header here */
  UINT1 **pHeap_a,		/* Returns heap here, must be freed */
  SINT4 *iHeapSize_a,		/* Size of heap in bytes */
  SINT4 *iline_a );		/* Line number error was on */

void LoadCatchInventory		/* File: catch_load.c */
( struct catch_inventory8 *pCatch_a, /* Fills in the array of catch files */
  UINT1 **pInventoryHeap_a,	/* Returns pointer to malloced array, must be freed */
  UINT1 lverbose_a );		/* Will print logging info if nonzero */

MESSAGE LoadOverlayFile		/* File: overlay_load.c */
( const char* sfile_a,		/* File name to load */
  volatile struct layer_dir *players_a,	/* Layer directory */
  volatile struct overlay_file_header8* header_a, /* Overlay header */
  UINT1 **pHeap_a,		/* Overlay data heap */
  SINT4 *iHeapSize_a,		/* Overlay heap size*/
  SINT4* ierror_line_a		/* Line number, if error */
  );

  MESSAGE LoadOverlayIntoFile     /* File: overlay_files.c */
( struct overlay_inventory8 **ppOverlayFile_a,
  SINT4 *iFileSize_a,
  SINT4 *iFileId_a, 
  const char *sWho_a,
  UINT1 lVerbose_a );

  void LoadOverlayInventory       /* File: overlay_files.c */
(struct overlay_inventory8 *pOverlay_a,  /* Fills in the array of overlay files */
 UINT1 **pInventoryHeap_a,    /* Returns pointer to malloced array, must be freed */
 UINT1 lverbose_a );          /* Will print logging info if nonzero */

  MESSAGE LoadTerrainFile         /* File: TerrainLoad.c */
( struct terrain_site_header **pFileHeader_a ); /* Fills in header here */

void ProcessOverlayFilename	/* File: overlay_load.c */
( const char *sfile_a,
  char sPath_a[PATHNAME_SIZE],
  volatile char sFile_a[16],
  const char *sExtension_a );
#endif  /* #ifdef SIGMET_PROJECTION_H */

#ifdef SIGMET_PROJECTION_H
MESSAGE SaveOverlay		/* File: OverlaySave.c */
( const char *sPath_a,		/* File pathname */
  const struct layer_dir *players_a, /* Layer directory needed for names */
  const struct overlay_file_header8 *pHeader_a,	/* Overlay header */
  const UINT1 *pHeap_a );	/* Overlay heap */
#endif  /* #ifdef SIGMET_PROJECTION_H */


#endif /* #ifndef MESSAGE_ONLY */

#ifdef __cplusplus
}
#endif
