The International Simutrans Forum

 

Author Topic: Patch: fix the clipping errors  (Read 9054 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
Re: Patch: fix the clipping errors
« Reply #35 on: April 09, 2010, 10:51:32 AM »
The powerlines could as well automatically return a valid front image:
...
Looks clearer then my fix.

Quote
The old system of two different types of ground is obsolete with your system, imho. Thus the two different ways of ground drawing could go I think,
Drawing everything in one sweep gives problems with moving objects that are not bound to ways (mainly airplane shadows and movingobj). They will be clipped at the lower borders of their tiles. Maybe one can substitute the draw-as-ding-flag by a flag that indicates that in the n/nw/w neighbors there is such an moving object.

Quote
and also the drawing ways as part of ground tiles.
This should work indeed, will try this out.
Edit: this works and would allow for more code cleanup. However, it would make it impossible to add a switch to toggle between old(faster?) and new(slower) method in the future.
« Last Edit: April 09, 2010, 11:10:10 AM by Dwachs »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
Re: Patch: fix the clipping errors
« Reply #36 on: April 09, 2010, 02:14:23 PM »
As the routines are messy enough I am for a cleanup. One can add a commetn to look back in svn to see the old version. (Maybe it will be also faster, since lots of conditions an no longer needed for bare grounds.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
Re: Patch: fix the clipping errors
« Reply #37 on: April 09, 2010, 06:44:38 PM »
Implemented as suggested: ways are drawn like other objects (rev 3155).

This was not a good idea at all  :P Airplanes produce errors when the shadow goes over streets. I think I will revert 3155: call display() for the ways in display_boden() again. I really do not know how to do this alternatively.
« Last Edit: April 10, 2010, 01:09:15 PM by Dwachs »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
Re: Patch: fix the clipping errors
« Reply #38 on: April 12, 2010, 06:09:09 PM »
Reverted 3155.

It remains to incorporate the simplification for powerlines and clipping for outline images (should fi sme problems with airplane shadows).

And ideas are needed to enable displaying in one sweep (if doing this now would give clipping errors with movingobj's and airplane shadows).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
Re: Patch: fix the clipping errors
« Reply #39 on: April 13, 2010, 09:03:58 AM »
I would say, leave this for the next renovation and just finish this would be good enough. Especially since we probably need some time to find the one or other still possible glitch or tiny error and maybe also optimize this a little before doing the next release.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
Re: Patch: fix the clipping errors
« Reply #40 on: April 14, 2010, 05:34:07 PM »
It remains to incorporate the simplification for powerlines
done. in rev 3164