1 /* |
1 /* |
2 * WAD support routines for PhysicsFS. |
2 * WAD support routines for PhysicsFS. |
3 * |
3 * |
4 * This driver handles DOOM engine archives ("wads"). |
4 * This driver handles DOOM engine archives ("wads"). |
5 * This format (but not this driver) was designed by id Software for use |
5 * This format (but not this driver) was designed by id Software for use |
6 * with the DOOM engine. |
6 * with the DOOM engine. |
7 * The specs of the format are from the unofficial doom specs v1.666 |
7 * The specs of the format are from the unofficial doom specs v1.666 |
8 * found here: http://www.gamers.org/dhs/helpdocs/dmsp1666.html |
8 * found here: http://www.gamers.org/dhs/helpdocs/dmsp1666.html |
9 * The format of the archive: (from the specs) |
9 * The format of the archive: (from the specs) |
26 * (a) a long integer, the file offset to the start of the lump |
26 * (a) a long integer, the file offset to the start of the lump |
27 * (b) a long integer, the size of the lump in bytes |
27 * (b) a long integer, the size of the lump in bytes |
28 * (c) an 8-byte ASCII string, the name of the lump, padded with zeros. |
28 * (c) an 8-byte ASCII string, the name of the lump, padded with zeros. |
29 * For example, the "DEMO1" entry in hexadecimal would be |
29 * For example, the "DEMO1" entry in hexadecimal would be |
30 * (44 45 4D 4F 31 00 00 00) |
30 * (44 45 4D 4F 31 00 00 00) |
31 * |
31 * |
32 * Note that there is no way to tell if an opened WAD archive is a |
32 * Note that there is no way to tell if an opened WAD archive is a |
33 * IWAD or PWAD with this archiver. |
33 * IWAD or PWAD with this archiver. |
34 * I couldn't think of a way to provide that information, without being too |
34 * I couldn't think of a way to provide that information, without being too |
35 * hacky. |
35 * hacky. |
36 * I don't think it's really that important though. |
36 * I don't think it's really that important though. |
102 } /* WAD_openArchive */ |
102 } /* WAD_openArchive */ |
103 |
103 |
104 |
104 |
105 const PHYSFS_Archiver __PHYSFS_Archiver_WAD = |
105 const PHYSFS_Archiver __PHYSFS_Archiver_WAD = |
106 { |
106 { |
|
107 CURRENT_PHYSFS_ARCHIVER_API_VERSION, |
107 { |
108 { |
108 "WAD", |
109 "WAD", |
109 "DOOM engine format", |
110 "DOOM engine format", |
110 "Travis Wells <traviswells@mchsi.com>", |
111 "Travis Wells <traviswells@mchsi.com>", |
111 "http://www.3dmm2.com/doom/", |
112 "http://www.3dmm2.com/doom/", |
|
113 0, /* supportsSymlinks */ |
112 }, |
114 }, |
113 WAD_openArchive, /* openArchive() method */ |
115 WAD_openArchive, |
114 UNPK_enumerateFiles, /* enumerateFiles() method */ |
116 UNPK_enumerateFiles, |
115 UNPK_openRead, /* openRead() method */ |
117 UNPK_openRead, |
116 UNPK_openWrite, /* openWrite() method */ |
118 UNPK_openWrite, |
117 UNPK_openAppend, /* openAppend() method */ |
119 UNPK_openAppend, |
118 UNPK_remove, /* remove() method */ |
120 UNPK_remove, |
119 UNPK_mkdir, /* mkdir() method */ |
121 UNPK_mkdir, |
120 UNPK_closeArchive, /* closeArchive() method */ |
122 UNPK_stat, |
121 UNPK_stat /* stat() method */ |
123 UNPK_closeArchive |
122 }; |
124 }; |
123 |
125 |
124 #endif /* defined PHYSFS_SUPPORTS_WAD */ |
126 #endif /* defined PHYSFS_SUPPORTS_WAD */ |
125 |
127 |
126 /* end of wad.c ... */ |
128 /* end of archiver_wad.c ... */ |
127 |
129 |