Skip to content

Commit af20571

Browse files
committed
Automatic merge of T1.5.1-1732-gfdbea15ea and 16 pull requests
- Pull request #570 at f11a428: glTF 2.0 support with PBR lighting - Pull request #1030 at d3ae4a2: Refactor settings, in prep for settings exporter - Pull request #1052 at 3b5cb90: Content Manager: Add axle count, and lowest derail force - Pull request #1062 at bbc0013: Train Forces popup Window. - Pull request #1064 at cb510d6: Add Train Info tab to Help window (F1) - Pull request #1066 at 62c89c1: Log derailment, using TraceInformation. - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #1049 at 6a0c471: Re-organise document storage and access - Pull request #1057 at 254b6d4: Switchable brake system - Pull request #1069 at 3f153f0: Mouse wheel control only with Alt – Followup for #1051 - Pull request #1070 at f818e40: Fix a NullReferenceException in TCS scripts - Pull request #1071 at 722dd3f: Change cover image for v1.6 - Pull request #1074 at e9a66c1: Gradient - commit 2024-16-12 - Pull request #1076 at d1ff8fd: Allow depart early - Pull request #1077 at 7e73abd: Fix SME brakes not working - Pull request #1078 at c88beef: Default PowerSupply script for steam locomotives
18 parents b79bced + fdbea15 + f11a428 + d3ae4a2 + 3b5cb90 + bbc0013 + cb510d6 + 62c89c1 + 1f5ba4c + 6a0c471 + 254b6d4 + 3f153f0 + f818e40 + 722dd3f + e9a66c1 + d1ff8fd + 7e73abd + c88beef commit af20571

File tree

5 files changed

+48
-48
lines changed

5 files changed

+48
-48
lines changed

Source/Documentation/Manual/cabs.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,29 @@ see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
3434
The gauge is added by the insertion of a block like the following
3535
into the .cvf file::
3636

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-
)
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+
)
4444

4545
It is also possible to display the full ETCS display using the following block
4646
instead::
4747

48-
ScreenDisplay (
49-
Type ( ORTS_ETCS SCREEN_DISPLAY )
48+
ScreenDisplay (
49+
Type ( ORTS_ETCS SCREEN_DISPLAY )
5050
Graphic ( statictexture.ace ) Comment( 3D cab only, mandatory there )
5151
Position ( 280 272 320 240 ) Comment( 2D cab only )
52-
Units ( KM_PER_HOUR )
53-
Parameters (
54-
Mode FullSize
52+
Units ( KM_PER_HOUR )
53+
Parameters (
54+
Mode FullSize
5555
MaxSpeed 180
5656
DisplayUnits 0
57-
)
58-
)
59-
57+
)
58+
)
59+
6060
The following commonly used ``MaxSpeed`` or ``ScaleRange`` values can be set
6161
* 140, 150, 180, 240, 250, 260, 280, 400 for ``KM_PER_HOUR`` unit
6262
* 87, 111, 155, 248 for ``MILES_PER_HOUR`` unit

Source/RunActivity/Viewer3D/Materials.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public void Sweep()
328328
{
329329
Textures[path].Dispose();
330330
Textures.Remove(path);
331-
}
331+
}
332332
}
333333

334334
[CallOnThread("Updater")]
@@ -558,7 +558,7 @@ public Material Load(string materialName, string materialUniqueId, int options,
558558
return Materials[materialKey];
559559
}
560560

561-
public bool LoadNightTextures()
561+
public bool LoadNightTextures()
562562
{
563563
int count = 0;
564564
foreach (SceneryMaterial material in from material in Materials.Values
@@ -674,7 +674,7 @@ internal void UpdateShaders()
674674
SceneryShader.EnvironmentMapDiffuseTexture = BlackCubeTexture;
675675
SceneryShader.BrdfLutTexture = BlackTexture;
676676
}
677-
677+
678678
if (Viewer.Settings.UseMSTSEnv == false)
679679
{
680680
SceneryShader.Overcast = Viewer.Simulator.Weather.CloudCoverFactor;
@@ -1053,7 +1053,7 @@ public override void SetState(GraphicsDevice graphicsDevice, Material previousMa
10531053
shader.ImageTexture = NightTexture;
10541054
shader.ImageTextureIsNight = true;
10551055
}
1056-
else
1056+
else
10571057
{
10581058
shader.ImageTexture = Texture;
10591059
shader.ImageTextureIsNight = false;

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3536,7 +3536,7 @@ public ThreeDimentionCabViewer(Viewer viewer, MSTSLocomotive car, MSTSLocomotive
35363536
primitive.SetMaterial(material);
35373537
ScreenDisplays3D.Add((new CabViewControlType(CABViewControlTypes.ORTS_ETCS), 0),
35383538
new ThreeDimCabScreen(Viewer, material.HierarchyIndex, TrainCarShape, cvcr));
3539-
}
3539+
}
35403540
}
35413541
}
35423542

Source/RunActivity/Viewer3D/RollingStock/SubSystems/ETCS/DriverMachineInterface.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public enum DMIMode
105105
};
106106

