Skip to content

Commit 5008448

Browse files
authored
Merge pull request #590 from cjakeman/menu-options02h
02h: Removed menu option CircularSpeedGauge. Now always available.
2 parents 278d9f8 + b4c61d8 commit 5008448

File tree

8 files changed

+73
-97
lines changed

8 files changed

+73
-97
lines changed

Source/Documentation/Manual/cabs.rst

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,50 @@ OR supports with a high degree of compatibility all functions available in
1616
MSTS for 2D cabs, and provides some significant enhancements described in the
1717
next paragraphs.
1818

19-
OR adds support for the ETCS circular speed gauge, as described
20-
:ref:`here <options-etcs>`.
19+
20+
ETCS circular speed gauge
21+
-------------------------
22+
23+
You can add to the cabview a
24+
circular speed gauge accordingly to the European standard train control
25+
system ETCS.
26+
27+
.. image:: images/options-etcs.png
28+
:scale: 60 %
29+
:align: center
30+
31+
32+
.. admonition:: For content developers
33+
34+
The gauge is added by the insertion of a block like the following
35+
into the .cvf file::
36+
37+
Digital (
38+
Type ( SPEEDOMETER DIGITAL )
39+
Style ( NEEDLE )
40+
Position ( 160 255 56 56 )
41+
ScaleRange ( 0 250 )
42+
Units ( KM_PER_HOUR )
43+
)
44+
45+
It is also possible to display the full ETCS display using the following block
46+
instead::
47+
48+
ScreenDisplay (
49+
Type ( ORTS_ETCS SCREEN_DISPLAY )
50+
Position ( 280 272 320 240 )
51+
Units ( KM_PER_HOUR )
52+
Parameters (
53+
Mode FullSize
54+
)
55+
)
56+
57+
The following DMI size variants are available: FullSize (displays the whole DMI), SpeedArea
58+
(displays only the left part with information about distance and speed) and PlanningArea
59+
(displays only the planning area and navigation buttons).
60+
61+
The information displayed in the DMI is controlled via the TCS script. For more details,
62+
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
2163

2264
.. _cabs-battery-switch:
2365

Source/Documentation/Manual/options.rst

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -630,52 +630,6 @@ When this option is selected, when OR is loading the shape (.s) files it
630630
will report errors in syntax and structure (even if these don't cause
631631
runtime errors) in the :ref:`Log file <driving-logfile>` ``OpenRailsLog.txt`` on the desktop.
632632

633-
.. _options-etcs:
634-
635-
ETCS circular speed gauge
636-
-------------------------
637-
638-
When this option is selected, it is possible to add to the cabview a
639-
circular speed gauge accordingly to the European standard train control
640-
system ETCS.
641-
642-
.. image:: images/options-etcs.png
643-
:scale: 60 %
644-
:align: center
645-
646-
647-
.. admonition:: For content developers
648-
649-
The gauge is added by the insertion of a block like the following
650-
into the .cvf file::
651-
652-
Digital (
653-
Type ( SPEEDOMETER DIGITAL )
654-
Style ( NEEDLE )
655-
Position ( 160 255 56 56 )
656-
ScaleRange ( 0 250 )
657-
Units ( KM_PER_HOUR )
658-
)
659-
660-
It is also possible to display the full ETCS display using the following block
661-
instead::
662-
663-
ScreenDisplay (
664-
Type ( ORTS_ETCS SCREEN_DISPLAY )
665-
Position ( 280 272 320 240 )
666-
Units ( KM_PER_HOUR )
667-
Parameters (
668-
Mode FullSize
669-
)
670-
)
671-
672-
The following DMI size variants are available: FullSize (displays the whole DMI), SpeedArea
673-
(displays only the left part with information about distance and speed) and PlanningArea
674-
(displays only the planning area and navigation buttons).
675-
676-
The information displayed in the DMI is controlled via the TCS script. For more details,
677-
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
678-
679633
Load day/night textures only when needed
680634
----------------------------------------
681635

