20 if(/^\/\*QUAKED (\S+) \((\S+ \S+ \S+)\) \((\S+ \S+ \S+)\) \((\S+ \S+ \S+)\) ?(.*)/)
22 print "<point name=\"$1\" color=\"$2\" box=\"$3 $4\">\n";
23 $closetag = "</point>";
24 @spawnflags = split / /, $5;
26 elsif(/^\/\*QUAKED (\S+) \((\S+ \S+ \S+)\) \? ?(.*)/)
28 print "<group name=\"$1\" color=\"$2\">\n";
29 $closetag = "</group>";
30 @spawnflags = split / /, $3;
36 elsif(/^([0-9a-z_]*): +(.*)/)
38 print "<string key=\"$1\" name=\"$1\">$2</string>\n";
40 elsif(/^([0-9A-Z_]*): +(.*)/)
42 my $bit = [grep { $spawnflags[$_] eq $1; } 0..@spawnflags-1]->[0];
43 warn "Cannot find bit $1 in @spawnflags\n"
45 print "<flag key=\"$1\" name=\"$1\" bit=\"$bit\">$2</flag>\n";