Commit graph

71 commits

Author SHA1 Message Date
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Randy Heit
a16f92c508 Convert "lump" names from directories to lowercase
- Zip and 7z already do this. Directories should too.
2016-03-01 08:49:43 -06:00
Christoph Oelckers
4d2a52418f - added an errorlog option.
This cuts down on as much message noise as possible, outputs everything to a file specified as a parameter and then quits immediately, allowing this to run from a batch that's supposed to check a larger list of files for errors.
Multiple outputs get appended if the file already exists.
2016-02-09 14:20:49 +01:00
alexey.lysiuk
262580c92f Updated LZMA SDK to version 15.14
Enabled support for PPMD compression method
2015-12-31 17:25:49 +02:00
Christoph Oelckers
6fc63daabd - fixed: Zips whose central directory cannot be read need to print an error message. 2015-04-13 22:08:44 +02:00
Christoph Oelckers
a81dd798a8 - fixed incorrect memset argument. 2015-04-11 14:35:32 +02:00
Christoph Oelckers
9b95c134a7 - fixed: Lumps from a directory need to store the full file path so that they still can be accessed when the internal path is changed due to a filter directory. 2015-04-09 09:14:53 +02:00
Christoph Oelckers
4971e7def1 - another GCC countof fix... 2015-04-06 21:40:14 +02:00
Christoph Oelckers
258822ef3b - redid autoload handler and resource file filtering to use the newly defined method with multi-part names.
As a result the old 'Group' property could be removed and all other means to get a section name were disabled.
As an example, if the code gets 'doom.doom2.commercial' it will use the following sections in this order:

global.autoload
doom.autoload
doom.doom2.autoload
doom.doom2.commercial.autoload.
2015-04-06 11:57:12 +02:00
Randy Heit
62d036a63e Added gametype-based filter
- For when IWADs are too specific, filter by the base gametype too.
- Minor small edits to the sndinfo.txt files so that zipdir will notice
  the changes, since it doesn't check path names when checking for
  file differences.
2015-04-05 20:24:49 -05:00
Randy Heit
6da887c34f Use Truncate to chop off extension in LumpNameSetup.
- Left() always creates a new string. Truncate() can reuse the old one if
  it only has one reference.
2015-04-04 18:20:05 -05:00
Randy Heit
4315423200 Rename ns_invalid to ns_hidden
- Also use ns_hidden by name in LumpNameSetup().
2015-04-04 18:20:04 -05:00
Randy Heit
2103fe2a14 Make FResourceLump::LumpNameSetup's argument an FString 2015-04-04 18:20:03 -05:00
Christoph Oelckers
1fddd1859e - fixed: FResourceFile::FilterLumps must use a proper copy of the filename to pass to LumpNameSetup instead of a pointer to the file name's stringbuffer, because that function will overwrite the variable it is taken from. 2015-04-05 00:38:29 +02:00
Christoph Oelckers
6e45c565a0 - fixed: FResourceLump::LumpNameSetup's iname parameter can point to the FullName variable's stringbuffer so any assignment to that variable must be done indirectly. 2015-04-04 20:52:55 +02:00
alexey.lysiuk
8b92c45f84 Fixed crash in lump filtering caused by uninitialized variables 2015-04-04 12:38:37 +03:00
Randy Heit
7b4d6e2f87 Add lump filtering for archive resources
- Multi-directory archives (e.g. zips) now support filtering lumps
  depending on the loaded IWAD. The search rules are the same as for the
  Autoload entries in the user's ini. For instance, if you are playing
  Doom 2, the following filters will be applied:
  * "filter/doom2/*"
  * "filter/doom/*"
  They will be renamed to strip out the "filter/doom2/" and "filter/doom/"
  parts and will be ordered so they take precedence over any files not
  inside a filter/ directory. Any files inside another filter/ directory
  (e.g. "filter/hexen/*") will be ignored.
