From 78902b200988869fa889b46b2d202c77db0e8204 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 2 Sep 2009 02:17:11 +0000 Subject: [PATCH] - Fixed: Some dmadds wads used zero-length sprites as placeholders. When you ran dmadds to combine it with the IWAD's sprites, they would be replaced by the IWAD's sprites, so when loading such wads, we should ignore those as valid sprites. (Thanks to entryway for finding this.) See 22ventry's 22sprite.wad for an example. SVN r1782 (trunk) --- docs/rh-log.txt | 9 ++++++++- src/resourcefiles/file_wad.cpp | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5f79917b94..9dc48c875d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,11 @@ -August 31, 2009 +September 1, 2009 +- Fixed: Some dmadds wads used zero-length sprites as placeholders. When you + ran dmadds to combine it with the IWAD's sprites, they would be replaced by + the IWAD's sprites, so when loading such wads, we should ignore those as + valid sprites. (Thanks to entryway for finding this.) See 22ventry's + 22sprite.wad for an example. + +August 31, 2009 - Basic Mac support: Everything compiles but does not yet link. - Replaced the use of autoconf's WORDS_BIGENDIAN with __BIG_ENDIAN__, since latter comes predefined by GCC. diff --git a/src/resourcefiles/file_wad.cpp b/src/resourcefiles/file_wad.cpp index 1df3ef2acb..ffa9c85e86 100644 --- a/src/resourcefiles/file_wad.cpp +++ b/src/resourcefiles/file_wad.cpp @@ -250,10 +250,18 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name { if (!warned) { - Printf(TEXTCOLOR_YELLOW"WARNING: Overlapping namespaces found (lump %d.)\n", j); + Printf(TEXTCOLOR_YELLOW"WARNING: Overlapping namespaces found (lump %d)\n", j); } warned = true; } + else if (space == ns_sprites && Lumps[j].LumpSize < 8) + { + // sf 26/10/99: + // ignore sprite lumps smaller than 8 bytes (the smallest possible) + // in size -- this was used by some dmadds wads + // as an 'empty' graphics resource + DPrintf(" Skipped empty sprite %s (lump %d)\n", Lumps[j].Name, j); + } else { Lumps[j].Namespace = space;