From a99207809f38b14aaeea66ce1bc0a68899f4cbba Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 26 Apr 2009 11:23:57 +0000 Subject: [PATCH] minimap support to nexuiz-map-compiler git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6593 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- misc/tools/nexuiz-map-compiler | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/misc/tools/nexuiz-map-compiler b/misc/tools/nexuiz-map-compiler index 89e354d66..8f98b901b 100755 --- a/misc/tools/nexuiz-map-compiler +++ b/misc/tools/nexuiz-map-compiler @@ -27,6 +27,9 @@ use File::Temp; # Default flags for the -light stage our $LIGHTFLAGS = '-deluxe -patchshadows -samples 3 -lightmapsize 512 -bounce 8 -fastbounce -bouncegrid'; + # Default flags for the -minimap stage + our $MINIMAPFLAGS = ''; + # end of user changable part do "$ENV{HOME}/.nexuiz-map-compiler"; @@ -45,6 +48,7 @@ my $options = bsp => [split /\s+/, $BSPFLAGS], vis => [split /\s+/, $VISFLAGS], light => [split /\s+/, $LIGHTFLAGS], + minimap => [split /\s+/, $MINIMAPFLAGS], maps => [], scale => 1 }; @@ -67,6 +71,10 @@ while(@ARGV) { $enterflags = 'light'; } + elsif($_ eq '-minimap') + { + $enterflags = 'minimap'; + } elsif($_ eq '-map') { $curmode = 'maps'; @@ -83,6 +91,10 @@ while(@ARGV) { $options->{light} = undef; } + elsif($_ eq '-nominimap') + { + $options->{minimap} = undef; + } elsif($_ =~ /^-(-.*)/) { if($curmode eq 'maps') @@ -249,6 +261,11 @@ for my $m(@{$options->{maps}}) rename "${m}_s.bsp", "$m.bsp" or die "rename ${m}_s.bsp $m.bsp: $!"; } + if(defined $options->{minimap}) + { + q3map2 '-minimap', @{$options->{minimap}}, "$m.map" + or die "-minimap: $?"; + } unlink "$m.srf"; -- 2.17.1