multifood => 'C',
timematch => 'C',
race => 'C',
- ctf => 'Cx',
+ ctf => 'C',
+ reserved => 'x',
],
],
sprite => ['8C',
finish => [1,
type => 's',
message => 'Ca255',
- code => 'Ca255x256',
+ code => 'Ca255',
+ reserved=> 'x256',
],
hiname => 'a3',
levels => ['*', # levelcount->total actually
given ($fileversion) {
when (153) { } # current @FORMAT
$FORMAT[7] = 'Ca64'; # no reserved space after description
- $FORMAT[15]->[-1] = 'Ca255'; # enddata
+ splice @{ $FORMAT[15] }, -2; # finish reserve
$FORMAT[-1]->[-1]->[0] = '32C'; # less objects
- when ($version == 96) {
- ref $_ and $_->[-1] = 'C' for @{ $FORMAT[11] }; # 9 moderefs
- }
- ref $_ and pop @$_ for @{ $FORMAT[11] }; # only 8 moderefs
+ ref $_ and pop @$_ for @{ $FORMAT[11] }; # 9 moderefs
+ when ($version == 96) { }
+ ref $_ and pop @$_ for @{ $FORMAT[11] }; # only 8 moderefs (no ctf)
splice @FORMAT, 6, 2 if $version <= 94; # earlier version without description
when (95) { }
splice @{ $FORMAT[7] }, 4, 2; # no race
) }
[qw/single peaworm tron deathmatch foodmatch multifood timematch race ctf/]
],
- theanswer => 'C', # 42
+ theanswer => 'x', # 42
sprite => ['C',
line => 'B8',
],
$_->[13] = $_->[15]; # ctf
$_->[15] = 'domination';
} for @{ $FORMAT[9] }; # no multifood
- push @LEVELFORM, "object$_" => ['C',
+ push @LEVELFORM, "objects$_" => ['C',
+ type => "=$_",
map {$_ => 'C'} qw(x1 y1 x2 y2)
- ] for qw(lines boxes);
+ ] for 2, 3;
}
default {
die "Unsupported level version $version\n";
# add objects until terminator
$level->{objects} = [];
if ($version <= 91) {
- push @{ $level->{objects} }, { %$_, type => 2 } for map { $level->{$_} ? @{ $level->{$_} } : () } qw(objectlines);
- push @{ $level->{objects} }, { %$_, type => 3 } for map { $level->{$_} ? @{ $level->{$_} } : () } qw(objectboxes);
+ ref $_ eq 'ARRAY' and push @{ $level->{objects} }, @$_
+ for map { delete $level->{"objects$_"} } 2, 3;
$size += 1 + 4 * scalar @{ $level->{objects} };
}
else {