home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser-CD 2000 January / LCD_01_2000.iso / games / doom / pmdoom / include / w_wad.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-17  |  2.0 KB  |  94 lines

  1. /*  Emacs style mode select   -*- C++ -*-  */
  2. /* ----------------------------------------------------------------------------- */
  3. /*  */
  4. /*  $Id:$ */
  5. /*  */
  6. /*  Copyright (C) 1993-1996 by id Software, Inc. */
  7. /*  */
  8. /*  This source is available for distribution and/or modification */
  9. /*  only under the terms of the DOOM Source Code License as */
  10. /*  published by id Software. All rights reserved. */
  11. /*  */
  12. /*  The source is distributed in the hope that it will be useful, */
  13. /*  but WITHOUT ANY WARRANTY; without even the implied warranty of */
  14. /*  FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License */
  15. /*  for more details. */
  16. /*  */
  17. /*  DESCRIPTION: */
  18. /*     WAD I/O functions. */
  19. /*  */
  20. /* ----------------------------------------------------------------------------- */
  21.  
  22.  
  23. #ifndef __W_WAD__
  24. #define __W_WAD__
  25.  
  26.  
  27. #ifdef __GNUG__
  28. #pragma interface
  29. #endif
  30.  
  31.  
  32. /*  */
  33. /*  TYPES */
  34. /*  */
  35. typedef struct
  36. {
  37.     /*  Should be "IWAD" or "PWAD". */
  38.     char        identification[4];        
  39.     int            numlumps;
  40.     int            infotableofs;
  41.     
  42. } wadinfo_t;
  43.  
  44.  
  45. typedef struct
  46. {
  47.     int            filepos;
  48.     int            size;
  49.     char        name[8];
  50.     
  51. } filelump_t;
  52.  
  53. /*  */
  54. /*  WADFILE I/O related stuff. */
  55. /*  */
  56. typedef struct
  57. {
  58.     char    name[8];
  59.     int        handle;
  60.     int        position;
  61.     int        size;
  62. } lumpinfo_t;
  63.  
  64.  
  65. extern    void**        lumpcache;
  66. extern    lumpinfo_t*    lumpinfo;
  67. extern    int        numlumps;
  68.  
  69. void    W_InitMultipleFiles (char** filenames);
  70. void    W_Reload (void);
  71.  
  72. int    W_CheckNumForName (char* name);
  73. int    W_GetNumForName (char* name);
  74.  
  75. int    W_LumpLength (int lump);
  76. void    W_ReadLump (int lump, void *dest);
  77.  
  78. void*    W_CacheLumpNum (int lump, int tag);
  79. void*    W_CacheLumpName (char* name, int tag);
  80.  
  81. void *W_CacheLumpNumPadded
  82. ( int        lump,
  83.   int        tag,
  84.   int paddedsize );
  85.  
  86.  
  87.  
  88. #endif
  89. /* ----------------------------------------------------------------------------- */
  90. /*  */
  91. /*  $Log:$ */
  92. /*  */
  93. /* ----------------------------------------------------------------------------- */
  94.