The International Simutrans Forum

 

Author Topic: Map drawing issue with placing the toolbar on the left  (Read 742 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Map drawing issue with placing the toolbar on the left
« on: July 11, 2021, 04:00:31 PM »
I suspect that you will only see this symptom at certain zoom magnifications if you place the toolbar on the left.


I've confirmed it in extended, but it's possible that I missed something.


In addition, if you place the toolbar to the left or right, the overlay (such as the station name) is not in the correct position at certain zoom magnifications.
You do not see this symptom on the horizontal toolbar. The positional relationship between the object and the nameplate is kept regardless of the zoom magnification.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: Map drawing issue with placing the toolbar on the left
« Reply #1 on: August 20, 2021, 01:51:24 PM »
Should be fixed in r10032

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Re: Map drawing issue with placing the toolbar on the left
« Reply #2 on: August 21, 2021, 02:46:13 AM »
Should be fixed in r10032
This has been confirmed to be fixed in Extended as well. Thank you very much.

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Re: Map drawing issue with placing the toolbar on the left
« Reply #3 on: August 24, 2021, 03:45:16 PM »
In addition, if you place the toolbar to the left or right, the overlay (such as the station name) is not in the correct position at certain zoom magnifications.
You do not see this symptom on the horizontal toolbar. The positional relationship between the object and the nameplate is kept regardless of the zoom magnification.
This problem seems to have gotten worse than before. Now the symptoms appear no matter what position the toolbar is in.
And while before it was misaligned when zoomed out, now it is misaligned every two zooms when zoomed in, making the bug more noticeable than before.
This is a serious problem for the signal overlay arrows... (´・ω・`)

EDIT:
Based on the symptoms, I'm guessing that the recent fix for the mouse cursor bug may have broken this one this time.
« Last Edit: August 24, 2021, 11:15:23 PM by Ranran »

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Re: Map drawing issue with placing the toolbar on the left
« Reply #4 on: August 26, 2021, 12:51:47 PM »
Supplementary information. Overlay misalignment occurs at zoom levels of -1, +1, and +3(MAX)
EDIT:
It seems to depend on the width of the window at what zoom level the misalignment occurs.
« Last Edit: August 30, 2021, 12:51:43 PM by Ranran »

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Additional Information:
It seems that at least the calculation of ypos passed to planquadrat_t::display_overlay is incorrect.
Show station coverage. It also sometimes misaligns. The tile frame is correct. Drawing the tile frame is not the job of planquadrat_t::display_overlay but there is a problem with the player color overlay.
The strange thing is that changing only the width of the window somehow sometimes changes the ypos.
Changing the width of the window may change the vertical display position of the map, in which case the ypos should change by the same amount, but in fact the changes do not seem to match.
In other words, even if the map does not move, the ypos of the overlay will change, causing misalignment.
Therefore I think there is a problem with the simview yypos, but I did not understand. (´・ω・`)

What appears to be happening is a discrepancy in the calculation of the height of exactly one tile.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10905
  • Languages: De,EN,JP
Re: Map drawing issue with placing the toolbar on the left
« Reply #6 on: August 30, 2021, 01:24:39 PM »
I think I fixed this in r10056

Offline Ranran

  • Devotee
  • *
  • Posts: 1660
  • 今日は兎汁よー
  • Languages: ja
Re: Map drawing issue with placing the toolbar on the left
« Reply #7 on: August 30, 2021, 11:20:52 PM »
Confirmed that the overlay position is correct. Thanks for the fix!