ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-world.ext
(Generate patch)

Comparing deliantra/server/ext/map-world.ext (file contents):
Revision 1.4 by root, Sun Jan 21 13:40:42 2007 UTC vs.
Revision 1.6 by root, Wed Jan 24 03:13:21 2007 UTC

38 $self->tile_path (2, sprintf "/world/world_%03d_%03d", $x, $y + 1) if $y < 999; 38 $self->tile_path (2, sprintf "/world/world_%03d_%03d", $x, $y + 1) if $y < 999;
39 $self->tile_path (3, sprintf "/world/world_%03d_%03d", $x - 1, $y) if $x > 0; 39 $self->tile_path (3, sprintf "/world/world_%03d_%03d", $x - 1, $y) if $x > 0;
40 40
41 $self->outdoor (1); 41 $self->outdoor (1);
42 42
43 $self->name ("'The World' at +$x+$y");
43 $self->msg ("worldmap dynamically created by map-world extension"); 44 $self->msg ("worldmap dynamically created by map-world extension");
44 45
45 #TODO: region 46 #TODO: region
46 47
47 $self->{load_path} = sprintf "%s/%s/world-overlay/world_%03d_%03d", cf::datadir, cf::mapdir, $x, $y 48 $self->{load_path} = sprintf "%s/%s/world-overlay/world_%03d_%03d", cf::datadir, cf::mapdir, $x, $y
76sub post_load { 77sub post_load {
77 my ($self) = @_; 78 my ($self) = @_;
78 79
79 my ($x, $y) = $self->wxwy; 80 my ($x, $y) = $self->wxwy;
80 81
82 return
83 unless $x >= $WORLD->{minx} && $x <= $WORLD->{maxx}
84 && $y >= $WORLD->{miny} && $y <= $WORLD->{maxy};
85
81 my $stride = ($WORLD->{maxx} - $WORLD->{minx} + 1) * $WORLD->{tilew}; 86 my $stride = ($WORLD->{maxx} - $WORLD->{minx} + 1) * $WORLD->{tilew};
82 my $top = ($y - $WORLD->{miny}) * $WORLD->{tileh} * $stride 87 my $top = ($y - $WORLD->{miny}) * $WORLD->{tileh} * $stride
83 + ($x - $WORLD->{minx}) * $WORLD->{tilew}; 88 + ($x - $WORLD->{minx}) * $WORLD->{tilew};
84 89
85 for my $Y (0 .. $WORLD->{tileh} - 1) { 90 for my $Y (0 .. $WORLD->{tileh} - 1) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines