Author Topic: road sign positioning  (Read 2525 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

road sign positioning
« on: February 28, 2016, 02:45:39 PM »
Hello. Here is a fix for road sign offsets. The fix makes them display correctly on slopes, corners, and usable in both drive on right and left.
Traffic lights need fixes directly in graphics, I'll post when I get home - i need better mouse for precise positioning.

Index: signals/roadsign.dat
===================================================================
--- signals/roadsign.dat        (revision 1833)
+++ signals/roadsign.dat        (working copy)
@@ -6,11 +6,12 @@
 waytype=road
 min_speed=0
 single_way=1
+offset_left=-13
 intro_year=1000
-image[0]=roadsign.0.0
-Image[1]=roadsign.0.1
-Image[2]=roadsign.0.2
-Image[3]=roadsign.0.3
+image[0]=roadsign.0.0,8,-56
+Image[1]=roadsign.0.1,-8,56
+Image[2]=roadsign.0.2,-112,-4
+Image[3]=roadsign.0.3,112,4
 Icon=> roadsign.0.5
 Cursor=roadsign.0.4
 ---------------------------
@@ -22,11 +23,12 @@
 waytype=road
 min_speed=0
 single_way=1
+offset_left=13
 intro_year=1000
-image[0]=roadsign.1.0
-Image[1]=roadsign.1.1
-Image[2]=roadsign.1.2
-Image[3]=roadsign.1.3
+image[0]=roadsign.1.0,60,-30
+Image[1]=roadsign.1.1,-60,30
+Image[2]=roadsign.1.2,-60,-30
+Image[3]=roadsign.1.3,60,30
 Icon=> roadsign.1.5
 Cursor=roadsign.1.4
 ---------------------------
@@ -38,12 +40,13 @@
 waytype=road
 min_speed=80
 single_way=1
+offset_left=-13
 intro_year=1959
 intro_month=1
-image[0]=roadsign.2.0
-Image[1]=roadsign.2.1
-Image[2]=roadsign.2.2
-Image[3]=roadsign.2.3
+image[0]=roadsign.2.0,8,-56
+Image[1]=roadsign.2.1,-8,56
+Image[2]=roadsign.2.2,-112,-4
+Image[3]=roadsign.2.3,112,4
 Icon=> roadsign.2.5
 Cursor=roadsign.2.4
 ---------------------------
@@ -56,11 +59,12 @@
 min_speed=0
 single_way=0
 free_route=1
+offset_left=13
 intro_year=1958
-image[0]=roadsign.3.0
-Image[1]=roadsign.3.1
-Image[2]=roadsign.3.2
-Image[3]=roadsign.3.3
+image[0]=roadsign.3.0,60,26
+Image[1]=roadsign.3.1,-60,-26
+Image[2]=roadsign.3.2,44,-30
+Image[3]=roadsign.3.3,-47,27
 Icon=> roadsign.3.5
 Cursor=roadsign.3.4
 ---------------------------
@@ -73,10 +77,11 @@
 min_speed=0
 single_way=0
 is_private=1
-image[0]=roadsign.4.0
-Image[1]=roadsign.4.1
-Image[2]=roadsign.4.2
-Image[3]=roadsign.4.3
+offset_left=13
+image[0]=roadsign.4.0,60,-30
+Image[1]=roadsign.4.1,-60,30
+Image[2]=roadsign.4.2,-60,-30
+Image[3]=roadsign.4.3,60,30
 Icon=> roadsign.4.5
 Cursor=roadsign.4.4
 ---------------------------
@@ -88,6 +93,7 @@
 min_speed=0
 single_way=0
 cost=2500
+offset_left=13
 intro_year=1920
 intro_month=1
 image[0]=traffic-light.1.0
@@ -116,6 +122,7 @@
 cost=500
 waytype=road
 is_private=1
+offset_left=0
 intro_year=1000
 image[0]=images/privateroad-barrier.0.0
 Image[1]=images/privateroad-barrier.0.1
Index: signals/roadsign-old.dat
===================================================================
--- signals/roadsign-old.dat    (revision 1833)
+++ signals/roadsign-old.dat    (working copy)
@@ -15,10 +15,11 @@
 min_speed=0
 single_way=0
 free_route=1
-image[0]=roadsign-old.3.0
-Image[1]=roadsign-old.3.1
-Image[2]=roadsign-old.3.2
-Image[3]=roadsign-old.3.3
+offset_left=13
+image[0]=roadsign-old.3.0,60,-30
+Image[1]=roadsign-old.3.1,-60,30
+Image[2]=roadsign-old.3.2,-60,-30
+Image[3]=roadsign-old.3.3,60,30
 Icon=> roadsign-old.3.5
 Cursor=roadsign-old.3.4
----
\ No newline at end of file
+---

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #1 on: February 28, 2016, 05:02:54 PM »
Splendid, that is most helpful; now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #2 on: March 20, 2016, 08:42:19 PM »
As promised here is the fixed traffic lights.png

Also the private road sign should be removed from roadsign.dat, as it is replaced by road barrier. SVN diff :

Code: [Select]
Index: compat.tab
===================================================================
--- compat.tab  (revision 1833)
+++ compat.tab  (working copy)
@@ -444,4 +444,7 @@
 severn-tunnel
 ### errors in london underground definitions
 Metropolitan-Bogie-Third
-met-bogie-third
\ No newline at end of file
+met-bogie-third
+### private road sign replaced by road barrier
+PrivateRoad
+roadbarrier
Index: boats/diesel-barge.dat
===================================================================
--- boats/diesel-barge.dat      (revision 1833)
+++ boats/diesel-barge.dat      (working copy)
@@ -244,7 +244,7 @@
 name=DieselBargeOil
 copyright=Jamespetts
 waytype=water
-engine_type=steam
+engine_type=diesel
 smoke=Diesel
 speed=11
 power=50
@@ -336,4 +336,4 @@
 FreightImage[0][N]=./images/diesel-barge-light-cover.1.2
 FreightImage[0][NE]=./images/diesel-barge-light-cover.1.3

----
\ No newline at end of file
+---
Index: signals/roadsign.dat
===================================================================
--- signals/roadsign.dat        (revision 1833)
+++ signals/roadsign.dat        (working copy)
@@ -6,11 +6,12 @@
 waytype=road
 min_speed=0
 single_way=1
+offset_left=-13
 intro_year=1000
-image[0]=roadsign.0.0
-Image[1]=roadsign.0.1
-Image[2]=roadsign.0.2
-Image[3]=roadsign.0.3
+image[0]=roadsign.0.0,8,-56
+Image[1]=roadsign.0.1,-8,56
+Image[2]=roadsign.0.2,-112,-4
+Image[3]=roadsign.0.3,112,4
 Icon=> roadsign.0.5
 Cursor=roadsign.0.4
 ---------------------------
@@ -22,11 +23,12 @@
 waytype=road
 min_speed=0
 single_way=1
+offset_left=13
 intro_year=1000
-image[0]=roadsign.1.0
-Image[1]=roadsign.1.1
-Image[2]=roadsign.1.2
-Image[3]=roadsign.1.3
+image[0]=roadsign.1.0,60,-30
+Image[1]=roadsign.1.1,-60,30
+Image[2]=roadsign.1.2,-60,-30
+Image[3]=roadsign.1.3,60,30
 Icon=> roadsign.1.5
 Cursor=roadsign.1.4
 ---------------------------
@@ -38,12 +40,13 @@
 waytype=road
 min_speed=80
 single_way=1
+offset_left=-13
 intro_year=1959
 intro_month=1
-image[0]=roadsign.2.0
-Image[1]=roadsign.2.1
-Image[2]=roadsign.2.2
-Image[3]=roadsign.2.3
+image[0]=roadsign.2.0,8,-56
+Image[1]=roadsign.2.1,-8,56
+Image[2]=roadsign.2.2,-112,-4
+Image[3]=roadsign.2.3,112,4
 Icon=> roadsign.2.5
 Cursor=roadsign.2.4
 ---------------------------
@@ -56,30 +59,34 @@
 min_speed=0
 single_way=0
 free_route=1
+offset_left=13
 intro_year=1958
-image[0]=roadsign.3.0
-Image[1]=roadsign.3.1
-Image[2]=roadsign.3.2
-Image[3]=roadsign.3.3
+image[0]=roadsign.3.0,60,26
+Image[1]=roadsign.3.1,-60,-26
+Image[2]=roadsign.3.2,44,-30
+Image[3]=roadsign.3.3,-47,27
 Icon=> roadsign.3.5
 Cursor=roadsign.3.4
 ---------------------------
 # Private Road sign
-obj=roadsign
-name=PrivateRoad
-copyright=James
-cost=500
-waytype=road
-min_speed=0
-single_way=0
-is_private=1
-image[0]=roadsign.4.0
-Image[1]=roadsign.4.1
-Image[2]=roadsign.4.2
-Image[3]=roadsign.4.3
-Icon=> roadsign.4.5
-Cursor=roadsign.4.4
----------------------------
+# This is for old versions of simutrans
+# replaced by roadbarrier below
+#obj=roadsign
+#name=PrivateRoad
+#copyright=James
+#cost=500
+#waytype=road
+#min_speed=0
+#single_way=0
+#is_private=1
+#offset_left=13
+#image[0]=roadsign.4.0,60,-30
+#Image[1]=roadsign.4.1,-60,30
+#Image[2]=roadsign.4.2,-60,-30
+#Image[3]=roadsign.4.3,60,30
+#Icon=> roadsign.4.5
+#Cursor=roadsign.4.4
+#---------------------------
 # traffic light
 obj=roadsign
 copyright=James
@@ -88,6 +95,7 @@
 min_speed=0
 single_way=0
 cost=2500
+offset_left=13
 intro_year=1920
 intro_month=1
 image[0]=traffic-light.1.0
@@ -116,6 +124,7 @@
 cost=500
 waytype=road
 is_private=1
+offset_left=0
 intro_year=1000
 image[0]=images/privateroad-barrier.0.0
 Image[1]=images/privateroad-barrier.0.1
Index: signals/roadsign-old.dat
===================================================================
--- signals/roadsign-old.dat    (revision 1833)
+++ signals/roadsign-old.dat    (working copy)
@@ -15,10 +15,11 @@
 min_speed=0
 single_way=0
 free_route=1
-image[0]=roadsign-old.3.0
-Image[1]=roadsign-old.3.1
-Image[2]=roadsign-old.3.2
-Image[3]=roadsign-old.3.3
+offset_left=13
+image[0]=roadsign-old.3.0,60,-30
+Image[1]=roadsign-old.3.1,-60,30
+Image[2]=roadsign-old.3.2,-60,-30
+Image[3]=roadsign-old.3.3,60,30
 Icon=> roadsign-old.3.5
 Cursor=roadsign-old.3.4
----
\ No newline at end of file
+---
Index: signals/traffic-light.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #3 on: March 20, 2016, 09:46:01 PM »
Does this fix apply also to Experimental?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #4 on: March 20, 2016, 11:22:54 PM »
Does this fix apply also to Experimental?

I think that the roadsigns wer the same in std and ex, so yes it applies. Just be careful, the diff is against std. If you applied the previous one, you have to exclude the parts form the first post.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #5 on: March 21, 2016, 12:56:08 AM »
I have now applied this, but have not had time to test. Is it intended that there were no changes to the traffic light's .dat file despite the change of .png? Many of the .dat file changes were already implemented in Experimental.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #6 on: March 21, 2016, 05:37:14 PM »
Yes. The traffic lights were impossible to fix by offsets in dat file, so I fixed the png. Dat for traffic lights is unchanged.

Offline Vladki

Re: road sign positioning
« Reply #7 on: April 17, 2016, 08:12:05 PM »
One more fix for road signs - the menu icon for "no entry" sign, had a few pixels that were very close to "transparent blue". Thus you could not see them in the png, but in the game they were not transparent. Here is fixed png. Applies to both standard and experimental.


Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #8 on: April 17, 2016, 10:21:36 PM »
Splendid, thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #9 on: June 18, 2017, 06:14:23 PM »
Hello, it seems that this fix was incorporated only in experimental/extended version of pak128.Britain, but should be applied to standard version as well.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #10 on: June 18, 2017, 06:24:12 PM »
Sadly, the maintainers of the Standard version have both retired from active development, so a new maintainer would need to be found before this could occur.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #11 on: June 18, 2017, 07:53:51 PM »
Sadly, the maintainers of the Standard version have both retired from active development, so a new maintainer would need to be found before this could occur.
Oh, that's a pity. I have commit rights for pak128.CS at sourceforge SVN, but I do not dare to try if I could commit the changes for pak128.Britain myself...

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #12 on: June 18, 2017, 08:00:15 PM »
Oh, that's a pity. I have commit rights for pak128.CS at sourceforge SVN, but I do not dare to try if I could commit the changes for pak128.Britain myself...

I am sure that KeironGreen or The Hood would be happy for you to take over if you asked them - or do you mean that you would not be able to deal with the work involved?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: road sign positioning
« Reply #13 on: June 18, 2017, 08:38:47 PM »
I am sure that KeironGreen or The Hood would be happy for you to take over if you asked them - or do you mean that you would not be able to deal with the work involved?
I can fix small bugs when I stumble upon them, but I do not want to commit to maintenance of another (and foreign) pakset. I have already quite a big backlog of things to do in pak128.CS. And I want also to get back to coding and try to do something with friction and curves in extended. And recently I tend not to spend my free time at the computer. I have enough of that at work...

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15691
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: road sign positioning
« Reply #14 on: June 18, 2017, 08:53:29 PM »
I can well understand that. You could always ask The Hood or Kieron whether they might allow you to fix the bugs without committing to being a full maintainer?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.