2015-04-03 22:42:22 -05:00
Randy Heit
fc6f983c13 Fix memory leak when passing directories to -file 2015-04-03 21:50:08 -05:00
Randy Heit
efa82cf38b Consolidate archive sorting into FResourceFile base class 2015-04-03 20:22:18 -05:00
Randy Heit
966d0b7034 Use FString for FResourceLump::FullName 2015-04-03 20:00:58 -05:00
Randy Heit
308a036955 Ignored "compressed" lumps when running demo/shareware IWADs.
- The demo hexen.wad has this bit set for some lumps, which made it completely unplayable.
2015-03-08 17:40:58 -05:00
alexey.lysiuk
cce5066bea Improved check for skins and maps in the same WAD
The corresponding warning is shown for Doom I mods too. Good example of it is Hyena TC: http://www.doomworld.com/idgames/index.php?file=levels/doom/Ports/megawads/hyena.zip
Reduced chance of false positive for the mentioned warning
2015-01-31 13:14:30 +02:00
alexey.lysiuk
9df56216b3 Reworked check for embedded WADs put inside directory within archive
Any WAD from directory named the same as archive are treated as embedded
Fixed the issue with archive filename that wasn't taken into account
2015-01-12 11:28:40 +02:00
alexey.lysiuk
7ae3678abc Extended check for embedded WADs with one special case
Added loading of embedded WAD file if `myfile.wad` is placed in `myfile` directory inside `myfile.zip`
This helps with an unpleasant and very annoying fashion to zip a folder instead of just .wad and .txt files.
Recent examples include
Monster Hunter Ltd.: http://www.doomworld.com/idgames/?id=17601 and http://www.doomworld.com/idgames/?id=17625
Hell Awakened 2 Episode 1: http://www.doomworld.com/idgames/?id=17795
Bauhaus: http://www.doomworld.com/idgames/?id=17954
2015-01-11 11:43:43 +02:00
Randy Heit
7280d278d9 Fix VC2005 warning in F7ZFile::Open 2014-07-28 21:03:41 -05:00
Braden Obrzut
cb9877e7ff - Using USE_WINDOWS_DWORD on other platforms can cause problems. 2014-06-26 17:52:26 -04:00
Christoph Oelckers
270541f942 fixed compilation with latest LZMA SDK on Windows.
LZMA SDK recently added an #include <windows.h> to its headers, meaning it's no longer safe to include its headers globally in platform independent files.
The following changes were necessary:

- rename DWORD type in zipdir.c
- add USE_WINDOWS_DWORD and reorder includes in file_7z.cpp
- wrap LZMA decoder stream into a local struct that's declared anonymously in files.h and adjust files.cpp for this change.
2014-06-26 09:43:51 +02:00
Christoph Oelckers
ca4179caa3 - allow texture lookup by full path names. Due to technical limitations this may result in double textures if the same graphics lump is also referenced by its short texture name. 2014-05-13 20:51:16 +02:00
Christoph Oelckers
ea7fb936a8 - fixed: memory allocation for file names in 7z archives was broken. Changing it to use TArray instead of alloca makes it work. 2014-05-08 10:33:32 +02:00
alexey.lysiuk
3af7d8a245 Added support for LZMA2 compression method in .7z archives
Updated LZMA SDK to version 9.20
http://www.7-zip.org/sdk.html
http://downloads.sourceforge.net/sevenzip/lzma920.tar.bz2
2014-04-27 13:05:40 +03:00
alexey.lysiuk
6b26b710b8 Added simple check for unsupported compression method in .7z files 2014-04-27 10:23:20 +03:00
alexey.lysiuk
3fa89b4e9f Fixed crash on attempt to load corrupted data file
Instance of FileReader is no longer destructed when header of data file is valid but complete loading of file fails
Loading of truncated .zip file is the simplest test case
2014-04-27 10:18:50 +03:00
alexey.lysiuk
878dcdc0a4 Fix loading of lumps from directory on OS X
Use POSIX-compliant opendir() / readdir() functions instead fts_open() / fts_read()
Unlike Linux version, on OS X fts_read() inserts extra slash character between source directory and traversed entry paths
2014-04-06 12:56:51 +03:00
alexey.lysiuk
5c05f1f3cd - Ignored dehacked.exe from *.zip files to enable loading of *.deh files. 2013-08-02 10:17:06 +03:00
Christoph Oelckers
db562142f0 - Fix c++11 literal suffix warnings / patch by Edward-san. 2013-07-22 22:25:44 +02:00
Braden Obrzut
478bfa6cf1 - Fixed: file_directory tried to free it's input parameter.
SVN r4174 (trunk)
2013-03-07 22:16:09 +00:00
Randy Heit
3eb9953930 - Fix type conversion warning in file_wad.cpp.
SVN r3992 (trunk)
2012-12-21 22:48:40 +00:00
Braden Obrzut
d833a6015d - Fixed some compiler warnings.
SVN r3901 (trunk)
2012-10-22 23:47:09 +00:00
Braden Obrzut
cd2c1f6816 - Remove 255 character length restriction on lump names.
- Removed directory checking for big endian wads since the header check should be sufficient.

