Skip to content

Commit 7b4c1a4

Browse files
committed
Automatic merge of T1.6-126-gc9409918f and 12 pull requests
- Pull request #1082 at 8538170: Allow variable water level in glass gauge - Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1091 at 492795a: Automatic speed control - Pull request #1122 at b9b077b: Wagon Size and Centering Controls - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1128 at d116396: Particle Emitter Overhaul - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9. - Pull request #1164 at 1ad9889: Fix: F9 crashes with a front coupled single steam locomotive by Csantucci. - Pull request #1165 at aacd11b: docs: Add code guidelines for logging - Pull request #1166 at 51e7f7a: Simplify loading of internal and game textures
14 parents f46b49d + c940991 + 8538170 + f46d5f2 + 492795a + b9b077b + e241a0d + d116396 + 39cd994 + 48c9a63 + 2f9e292 + 1ad9889 + aacd11b + 51e7f7a commit 7b4c1a4

File tree

21 files changed

+252
-312
lines changed

21 files changed

+252
-312
lines changed

Source/Contrib/TrackViewer/Drawing/BasicShapes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static void LoadAndHighlightTexture(GraphicsDevice graphicsDevice, strin
113113
Texture2D tempTexture;
114114
try
115115
{
116-
tempTexture = SharedTextureManager.Get(graphicsDevice, fullFileName);
116+
tempTexture = SharedTextureManager.LoadInternal(graphicsDevice, fullFileName);
117117
}
118118
catch
119119
{

Source/Documentation/Manual/features-route.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ snow texture names are recognized: ``ORTSDefaultSnow.ace`` and
4343
``ORTSDefaultDMSnow.ace``, to be positioned within folder ``TERRTEX\SNOW`` of
4444
the concerned route. For the snow textures that are missing in the ``SNOW``
4545
subfolder, and only for them, ORTS uses such files to display snow, if they
46-
are present, instead of using file ``blank.bmp``.
46+
are present.
4747

4848
To have a minimum working snow texture set, the file ``microtex.ace`` must
4949
also be present in the ``SNOW`` subfolder.
-3.05 KB
Binary file not shown.

Source/RunActivity/RunActivity.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@
4545
<Content Include="Content\TrainForcesSprites.png">
4646
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4747
</Content>
48-
<Content Include="Content\blank.bmp">
49-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
50-
</Content>
5148
<Content Include="Content\Clouds01.png">
5249
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5350
</Content>

Source/RunActivity/Viewer3D/Lights.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ public LightGlowMaterial(Viewer viewer, string textureName)
988988
: base(viewer, textureName)
989989
{
990990
// TODO: This should happen on the loader thread.
991-
LightGlowTexture = textureName.StartsWith(Viewer.ContentPath, StringComparison.OrdinalIgnoreCase) ? SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, textureName) : Viewer.TextureManager.Get(textureName);
991+
LightGlowTexture = textureName.StartsWith(Viewer.ContentPath, StringComparison.OrdinalIgnoreCase) ? SharedTextureManager.LoadInternal(Viewer.RenderProcess.GraphicsDevice, textureName) : Viewer.TextureManager.Get(textureName);
992992
}
993993

994994
public override void SetState(GraphicsDevice graphicsDevice, Material previousMaterial)

Source/RunActivity/Viewer3D/MSTSSky.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ public MSTSSkyMaterial(Viewer viewer)
533533
}
534534
else
535535
{
536-
MSTSSkyTexture.Add(SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDome1.png")));
537-
MSTSSkyStarTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "Starmap_N.png"));
536+
MSTSSkyTexture.Add(SharedTextureManager.LoadInternal(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "SkyDome1.png")));
537+
MSTSSkyStarTexture = SharedTextureManager.LoadInternal(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "Starmap_N.png"));
538538
}
539539
if (viewer.ENVFile.SkySatellites != null)
540540
{
@@ -547,9 +547,9 @@ public MSTSSkyMaterial(Viewer viewer)
547547
MSTSSkyMoonTexture = Viewer.TextureManager.Get(mstsSkyMoonTexture);
548548
}
549549
else
550-
MSTSSkyMoonTexture = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "MoonMap.png"));
550+
MSTSSkyMoonTexture = SharedTextureManager.LoadInternal(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "MoonMap.png"));
551551

