The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: prissi on July 05, 2010, 08:51:10 PM

Title: New clipping error
Post by: prissi on July 05, 2010, 08:51:10 PM
Bus drives ontop of normal city buildings in front
Title: Re: New clipping error
Post by: Dwachs on July 06, 2010, 06:32:26 AM
ups. Is this one new or is this there since my change in the display routines?
Title: Re: New clipping error
Post by: prissi on July 06, 2010, 09:15:46 AM
I just noticed it today, so I think yes. Before this could not really happen, since this tile in question was drawn afterwards.
Title: Re: New clipping error
Post by: Dwachs on July 07, 2010, 07:55:54 AM
I can't reproduce this. Do you have a savegame?
Title: Re: New clipping error
Post by: prissi on July 07, 2010, 09:05:27 PM
Unfourtunately no, it was was a test on a 1024x1024 map with maximum roughness andd hilly (320/7) and 160 town with 16000 size. Maybe tere are invisible slopes?

EDIT: just found it again: http://rapidshare.com/files/405580525/display-clip.sve
Title: Re: New clipping error
Post by: Dwachs on July 08, 2010, 05:14:11 AM
Nothing wrong there.

Did you use the 8-bit version?
Title: Re: New clipping error
Post by: prissi on July 08, 2010, 12:53:49 PM
Strange, now it is also gone ... seems to happen only on freshly generated maps.
Title: Re: New clipping error
Post by: prissi on September 04, 2010, 09:41:54 PM
Some further results: This error happens only after jumping to a previously invisible location using the minimap window. Use the pak64 game from the test server and center on Berlin (for instance) will give clipping errors. (Any other place might be as well.) It does not happen all the times though.
Title: Re: New clipping error
Post by: Dwachs on September 05, 2010, 12:19:34 PM
I cant reproduce it :/ Does the error go away after some steps? Does it go away if the game is paused?

I cannot imagine how clicking in the minimap can disturb the displaying algorithm that much. In all the decisions "when to display what" do not depend on actual position of the map on the screen.
Title: Re: New clipping error
Post by: prissi on September 05, 2010, 07:01:38 PM
It happens on one out in five times. It seems to happens epseically when the cache of objects in exhausteed (like I saw the dock in player color 1, 3 and 15) It will be usually gone after a restart, with a 90% chance. Sorry to have it not more reproducable.
Title: Re: New clipping error
Post by: Dwachs on September 06, 2010, 06:01:45 AM
Patch (quick & dirty style) attached. Please test.

I used template functions to refer to pixcopy / colorpixcopy to avoid source code duplication. Any comments on that?
Title: Re: New clipping error
Post by: prissi on September 06, 2010, 09:10:43 AM
I will test it this evening.
Title: Re: New clipping error
Post by: prissi on September 07, 2010, 08:45:45 PM
Performance is nearly trice as slow as before; but called seldomly, so just commit it.
Title: Re: New clipping error
Post by: Dwachs on September 08, 2010, 05:11:10 AM
Quote from: prissi on September 07, 2010, 08:45:45 PM
Performance is nearly trice as slow as before; but called seldomly, so just commit it.
Performance of what? display_color_img?
Title: Re: New clipping error
Post by: prissi on September 08, 2010, 08:50:37 AM
Yes, from 0.13% of total time to 0.45% of total time in my testgame. (But with only a single company in this game.)
Title: Re: New clipping error
Post by: prissi on September 16, 2010, 12:30:59 PM
Do you intend to submit this?
Title: Re: New clipping error
Post by: Dwachs on September 16, 2010, 01:08:38 PM
Will do it.

Edit: Done with rev 3787.
Title: Re: New clipping error
Post by: prissi on December 05, 2010, 07:53:30 PM
Aparently the issue is not solved. Look at the current gift online game in biberach depot. Catenary and busses are drawn ontop of depot.
Title: Re: New clipping error
Post by: Dwachs on December 05, 2010, 08:44:45 PM
Back and front images were exchanged. Should be solved with pak64 rev 334
Title: Re: New clipping error
Post by: prissi on December 05, 2010, 10:10:58 PM
Sorry, my fault ...