From: xonotic Date: Thu, 18 Mar 2010 13:30:15 +0000 (+0100) Subject: initial checkin from nexuiz svn r8756 X-Git-Tag: xonotic-v0.1.0preview~185 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f39243ecac54abcbde4fa35e312fdcfb92091dfc;p=xonotic%2Fxonotic-maps.pk3dir.git initial checkin from nexuiz svn r8756 --- f39243ecac54abcbde4fa35e312fdcfb92091dfc diff --git a/maps/_init/_init.bsp b/maps/_init/_init.bsp new file mode 100644 index 00000000..fc9e04c8 Binary files /dev/null and b/maps/_init/_init.bsp differ diff --git a/maps/_init/_init.map b/maps/_init/_init.map new file mode 100644 index 00000000..2dcb4cb4 --- /dev/null +++ b/maps/_init/_init.map @@ -0,0 +1,12 @@ +{ +"classname" "__init_dedicated_server" +// brush 0 +{ +( 0 0 0 ) ( 0 1 0 ) ( 0 0 1 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +( 0 0 0 ) ( 1 0 0 ) ( 0 1 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +( 0 0 0 ) ( 0 0 1 ) ( 1 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +( 1 1 1 ) ( 1 1 0 ) ( 1 0 1 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +( 1 1 1 ) ( 1 0 1 ) ( 0 1 1 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +( 1 1 1 ) ( 0 1 1 ) ( 1 1 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0 +} +} diff --git a/maps/desertfactory.bgs-maker.pl b/maps/desertfactory.bgs-maker.pl new file mode 100644 index 00000000..f55ae926 --- /dev/null +++ b/maps/desertfactory.bgs-maker.pl @@ -0,0 +1,77 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $dt = 0.5; +my $pattern = ''; +my $time = 0; +my $staccato = 0.25; +my @script = (); + +while() +{ + chomp; + my (@arg) = split /\s+/, $_; + if($arg[0] eq 'time') + { + $time = $arg[1]; + } + elsif($arg[0] eq 'bpm') + { + $dt = 60.0 / $arg[1]; + } + elsif($arg[0] eq 'pattern') + { + $pattern = $arg[1]; + } + elsif($arg[0] eq 'range') + { + my ($begin, $end) = ($arg[1], $arg[2]); + my $n = $end - $begin; + for(0..($n - 1)) + { + my $char = substr $pattern, ($_ % length $pattern), 1; + push @script, [$char, $time, 1], [$char, $time + $dt * (1 - $staccato), 0] + unless $char eq '_'; + $time += $dt; + } + } +} + +for(sort { $a->[0] cmp $b->[0] or $a->[1] <=> $b->[1] } @script) +{ + printf "%s %f %d\n", @$_; +} + +__DATA__ +time 0.200 +bpm 254 +pattern aaa_____aaa_____ +range 0 32 +pattern aaa_b__caaa_bccc +range 32 160 +pattern aaa_b__caaa_b__c +range 160 272 +pattern aaa_b__caaa_b_bb +range 272 288 +pattern abc_c_c_c_c_c_c_ +range 288 352 +pattern aaa_b__caaa_bccc +range 352 480 +pattern aaa_b__caaa_b__c +range 480 592 +pattern aaa_b__caaa_b_bb +range 592 608 +pattern aaa_b__caaa_b__c +range 608 656 +pattern aaa_b__caaa_b_bb +range 656 672 +pattern aaa_b__caaa_b__c +range 672 720 +pattern aaa_b__caaa_b_bb +range 720 736 +pattern aaa_b__caaa_b__c +range 736 864 +pattern a_______________ +range 864 865 diff --git a/maps/entmerge.rb b/maps/entmerge.rb new file mode 100644 index 00000000..691d2912 --- /dev/null +++ b/maps/entmerge.rb @@ -0,0 +1,157 @@ +#!/usr/bin/ruby + +require 'yaml' + +def preprocess(s) + return s.split(/\r?\n/).find_all() do |l| l[0, 2] != '//' end +end + +base = ARGV[0] + +mapstr = File.read("#{base}.map") +entstr = File.read("#{base}.ent") + +# backup +File.open("#{base}.map~", "w") do |fh| + fh.write(mapstr) +end +File.open("#{base}.ent~", "w") do |fh| + fh.write(entstr) +end + +def brushparse(l, index) + brush = [] + nest = 0 + while index < l.length() + case l[index] + when '}' + nest -= 1 + if nest < 0 + break + else + brush << '}' + end + when '{' + nest += 1 + brush << '{' + when %r{^(.*)$} + brush << $1 + when '' + true + else + raise SyntaxError, "in brush: " + l[index] + end + index += 1 + end + return index, brush +end + +def entparse(l, index) + entity = {} + brushes = [] + while index < l.length() + case l[index] + when '}' + break + when '{' + index, brush = brushparse(l, index + 1) + brushes << brush + when %r{^"([^"]*)" "(.*)"$} + entity[$1] = $2 + when '' + true + else + raise SyntaxError, "in entity: " + l[index] + end + index += 1 + end + if brushes != [] + entity[:brushes] = brushes + end + return index, entity +end + +def mapparse(l) + allents = [] + index = 0 + while index < l.length() + case l[index] + when '{' + index, entity = entparse(l, index + 1) + allents << entity + when '' + true + else + raise SyntaxError, "in map: " + l[index] + end + index += 1 + end + return allents +end + + + +def brushout(b) + yield '{' + b.each() do |l| + yield l + end + yield '}' +end + +def entout(e) + yield '{' + e.each() do |k, v| + next if k == :brushes + yield '"%s" "%s"' % [k, v] + end + if e[:brushes] + e[:brushes].each() do |b| + brushout(b) do |l| + yield l + end + end + end + yield '}' +end + +def mapout(entities) + entities.each() do |e| + entout(e) do |l| + yield l + end + end +end + +map = mapparse(preprocess(mapstr)) +ent = mapparse(preprocess(entstr)) + +submodels = [] +unchanged = [] + +map.each() do |e| + case + when e['classname'] == 'light' + unchanged << e + when e['classname'] == 'func_group' + unchanged << e + when e[:brushes] + submodels << e[:brushes] + end +end + +ent.each() do |e| + case + when (e['classname'] == 'worldspawn') || (e['model'] && e['model'][0, 1] == '*') + e.delete('model') + e[:brushes] = submodels.shift() + end +end + +File.open("#{base}.map", "w") do |fh| + mapout(ent + unchanged) do |l| + fh.puts(l) + end +end + +File.unlink("#{base}.ent") diff --git a/maps/tutorial_bot.txt b/maps/tutorial_bot.txt new file mode 100644 index 00000000..f8c09a90 --- /dev/null +++ b/maps/tutorial_bot.txt @@ -0,0 +1,4 @@ +//bot configuration: name model skin shirt-color pants-color team-override +//default team values (team-override): 1 = red, 2 = blue, 3 = yellow, 4 = pink +//use -1 for shirt-color or pants-color to get random colors +Tutor grunt 0 1 0 0 diff --git a/textures/common/antiportal.tga b/textures/common/antiportal.tga new file mode 100644 index 00000000..c9c5eaaa Binary files /dev/null and b/textures/common/antiportal.tga differ diff --git a/textures/common/camera.tga b/textures/common/camera.tga new file mode 100644 index 00000000..65773b5d Binary files /dev/null and b/textures/common/camera.tga differ diff --git a/textures/common/caulk.tga b/textures/common/caulk.tga new file mode 100644 index 00000000..1db38503 Binary files /dev/null and b/textures/common/caulk.tga differ diff --git a/textures/common/clip.tga b/textures/common/clip.tga new file mode 100644 index 00000000..7e8a569f Binary files /dev/null and b/textures/common/clip.tga differ diff --git a/textures/common/donotenter.tga b/textures/common/donotenter.tga new file mode 100644 index 00000000..36aa28ce Binary files /dev/null and b/textures/common/donotenter.tga differ diff --git a/textures/common/forcecaulk.tga b/textures/common/forcecaulk.tga new file mode 100644 index 00000000..31141b1c Binary files /dev/null and b/textures/common/forcecaulk.tga differ diff --git a/textures/common/full_clip.tga b/textures/common/full_clip.tga new file mode 100644 index 00000000..f5393bf2 Binary files /dev/null and b/textures/common/full_clip.tga differ diff --git a/textures/common/hint.tga b/textures/common/hint.tga new file mode 100644 index 00000000..0f2c571a Binary files /dev/null and b/textures/common/hint.tga differ diff --git a/textures/common/invisible.tga b/textures/common/invisible.tga new file mode 100644 index 00000000..cc20c8fc Binary files /dev/null and b/textures/common/invisible.tga differ diff --git a/textures/common/nodraw.tga b/textures/common/nodraw.tga new file mode 100644 index 00000000..e4af425c Binary files /dev/null and b/textures/common/nodraw.tga differ diff --git a/textures/common/origin.tga b/textures/common/origin.tga new file mode 100644 index 00000000..76d8c24f Binary files /dev/null and b/textures/common/origin.tga differ diff --git a/textures/common/skip.tga b/textures/common/skip.tga new file mode 100644 index 00000000..170a5294 Binary files /dev/null and b/textures/common/skip.tga differ diff --git a/textures/common/trigger.tga b/textures/common/trigger.tga new file mode 100644 index 00000000..63a8a14a Binary files /dev/null and b/textures/common/trigger.tga differ diff --git a/textures/common/warpzone.tga b/textures/common/warpzone.tga new file mode 100644 index 00000000..c6a70b0a Binary files /dev/null and b/textures/common/warpzone.tga differ