552-
MSTSSkyMoonMask = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "MoonMask.png")); //ToDo: No MSTS equivalent - will need to be fixed in MSTSSky.cs
552+
MSTSSkyMoonMask = SharedTextureManager.LoadInternal(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "MoonMask.png")); //ToDo: No MSTS equivalent - will need to be fixed in MSTSSky.cs
553553
//MSTSSkyCloudTexture[0] = SharedTextureManager.Get(Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Viewer.ContentPath, "Clouds01.png"));
554554

555555
ShaderPassesSky = MSTSSkyShader.Techniques["Sky"].Passes.GetEnumerator();

Source/RunActivity/Viewer3D/Materials.cs

Lines changed: 123 additions & 180 deletions
Large diffs are not rendered by default.

Source/RunActivity/Viewer3D/Popups/HelpWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ private void AddAggregatedTrainInfo(Train playerTrain, ControlLayout scrollbox,
12061206
int numOperativeBrakes = 0;
12071207
bool isMetric = false; bool isUK = false; // isImperial* does not seem to be used in simulation
12081208

1209-
if (TrainInfoSpriteSheet == null) { TrainInfoSpriteSheet = SharedTextureManager.Get(Owner.Viewer.RenderProcess.GraphicsDevice, Path.Combine(Owner.Viewer.ContentPath, "TrainInfoSprites.png")); }
1209+
if (TrainInfoSpriteSheet == null) { TrainInfoSpriteSheet = SharedTextureManager.LoadInternal(Owner.Viewer.RenderProcess.GraphicsDevice, Path.Combine(Owner.Viewer.ContentPath, "TrainInfoSprites.png")); }
12101210
const int spriteWidth = 6; const int spriteHeight = 26;
12111211
var carInfoList = new List<CarInfo>(playerTrain.Cars.Count);
12121212

Source/RunActivity/Viewer3D/Popups/SwitchWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected internal override void Initialize()
5252
base.Initialize();
5353
if (SwitchStates == null)
5454
// TODO: This should happen on the loader thread.
55-
SwitchStates = SharedTextureManager.Get(Owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Owner.Viewer.ContentPath, "SwitchStates.png"));
55+
SwitchStates = SharedTextureManager.LoadInternal(Owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(Owner.Viewer.ContentPath, "SwitchStates.png"));
5656
}
5757

5858
protected override ControlLayout Layout(ControlLayout layout)

Source/RunActivity/Viewer3D/Popups/TrackMonitorWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@ public TrackMonitor(int width, int height, WindowManager owner)
309309
{
310310
if (SignalAspects == null)
311311
// TODO: This should happen on the loader thread.
312-
SignalAspects = SharedTextureManager.Get(owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(owner.Viewer.ContentPath, "SignalAspects.png"));
312+
SignalAspects = SharedTextureManager.LoadInternal(owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(owner.Viewer.ContentPath, "SignalAspects.png"));
313313
if (TrackMonitorImages == null)
314314
// TODO: This should happen on the loader thread.
315-
TrackMonitorImages = SharedTextureManager.Get(owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(owner.Viewer.ContentPath, "TrackMonitorImages.png"));
315+
TrackMonitorImages = SharedTextureManager.LoadInternal(owner.Viewer.RenderProcess.GraphicsDevice, System.IO.Path.Combine(owner.Viewer.ContentPath, "TrackMonitorImages.png"));
316316

317317
Viewer = owner.Viewer;
318318
StateProperty = Viewer.Settings.GetSavingProperty<int>("TrackMonitorDisplayMode");

0 commit comments

Comments
 (0)