@@ -751,14 +705,6 @@ lat/lon rectangle corresponding to the arid zone of North America (lat from
751705
The randomization is not performed either if the activity contains weather
752706
change events.
753707

754-
Extend object maximum viewing distance to horizon
755-
-------------------------------------------------
756-
757-
With this option selected, all objects viewable up to the viewing distance
758-
defined in the Video Options are displayed. As a default ORTS only
759-
displays objects up to 2000 m distance. Selecting this option improves
760-
display quality but may reduce frame rate.
761-
762708
.. _options-dds-textures:
763709

764710
Load DDS textures in preference to ACE

Source/Menu/Options.Designer.cs

Lines changed: 18 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/Options.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ orderby folder.Key
319319
trackLODBias_ValueChanged(null, null);
320320
checkConditionalLoadOfNightTextures.Checked = Settings.ConditionalLoadOfDayOrNightTextures;
321321
checkSignalLightGlow.Checked = Settings.SignalLightGlow;
322-
checkCircularSpeedGauge.Checked = Settings.CircularSpeedGauge;
323322
checkPreferDDSTexture.Checked = Settings.PreferDDSTexture;
324323
checkUseLocationPassingPaths.Checked = Settings.UseLocationPassingPaths;
325324
checkUseMSTSEnv.Checked = Settings.UseMSTSEnv;
@@ -514,7 +513,6 @@ void buttonOK_Click(object sender, EventArgs e)
514513
Settings.LODBias = trackLODBias.Value;
515514
Settings.ConditionalLoadOfDayOrNightTextures = checkConditionalLoadOfNightTextures.Checked;
516515
Settings.SignalLightGlow = checkSignalLightGlow.Checked;
517-
Settings.CircularSpeedGauge = checkCircularSpeedGauge.Checked;
518516
Settings.PreferDDSTexture = checkPreferDDSTexture.Checked;
519517
Settings.UseLocationPassingPaths = checkUseLocationPassingPaths.Checked;
520518
Settings.UseMSTSEnv = checkUseMSTSEnv.Checked;

Source/Menu/Options.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,7 @@
123123
<metadata name="bindingSourceContent.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124124
<value>114, 17</value>
125125
</metadata>
126+
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127+
<value>17, 17</value>
128+
</metadata>
126129
</root>

Source/ORTS.Settings/UserSettings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,6 @@ public enum DirectXFeature
309309
[Default(false)]
310310
public bool AuxActionEnabled { get; set; }
311311
[Default(false)]
312-
public bool CircularSpeedGauge { get; set; }
313-
[Default(false)]
314-
public bool LODViewingExtention { get; set; }
315-
[Default(false)]
316312
public bool PreferDDSTexture { get; set; }
317313
[Default(false)]
318314
public bool UseLocationPassingPaths { get; set; }

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ public CabRenderer(Viewer viewer, MSTSLocomotive car)
11921192
if (digital != null)
11931193
{
11941194
CabViewDigitalRenderer cvdr;
1195-
if (viewer.Settings.CircularSpeedGauge && digital.ControlStyle == CABViewControlStyles.NEEDLE)
1195+
if (digital.ControlStyle == CABViewControlStyles.NEEDLE)
11961196
cvdr = new CircularSpeedGaugeRenderer(viewer, car, digital, _Shader);
11971197
else
11981198
cvdr = new CabViewDigitalRenderer(viewer, car, digital, _Shader);
@@ -1313,7 +1313,7 @@ public CabRenderer(Viewer viewer, MSTSLocomotive car, CabViewFile CVFFile) //use
13131313
if (digital != null)
13141314
{
13151315
CabViewDigitalRenderer cvdr;
1316-
if (viewer.Settings.CircularSpeedGauge && digital.ControlStyle == CABViewControlStyles.NEEDLE)
1316+
if (digital.ControlStyle == CABViewControlStyles.NEEDLE)
13171317
cvdr = new CircularSpeedGaugeRenderer(viewer, car, digital, _Shader);
13181318
else
13191319
cvdr = new CabViewDigitalRenderer(viewer, car, digital, _Shader);

Source/RunActivity/Viewer3D/Shapes.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,8 +2165,12 @@ public void PrepareFrame(RenderFrame frame, WorldPosition location, Matrix[] ani
21652165
? lodControl.DistanceLevels[lodControl.DistanceLevels.Length - 1]
21662166
: displayDetail;
21672167

2168-
// If set, extend the lowest LOD to the maximum viewing distance.
2169-
if (Viewer.Settings.LODViewingExtention && displayDetailLevel == lodControl.DistanceLevels.Length - 1)
2168+
// Extend the lowest LOD to the maximum viewing distance.
2169+
// Set to MaxValue so that an object never disappears.
2170+
// Many MSTS objects had a LOD of 2km which is the maximum distance that MSTS can handle.
2171+
// Open Rails can handle greater distances, so we override the lowest-detail LOD to make sure OR shows shapes further away than 2km.
2172+
// See http://www.elvastower.com/forums/index.php?/topic/35301-menu-options/page__view__findpost__p__275531
2173+
if (displayDetailLevel == lodControl.DistanceLevels.Length - 1)
21702174
distanceDetail.ViewingDistance = float.MaxValue;
21712175

21722176
for (var i = 0; i < displayDetail.SubObjects.Length; i++)

0 commit comments

Comments
 (0)