107107
public DriverMachineInterface(MSTSLocomotive locomotive, Viewer viewer, CabViewControl control)
108-
{
108+
{
109109
if (!(control is CVCScreen cvcScreen))
110110
CurrentDMIMode = DMIMode.GaugeOnly;
111111
else if (!(cvcScreen.CustomParameters.TryGetValue("mode", out var mode) && Enum.TryParse(mode, ignoreCase: true, out CurrentDMIMode)))
@@ -800,27 +800,27 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
800800

801801
if (!IsTexture3D)
802802
{
803-
base.PrepareFrame(frame, elapsedTime);
804-
var xScale = (float)Viewer.CabWidthPixels / 640;
805-
var yScale = (float)Viewer.CabHeightPixels / 480;
806-
DrawPosition.X = (int)(Position.X * xScale) - Viewer.CabXOffsetPixels + Viewer.CabXLetterboxPixels;
807-
DrawPosition.Y = (int)(Position.Y * yScale) + Viewer.CabYOffsetPixels + Viewer.CabYLetterboxPixels;
808-
DrawPosition.Width = (int)(Control.Width * xScale);
809-
DrawPosition.Height = (int)(Control.Height * yScale);
810-
if (Zoomed)
811-
{
812-
DrawPosition.Width = DMI.Width;
813-
DrawPosition.Height = DMI.Height;
814-
DMI.SizeTo(DrawPosition.Width, DrawPosition.Height);
803+
base.PrepareFrame(frame, elapsedTime);
804+
var xScale = (float)Viewer.CabWidthPixels / 640;
805+
var yScale = (float)Viewer.CabHeightPixels / 480;
806+
DrawPosition.X = (int)(Position.X * xScale) - Viewer.CabXOffsetPixels + Viewer.CabXLetterboxPixels;
807+
DrawPosition.Y = (int)(Position.Y * yScale) + Viewer.CabYOffsetPixels + Viewer.CabYLetterboxPixels;
808+
DrawPosition.Width = (int)(Control.Width * xScale);
809+
DrawPosition.Height = (int)(Control.Height * yScale);
810+
if (Zoomed)
811+
{
812+
DrawPosition.Width = DMI.Width;
813+
DrawPosition.Height = DMI.Height;
814+
DMI.SizeTo(DrawPosition.Width, DrawPosition.Height);
815815
DrawPosition.X -= DMI.Width / 2;
816816
DrawPosition.Y -= DMI.Height / 2;
817-
DMI.ETCSDefaultWindow.BackgroundColor = ColorBackground;
818-
}
819-
else
820-
{
821-
DMI.SizeTo(DrawPosition.Width, DrawPosition.Height);
822-
DMI.ETCSDefaultWindow.BackgroundColor = Color.Transparent;
823-
}
817+
DMI.ETCSDefaultWindow.BackgroundColor = ColorBackground;
818+
}
819+
else
820+
{
821+
DMI.SizeTo(DrawPosition.Width, DrawPosition.Height);
822+
DMI.ETCSDefaultWindow.BackgroundColor = Color.Transparent;
823+
}
824824
}
825825
DMI.PrepareFrame(elapsedTime.ClockSeconds);
826826
}

Source/RunActivity/Viewer3D/Shapes.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ public override void Draw(GraphicsDevice graphicsDevice)
18221822
graphicsDevice.SetVertexBuffers(VertexBufferBindings);
18231823
if (IndexBuffer != null)
18241824
{
1825-
graphicsDevice.Indices = IndexBuffer;
1825+
graphicsDevice.Indices = IndexBuffer;
18261826
graphicsDevice.DrawIndexedPrimitives(PrimitiveType, baseVertex: 0, startIndex: PrimitiveOffset, primitiveCount: PrimitiveCount);
18271827
}
18281828
else
@@ -2641,8 +2641,8 @@ public void PrepareFrame(RenderFrame frame, WorldPosition location, Matrix[] ani
26412641
else
26422642
{
26432643
// .s lod-ding is based on distance levels
2644-
while ((displayDetailLevel > 0) && Viewer.Camera.InRange(mstsLocation, lodControl.DistanceLevels[displayDetailLevel - 1].ViewSphereRadius, lodControl.DistanceLevels[displayDetailLevel - 1].ViewingDistance * lodBias))
2645-
displayDetailLevel--;
2644+
while ((displayDetailLevel > 0) && Viewer.Camera.InRange(mstsLocation, lodControl.DistanceLevels[displayDetailLevel - 1].ViewSphereRadius, lodControl.DistanceLevels[displayDetailLevel - 1].ViewingDistance * lodBias))
2645+
displayDetailLevel--;
26462646
}
26472647
}
26482648

@@ -2706,11 +2706,11 @@ public virtual Matrix GetMatrixProduct(int iNode)
27062706
Matrix matrix = Matrix.Identity;
27072707
if (h != null && h.Length > iNode)
27082708
{
2709-
while (iNode != -1)
2710-
{
2711-
matrix *= Matrices[iNode];
2712-
iNode = h[iNode];
2713-
}
2709+
while (iNode != -1)
2710+
{
2711+
matrix *= Matrices[iNode];
2712+
iNode = h[iNode];
2713+
}
27142714
}
27152715
return matrix;
27162716
}

0 commit comments

Comments
 (0)