SVN r3899 (trunk)
2012-10-22 21:58:52 +00:00
Braden Obrzut
4b218c1c18 - Added support for compression in wads and big endian wads (which basically means the Jaguar Doom wad can be loaded as a pwad although it's pretty ugly since the graphic formats aren't supported).
SVN r3898 (trunk)
2012-10-22 19:54:13 +00:00
Randy Heit
fd784b05c2 - Fix some GCC 4.7.1 warnings.
SVN r3747 (trunk)
2012-07-07 03:43:11 +00:00
Randy Heit
de8bf651f2 - Fix warnings reported by gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
SVN r3293 (trunk)
2011-09-14 23:24:32 +00:00
Randy Heit
2add3fb381 - Merge voxels back into trunk. Even if it needs further tweaking, it should at least be stable now.
SVN r3086 (trunk)
2011-01-02 18:02:27 +00:00
Randy Heit
b53baf5f46 - Added support for Blood's ambient sounds, because I thought it would be an easy way to
test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the
  Build/Blood stuff first, it would have been.)

SVN r2223 (trunk)
2010-03-18 05:01:10 +00:00
Randy Heit
aedb646a52 - Fixed: Blood sound effect namespacing was broken.
SVN r2220 (trunk)
2010-03-18 03:55:51 +00:00
Randy Heit
8e104d0a28 - Fixed: RFF files constructed incorrect full names for the files they contained.
SVN r2217 (trunk)
2010-03-18 01:48:48 +00:00
Randy Heit
054e5411bd - Fixed: Checking for BUILD maps only worked if they came from unencrypted and
uncompressed sources.

SVN r2216 (trunk)
2010-03-18 01:07:50 +00:00
Christoph Oelckers
90ea0c3f6f - added initial support for a GAMEINFO lump in PWADs. When the game is started
all files loaded with '-file' are scanned for this lump. This lump is read
  before any WAD initialization takes place, in particular the IWAD is not yet
  loaded at this time. This allows PWADs the option to specify an IWAD they 
  want to run with and optionally autoload external resource WADs.
- Fixed a few places where FixPathSeperator was called with a locked FString buffer.
  It's better to use the FString version of this function instead.


SVN r2073 (trunk)
2010-01-01 15:31:00 +00:00
Christoph Oelckers
9aa1e20c77 - Added Blzut3's Solaris patch.
SVN r2070 (trunk)
2010-01-01 09:21:04 +00:00
Randy Heit
a0d6a47daf - Maps inside zips can now satisfy the map checks for IWAD detection.
- Fixed: F7ZFile did not delete its Archive when destroyed.


SVN r1967 (trunk)
2009-11-10 02:29:18 +00:00