home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / deu53b9.zip / deu / source / d_wads.h < prev    next >
C/C++ Source or Header  |  1995-04-29  |  3KB  |  73 lines

  1. /*----------------------------------------------------------------------------*
  2.  | This file is part of DEU (Doom Editing Utilities), created by the DEU team:|
  3.  | Raphael Quinet, Brendon Wyber, Ted Vessenes and others.  See README.1ST or |
  4.  | the "about" dialog box for full credits.                                   |
  5.  |                                                                            |
  6.  | DEU is an open project: if you think that you can contribute, please join  |
  7.  | the DEU team.  You will be credited for any code (or ideas) included in    |
  8.  | the next version of the program.                                           |
  9.  |                                                                            |
  10.  | If you want to make any modifications and re-distribute them on your own,  |
  11.  | you must follow the conditions of the DEU license.  Read the file LICENSE  |
  12.  | in this directory or README.1ST in the top directory.  If do not have a    |
  13.  | copy of these files, you can request them from any member of the DEU team, |
  14.  | or by mail: Raphael Quinet, Rue des Martyrs 9, B-4550 Nandrin (Belgium).   |
  15.  |                                                                            |
  16.  | This program comes with absolutely no warranty.  Use it at your own risks! |
  17.  *----------------------------------------------------------------------------*
  18.  
  19.  D_WADS.H
  20.  
  21. */
  22.  
  23. #ifndef _D_WADS_H_
  24. #define _D_WADS_H_
  25.  
  26. /* global variables */
  27. extern WadPtr  WadFileList;      /* linked list of wad files */
  28. extern MDirPtr MasterDir;        /* the master directory */
  29.  
  30. /* prototypes */
  31. void OpenMainWad(char *filename);
  32. void OpenPatchWad(char *filename);
  33. void CloseWadFiles(void);
  34. void CloseUnusedWadFiles(void);
  35.  
  36. WadPtr BasicWadOpen(char *filename);
  37. void BasicWadRead(WadPtr wadfile, void huge *addr, long size);
  38. void BasicWadSeek(WadPtr wadfile, long offset);
  39.  
  40. MDirPtr FindMasterDir(MDirPtr from, char *name);
  41. void ListMasterDirectory(FILE *file);
  42. void ListFileDirectory(FILE *file, WadPtr wad);
  43. void BuildNewMainWad(char *filename, Bool patchonly);
  44.  
  45. void WriteBytes(FILE *file, void huge *addr, long size);
  46. void CopyBytes(FILE *dest, FILE *source, long size);
  47.  
  48. void DumpDirectoryEntry(FILE *file, char *entryname);
  49. void SaveDirectoryEntry(FILE *file, char *entryname);
  50. void SaveEntryToRawFile(FILE *file, char *entryname);
  51. void SaveEntryFromRawFile(FILE *file, FILE *raw, char *entryname);
  52.  
  53. #ifdef FAT_ENDIAN
  54. UInt16 SwapInt16(UInt16 x);
  55. UInt32 SwapInt32(UInt32 x);
  56. void WadReadInt16(WadPtr wadfile, UInt16 huge *x);
  57. void WadReadInt32(WadPtr wadfile, UInt32 huge *x);
  58. void WriteInt16(FILE *file, UInt16 huge *x);
  59. void WriteInt32(FILE *file, UInt32 huge *x);
  60.  
  61. #else
  62. #define SwapInt16(x)          (x)
  63. #define SwapInt32(x)          (x)
  64. #define WadReadInt16(w, p)    BasicWadRead((w), (p), 2L)
  65. #define WadReadInt32(w, p)    BasicWadRead((w), (p), 4L)
  66. #define WriteInt16(f, p)      WriteBytes((f), (p), 2L)
  67. #define WriteInt32(f, p)      WriteBytes((f), (p), 4L)
  68. #endif /* FAT_ENDIAN */
  69.  
  70. #endif /* _D_WADS_H_ */
  71.  
  72. /* end of file */
  73.