ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra/MapWidget.pm (file contents):
Revision 1.22 by root, Fri Feb 17 10:28:46 2006 UTC vs.
Revision 1.23 by root, Mon Feb 20 23:20:47 2006 UTC

403 403
404 $_->[4]->($self, $_->[0] - $self->{x}, $_->[1] - $self->{y}) 404 $_->[4]->($self, $_->[0] - $self->{x}, $_->[1] - $self->{y})
405 for values %{ $self->{overlay} || {} }; 405 for values %{ $self->{overlay} || {} };
406} 406}
407 407
408sub change_begin {
409 my ($self, $title) = @_;
410
411 $self->{change} ||= {
412 title => $title,
413 };
414 $self->{change}{nest}++;
415}
416
417sub get { 408sub get {
418 my ($self, $x, $y) = @_; 409 my ($self, $x, $y) = @_;
419 410
420 return unless $x >= 0 && $x < $self->{map}{width} 411 return unless $x >= 0 && $x < $self->{map}{width}
421 && $y >= 0 && $y < $self->{map}{height}; 412 && $y >= 0 && $y < $self->{map}{height};
511 502
512 delete $self->{tipinfo}; $self->update_tooltip; 503 delete $self->{tipinfo}; $self->update_tooltip;
513 504
514} 505}
515 506
507sub change_begin {
508 my ($self, $title) = @_;
509
510 $self->{change} ||= {
511 title => $title,
512 };
513 $self->{change}{nest}++;
514}
515
516sub change_stack { 516sub change_stack {
517 my ($self, $x, $y, $as) = @_; 517 my ($self, $x, $y, $as) = @_;
518 518
519 $self->{change}{map}[$x][$y] ||= [$x, $y, $self->{map}{map}[$x][$y]]; 519 $self->{change}{map}[$x][$y] ||= [$x, $y, $self->{map}{map}[$x][$y]];
520 520

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines