ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/Map.pm
(Generate patch)

Comparing deliantra/gde/GCE/Map.pm (file contents):
Revision 1.8 by root, Sun Feb 5 20:53:13 2006 UTC vs.
Revision 1.9 by root, Sun Feb 5 21:03:10 2006 UTC

302 or (warn "arch '$a->{_name}' not found at ($x|$y)\n"), next; 302 or (warn "arch '$a->{_name}' not found at ($x|$y)\n"), next;
303 303
304 my $tile = $TC->{$a->{face} || $o->{face}} 304 my $tile = $TC->{$a->{face} || $o->{face}}
305 or (warn "no gfx found for arch '$a->{_name}' at ($x|$y)\n"), next; 305 or (warn "no gfx found for arch '$a->{_name}' at ($x|$y)\n"), next;
306 306
307 push @$os, 307 if ($tile->{w} > 1 || $tile->{h} > 1) {
308 $tile->{idx} + $o->{x} * $tile->{w} + $o->{y}; 308 # bigfaces
309 for my $ox (0 .. $tile->{w} - 1) {
310 for my $oy (0 .. $tile->{h} - 1) {
311 push @ov, [$x + $ox, $y + $oy,
312 $tile->{idx} + $ox + $oy * $tile->{w}];
313 }
314 }
309 315
310 if ($o->{more}) { 316 } elsif ($o->{more}) {
311 while ($o = $o->{more}) { 317 # linked faces
318 do {
312 my $tile = $TC->{$o->{face}} 319 my $tile = $TC->{$o->{face}}
313 or (warn "no gfx found for arch '$a->{_name}' at ($x*|$y*)\n"), next; 320 or (warn "no gfx found for arch '$a->{_name}' at ($x*|$y*)\n"), next;
314 push @ov, [$x + $o->{x}, $y + $o->{y}, 321 push @ov, [$x + $o->{x}, $y + $o->{y},
315 $tile->{idx} + $o->{x} * $tile->{w} + $o->{y}]; 322 $tile->{idx} + $o->{x} + $o->{y} * $tile->{w}];
316 } 323 } while $o = $o->{more};
324
325 } else {
326 # single face
327 push @$os, $tile->{idx};
328
317 } 329 }
318 } 330 }
319 } 331 }
320 } 332 }
321 333

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines