w_wad.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. #ifndef __W_WAD__
  22. #define __W_WAD__
  23. #ifdef __GNUG__
  24. #pragma interface
  25. #endif
  26. //
  27. // TYPES
  28. //
  29. typedef struct
  30. {
  31. // Should be "IWAD" or "PWAD".
  32. char identification[4];
  33. int numlumps;
  34. int infotableofs;
  35. } wadinfo_t;
  36. typedef struct
  37. {
  38. int filepos;
  39. int size;
  40. char name[8];
  41. } filelump_t;
  42. //
  43. // WADFILE I/O related stuff.
  44. //
  45. typedef struct
  46. {
  47. char name[8];
  48. int handle;
  49. int position;
  50. int size;
  51. } lumpinfo_t;
  52. extern void** lumpcache;
  53. extern lumpinfo_t* lumpinfo;
  54. extern int numlumps;
  55. void W_InitMultipleFiles (char** filenames);
  56. void W_Reload (void);
  57. int W_CheckNumForName (char* name);
  58. int W_GetNumForName (char* name);
  59. int W_LumpLength (int lump);
  60. void W_ReadLump (int lump, void *dest);
  61. void* W_CacheLumpNum (int lump, int tag);
  62. void* W_CacheLumpName (char* name, int tag);
  63. #endif
  64. //-----------------------------------------------------------------------------
  65. //
  66. // $Log:$
  67. //
  68. //-----------------------------------------------------------------------------