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

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.91 by root, Tue Nov 7 22:41:27 2006 UTC vs.
Revision 1.92 by root, Wed Nov 8 01:22:00 2006 UTC

446} 446}
447 447
448sub set_magicmap { 448sub set_magicmap {
449 my ($self, $w, $h, $x, $y, $data) = @_; 449 my ($self, $w, $h, $x, $y, $data) = @_;
450 450
451 $x -= $::MAP->ox + int 0.5 * $::MAP->w; 451 $x -= $::MAP->ox + 1 + int 0.5 * $::MAP->w;
452 $y -= $::MAP->oy + int 0.5 * $::MAP->h; 452 $y -= $::MAP->oy + 1 + int 0.5 * $::MAP->h;
453 453
454 $self->{magicmap} = [$x, $y, $w, $h, $data]; 454 $self->{magicmap} = [$x, $y, $w, $h, $data];
455 455
456 $self->update; 456 $self->update;
457} 457}
530 } 530 }
531 531
532 if ($self->{magicmap}) { 532 if ($self->{magicmap}) {
533 my ($x, $y, $w, $h, $data) = @{ $self->{magicmap} }; 533 my ($x, $y, $w, $h, $data) = @{ $self->{magicmap} };
534 534
535 $x += $::MAP->ox - $sx + int 0.5 * ($::MAP->w - $sw + 1); 535 $x += $::MAP->ox + $self->{dx};
536 $y += $::MAP->oy - $sy + int 0.5 * ($::MAP->h - $sh + 1); 536 $y += $::MAP->oy + $self->{dy};
537 537
538 glTranslate - $x - 1, - $y - 1; 538 glTranslate - $x - 1, - $y - 1;
539 glBindTexture GL_TEXTURE_2D, $magicmap_tex->{name}; 539 glBindTexture GL_TEXTURE_2D, $magicmap_tex->{name};
540 $::MAP->draw_magicmap ($x, $y, $w, $h, $data); 540 $::MAP->draw_magicmap ($x, $y, $w, $h, $data);
541 } 541 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines