mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
For "full" IWADs, include all patches, instead of only patches found in TEXTURE1.
This commit is contained in:
parent
8b40c8fde3
commit
f043aadecf
2 changed files with 41 additions and 9 deletions
8
Makefile
8
Makefile
|
@ -40,8 +40,14 @@ textures/freedm/texture1.txt: textures/combined.txt
|
|||
textures/shareware/texture1.txt: textures/combined.txt
|
||||
$(CPP) -DSHAREWARE < $< > $@
|
||||
|
||||
textures/%/pnames.txt: textures/%/texture1.txt
|
||||
textures/shareware/pnames.txt: textures/shareware/texture1.txt
|
||||
./extract-pnames.pl < $< > $@
|
||||
textures/doom/pnames.txt: textures/doom/texture1.txt
|
||||
./extract-pnames.pl -a > $@
|
||||
textures/doom2/pnames.txt: textures/doom2/texture1.txt
|
||||
./extract-pnames.pl -a > $@
|
||||
textures/freedm/pnames.txt: textures/freedm/texture1.txt
|
||||
./extract-pnames.pl -a > $@
|
||||
|
||||
# update wadinfo.txt
|
||||
|
||||
|
|
|
@ -3,15 +3,41 @@
|
|||
use strict;
|
||||
my %patches;
|
||||
|
||||
while (<>) {
|
||||
if (/^\*/) {
|
||||
my ($name) = /^\*\s+(\w+)/;
|
||||
$name = uc $name;
|
||||
$patches{$name} = 1;
|
||||
}
|
||||
# Parse a TEXTURE1 file and generate a list of patches
|
||||
|
||||
sub parse_texture_file {
|
||||
|
||||
while (<>) {
|
||||
if (/^\*/) {
|
||||
my ($name) = /^\*\s+(\w+)/;
|
||||
$name = uc $name;
|
||||
$patches{$name} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
print "; autogenerated patch list\n\n";
|
||||
|
||||
foreach (sort keys %patches) { print "$_\n"; }
|
||||
}
|
||||
|
||||
print "; autogenerated patch list\n\n";
|
||||
# Generate a full list of textures from the files in the
|
||||
# patches/ directory
|
||||
|
||||
foreach (sort keys %patches) { print "$_\n"; }
|
||||
sub list_all_textures {
|
||||
print "; autogenerated patch list\n\n";
|
||||
|
||||
foreach my $file (glob("patches/*.gif")) {
|
||||
if ($file =~ /\/(.*)\.gif/) {
|
||||
print "$1\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (scalar @ARGV == 0) {
|
||||
parse_texture_file();
|
||||
} elsif ($ARGV[0] == "-a") {
|
||||
list_all_textures();
|
||||
} else {
|
||||
print "Usage: extract-pnames.pl [-a]\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue