Remove old junk.

This commit is contained in:
Simon Howard 2006-05-10 16:25:46 +00:00
parent c43922ecff
commit 9fe6030c32
18 changed files with 0 additions and 6740 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,96 +0,0 @@
#!/bin/sh
# OLD BUILD SCRIPT
# THIS IS DEPRECATED, USE 'make'
echo "use make"
exit
export DOOMWADDIR="/usr/share/games/doom"
# create the dynamic titlepic :)
cd graphics/titlepic
./create_caption
cd ../..
# update wadinfo.txt
./wadinfo-builder.pl < wadinfo.txt.real > wadinfo.txt
#---------------------------------------------------------
# build wad
echo "** main build **" > build.output
echo "** main build **" > build.errors
echo "main build"
rm -f wads/freedoom.wad
deutex -rgb 0 255 255 -lumps -patch -flats -sounds -musics -graphics -sprites -build wadinfo.txt wads/freedoom.wad >> build.output 2>> build.errors
# gzip wad
gzip < wads/freedoom.wad > wads/freedoom.wad.gz
#---------------------------------------------------------
# build levels wad
echo "** levels build **" >> build.output
echo "** levels build **" >> build.errors
echo "levels build"
rm -f wads/freedoom_levels.wad
deutex -levels -build wadinfo.txt wads/freedoom_levels.wad >> build.output 2>> build.errors
# gzip
gzip < wads/freedoom_levels.wad > wads/freedoom_levels.wad.gz
#---------------------------------------------------------
# build texture wad
echo "** textures build **" >> build.output
echo "** textures build **" >> build.errors
echo "texture build"
rm -f wads/freedoom_textures.wad
deutex -rgb 0 255 255 -patch -flats -build wadinfo.txt wads/freedoom_textures.wad >> build.output 2>> build.errors
gzip < wads/freedoom_textures.wad > wads/freedoom_textures.wad.gz
#---------------------------------------------------------
# build sprites wad
echo "** sprites build **" >> build.output
echo "** sprites build **" >> build.errors
echo "sprites build"
rm -f wads/freedoom_sprites.wad
deutex -sprites -rgb 0 255 255 -build wadinfo.txt wads/freedoom_sprites.wad >> build.output 2>> build.errors
gzip < wads/freedoom_sprites.wad > wads/freedoom_sprites.wad.gz
#---------------------------------------------------------
# build sounds wad
echo "** sounds build **" >> build.output
echo "** sounds build **" >> build.errors
echo "sounds build"
rm -f wads/freedoom_sounds.wad
deutex -sounds -musics -build wadinfo.txt wads/freedoom_sounds.wad >> build.output 2>> build.errors
echo "gzipping"
gzip < wads/freedoom_sounds.wad > wads/freedoom_sounds.wad.gz
# output
cat build.output build.errors
# md5sum
cd wads
md5sum `ls *.wad *.wad.gz` > freedoom.md5sum
cd ..

View file

@ -1,34 +0,0 @@
#!/usr/bin/perl
sub do_dir {
my ($dir, $extn) = @_;
my @files = glob("$dir/*.$extn");
my %spriteowners = {};
print "[$dir]\n\n";
foreach (@files) {
my $link = readlink ($_);
next if (!$link);
my ($owner) = $link;
my $base = $_;
$base =~ s/^\w*\///;
$base =~ s/\.$extn//;
$owner =~ s/\/.*$//;
print "$base: $owner\n";
}
print "\n";
}
do_dir "graphics", "gif";
do_dir "levels", "wad";
do_dir "sprites", "gif";
do_dir "flats", "gif";
do_dir "patches", "gif";
do_dir "lumps", "lmp";

View file

@ -1,53 +0,0 @@
#!/usr/bin/perl
#
# extract graphic offsets for graphics and sprites
# replace entries in the shareware wadinfo.txt with the appropriate
# lines from the main wadinfo.txt
open(WADINFO, "wadinfo.txt.in") or die "cant open wadinfo.txt";
my %resdata;
my $grafmode = 0;
while(<WADINFO>) {
chomp;
s/\#.*$//; # comments
next if (/^\s*$/);
if (/\[.*\]/) {
my $section = $_;
$section =~ s/\[(.*)\]/$1/;
$grafmode = $section eq "graphics" || $section eq "sprites";
} elsif ($grafmode) {
$sprname = lc $_;
$sprname =~ s/\s.*$//;
$resdata{$sprname} = $_;
}
}
close(WADINFO);
open(WADINFO, "wadinfo_sw.txt.in.in") or die "cant open wadinfo_sw.txt";
while (<WADINFO>) {
chomp;
if (/\s*\#.*$/ || /^\s*$/) {
} elsif (/\[.*\]/) {
my $section = $_;
$section =~ s/\[(.*)\]/$1/;
$grafmode = $section eq "graphics" || $section eq "sprites";
} elsif ($grafmode) {
$sprname = lc $_;
$sprname =~ s/\s.*$//;
if ($resdata{$sprname}) {
$_ = $resdata{$sprname} . "\t\t# forwarded from wadinfo.txt";
}
}
print "$_\n";
}
close(WADINFO);

View file

@ -1 +0,0 @@
graf-extract.pl

View file

@ -1,135 +0,0 @@
#!/usr/bin/perl
#
# front end part of the hires patch->texture convertor to be
#
use strict;
my %textures;
my %patches;
sub file_date {
my ($file) = @_;
return 0;
}
sub get_patches {
open(PATCHES, "textures/patchsizes") or die "cant open patchsizes";
%patches = {};
foreach (<PATCHES>) {
chomp;
my @fields = split(/\s+/);
my $file = "patches_hi/$fields[0].png";
my $newpatch = {
name => $fields[0],
width => $fields[1],
height => $fields[2],
file => $file,
exists => -e $file,
date => file_date($file)+1,
};
# store in hash
$patches{$fields[0]} = $newpatch;
}
close(PATCHES);
}
sub get_textures {
open(TEXTURES, "textures/combined/texture1.txt") or die "cant open texture1.txt";
%textures = {};
my $curtext = undef;
foreach(<TEXTURES>) {
chomp;
next if (/^\#/ || /^\;/ || /^\s*$/);
$_ = lc $_;
my @fields = split(/\s+/);
if ($fields[0] eq "\*") {
# another patch
my $newpatch = {
patch => $patches{$fields[1]},
x => $fields[2],
y => $fields[3],
};
my $curpatches = $curtext->{patches};
push(@$curpatches, $newpatch);
} else {
# new texture
my $file = "patches_hi/.tga/$fields[0]";
my $patchlist = [];
$curtext = {
name => $fields[0],
file => $file,
width => $fields[1],
height => $fields[2],
date => file_date($file),
patches => $patchlist,
};
# get file date of existing file?
$textures{$fields[0]} = $curtext;
}
}
close(TEXTURES);
}
sub build_texture {
my ($this) = @_;
print "build texture $this->{name}\n";
}
sub dep_loop {
mainloop: foreach (keys %textures) {
my $this = $textures{$_};
my $patchlist = $this->{patches};
my $uptodate = 1;
#print "$_: " . @$patchlist . "\n";
foreach (@$patchlist) {
#print $this->{name} . " : " . $_->{patch}->{name} . "\n";
if (!$_->{patch}->{exists}) {
# a patch is missing, cant build this
#print $this->{name} . ": patch missing\n";
next mainloop;
}
if ($_->{patch}->{date} > $this->{date}) {
# if the date of one of the patches is
# newer than the date of the produced
# texture file, this is not up to date
$uptodate = 0;
}
}
if (!$uptodate) {
build_texture($this);
} else {
#print $this->{name} . ": up to date\n";
}
}
}
get_patches;
get_textures;
dep_loop;

View file

@ -1,23 +0,0 @@
#!/usr/bin/perl
#
# Convert all pngs to tgas
#
# clear out old tgas
`rm hires/*.tga`;
# get list of input files
@files = (glob ("flats_hi/*.png"), glob ("patches_hi/*.png"));
foreach(@files) {
$tgafile = $_;
$tgafile =~ s/.*\///;
$tgafile =~ s/png$/tga/;
$cmd = "pngtopnm < $_ | ppmtotga > hires/$tgafile 2>/dev/null";
#print "$cmd\n";
`$cmd`;
}

View file

@ -1 +0,0 @@
hires_build.pl

View file

@ -1,10 +0,0 @@
#!/usr/bin/perl
use strict;
while (<>) {
chomp;
`grep $_ CREDITS`;
print "$_ not found\n" if $?;
}

View file

@ -1,21 +0,0 @@
#!/usr/bin/perl
use strict;
my %people = {};
foreach (glob("*/*.*")) {
my $pointto = readlink($_);
if (!$pointto) {
print STDERR "$_ not a link\n";
} else {
my ($person) = ($pointto =~ /^(\w+)\//);
$people{$person} = 1 if $person;
}
}
foreach (keys %people) {
print "$_\n";
}

View file

@ -1 +0,0 @@
doom2tr not found

View file

@ -1,73 +0,0 @@
deathmaster213
darkstalker
spike
titlepic
tarin
airraid
bastetfurry
ravage
sirfragsalot
kaiser
ralphis
amarande
doom2
picklehammer
cph
doom2tr
fraggle
jond
espi
scubasteve
isle
archvile46
spinspyder
ajapted
wildweasel
lurker
railgunner
jayextee
andrewb
tobester
jonr
wildman
slayer226
csabo
meathead
edd
cacodemon_leader
nightfang
cyb
linguica
hyena
fredrik
locust
dsells
kurt
adamizer
draconio
rancor
mouse
enjay
mystic
torn
mellow
vicious
saint_of_killers
bloodshedder
submerge
sgtcrispy
kman
metabolist
HASH(0x80fbb0c)
julian
oblivion
mewse
ebola
nb_nmare
zigmund
lazer
zeurkous
maonth
jstepp
nrkn
geekmarine

View file

@ -1,11 +0,0 @@
#!/usr/bin/perl
#
# get dimensions of all patches
# run file -L patches/*.gif and pipe through this
while (<>) {
chomp;
s/^(.*)\.gif.*\s(\d+)\ x\ (\d+)$/$1\ $2\ $3/;
print "$_\n";
}

View file

@ -1,114 +0,0 @@
// -*- C++ -*-
//
// This reads the wadinfo.txt and outputs a new wadinfo.txt
// with the appropriate lines commented out for files which
// do not yet exist. This is so that wadinfo.txt can be
// automagically updated as we get more textures.
//
// This is also further proof that I need to learn perl.
//
// By Simon Howard (fraggle)
//
#include <stdio.h>
#include <string.h>
#include <dirent.h>
//
// check if a file exists in a subdirectory
// this ignores extension
// eg. if we do file_exists("flats", "ceil5_1")
// and a file flats/ceil5_1.gif exists it willl return 1
//
static int file_exists(char *dirname, char *filename)
{
DIR *dir;
struct dirent *direntry;
dir = opendir(dirname);
if(!dir) {
fprintf(stderr, "cannot open dir: %s\n", dirname);
exit(-1);
}
while(direntry = readdir(dir)) {
if(!strncasecmp(direntry->d_name, filename, strlen(filename))
&& direntry->d_name[strlen(filename)] == '.') {
closedir(dir);
return 1;
}
}
closedir(dir);
return 0;
}
int main(int argc, char *argv[])
{
char *section = NULL;
while(!feof(stdin)) {
char buffer[128];
char file[128];
buffer[0] = '\0';
fgets(buffer, 126, stdin);
{
char *p;
for(p=buffer+strlen(buffer)-1; p >= buffer; p--) {
if(isprint(*p))
break;
*p = '\0';
}
}
// comments and empty lines pass through
if(buffer[0] == '#' || buffer[0] == '\0') {
puts(buffer);
continue;
}
// section header
if(buffer[0] == '[') {
if(section)
free(section);
section = strdup(buffer+1);
*strchr(section, ']') = '\0';
puts(buffer);
if(!strcmp(section, "texture1") ||
!strcmp(section, "texture2")) {
strcpy(section, "textures");
}
continue;
}
// copy first word of the buffer
// into a second buffer
{
char *f, *b;
for(b=buffer, f=file;
!isspace(*b) && *b;)
*f++ = *b++;
*f = '\0';
}
if(!section || file_exists(section, file)) {
puts(buffer);
} else {
printf("#%s\n", buffer);
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff