Commit Graph

326 Commits

Author SHA1 Message Date
94112af005 Remove dependabot integration v1.6.326 2026-11-23 18:08:36 +01:00
dd25372bd0 Merge pull request #60 from MaSzyna-EU07/feat/settings-standard-mode
feat(settings): standard mode, consist minis, scenery and map fixes
v1.6.325
2026-11-23 17:07:07 +00:00
maj00r
5d8790301d Merge branch 'main' into feat/settings-standard-mode
# Conflicts:
#	StarterNG/Views/Settings.axaml.cs
2026-11-23 17:41:33 +01:00
e0d3988d4a Merge pull request #58 from MaSzyna-EU07/chore/net10
build: the starter, the black box and the tests move to .NET 10
v1.6.311
2026-11-23 16:37:41 +00:00
57821887e4 Merge pull request #57 from MaSzyna-EU07/feat/sbt-cleanup
Feat/sbt cleanup
v1.6.308
2026-11-23 16:37:28 +00:00
maj00r
900161a6c4 fix(sceneries): an .sbt goes only when every scenery reading it can do without
With an .sbt there the simulator passes over the triangles and lines of every
file of the scenery, so a scenery file (.scm, .scn) that is gone keeps the
.sbt whatever its name, not only one named *_ter.scm. A small terrain file is
read too: some only list the files that hold the terrain. Node templates
(.inc) still do not count.

A word reading "terrain" outside a directive - the name of a node, of a
texture - no longer hides the includes after it.

An .sbt is judged by all the sceneries reading it: the one it is named after,
that one with a $ ahead of its name, and any other naming it in a terrain
directive. What such a scenery lacks comes with its name.

Each file is read once for a cleanup, however many sceneries include it, and
only around the words that matter: on an installation of 180 sceneries the
cleanup at the first start took minutes and takes seconds.
2026-11-22 15:30:51 +01:00
maj00r
5ec7a4b539 fix(settings): a borderless screen draws into a buffer of the monitor's size, not the resolution row's
With fullscreenwindowed the simulator takes the window's size from the monitor and leaves width and height unread (application.cpp), but its full renderer still draws into gfx.framebuffer.width and height (opengl33renderer.cpp). Those were written from the resolution row, greyed out in that mode: 1280x720 stretched over a larger monitor. Borderless, they are now -1, the simulator's own word for a buffer of the window's size, or with a smaller render scale that part of the chosen monitor's size, the primary one's when none is chosen. A size left in a borderless file goes on the next save.
2026-11-22 14:53:18 +01:00
maj00r
d429d041ff fix(settings): a monitor's name outside ASCII is written as the UTF-8 the simulator compares
The simulator compares the word after fullscreenmonitor byte by byte with GLFW's name of the monitor, which is UTF-8 (application.cpp, find_monitor), and has no other way to name one. eu07.ini is written in code page 1250, so a name with a letter outside ASCII never matched and the game opened on the primary monitor. That one word now goes into the file as its UTF-8 bytes, the rest staying in the code page; a name an earlier save left in the code page is read as it is and put right by the next save.
2026-11-22 14:52:51 +01:00
maj00r
f7a58e8431 fix(settings): the move to the standard mode puts the render scale back with the frame buffer
The row of the render scale, which only the advanced mode shows, has the keys of the frame buffer's size, while the scale itself is read from starter.bufferscale: put back without it, the two came out as they were, and a player moved to the standard mode kept a blurred picture with no setting for it on the screen. The percent now goes wherever the buffer's size does, on the move, on leaving the advanced mode and on a section put back.
2026-11-22 14:51:59 +01:00
maj00r
77b0c23cea fix(settings): the cursor's speed is read and written as the old starter did, its four levels
The old starter (src/uSettings.pas) showed a mousescale as one of four levels - low below 1.3, high above 1.9, very high above 2.7, standard between - and wrote 1.0, 1.5, 2.3 or 3.2 for them, with 0.5 after it, the signs being the inversions. The slider had three whole steps instead, so a 3.2 was the top only by rounding and anything above 3 was cut to 3 on the move to the standard mode.
2026-11-22 14:47:05 +01:00
maj00r
de4eb99ea1 docs(readme): a native build needs the .NET 10 SDK 2026-11-22 13:00:10 +01:00
maj00r
34beec588d fix(settings): an import or a profile keeps the mode, the move keeps the card and GLES
Importing an eu07.ini or applying a profile took starter.settings.standard and
starter.settings.advanced from the other file. An older one says "standard no",
so the next start moved the player again and reset what was just imported, this
time with no copy kept; "advanced yes" opened the advanced mode past the
warning. Both are now this installation's, like its simulator and its card.

The one-time move to the standard mode no longer resets starter.gpu and
gfx.usegles: some machines run the simulator only on the integrated card or
with OpenGL ES, and the move is done without asking.
2026-11-22 12:40:46 +01:00
maj00r
bc4adfe6fa perf(blackbox): the map's marks thin out where they crowd, the most telling kept
From afar the signals, stop and horn points, signal passings and vehicles of a
scenery covered each other. Each now takes a square of a few pixels, asked for
in the order of what it tells - a signal at stop, a missed stop, a horn not
sounded, the user's train - so a crowd shows its most telling mark on top, and
close up, where they stand apart, every one is drawn. The stop wedges show only
close enough to tell apart.
2026-11-22 12:40:45 +01:00
maj00r
c70fd94783 fix(sonar): numbers read from the file are compared within a tolerance
Equals is as exact as == to SonarCloud (S1244). Two numbers count as the
same within a billionth of the larger one, and mousescale's second number
as 0.5 within a billionth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:14:49 +01:00
maj00r
5d966be11c fix(sonar): no exact float compares, xrandr from its own path, its regexes timed
The quality gate of SonarCloud stopped on three exact compares of doubles
(S1244), the regexes reading xrandr without a timeout (S6444) and xrandr run
from whatever PATH finds (S4036). The compares meant to tell one number from
another keep doing so with Equals; the scroll lane's margin is compared within
a tenth of a pixel. xrandr is run from where distributions put it, or not at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:11:28 +01:00
maj00r
93f914c868 feat(settings): a standard mode as the old starter's panel, the rest behind a warning
The settings keep only the keys master reads, Vulkan left out. The standard
mode is the old starter's panel; the advanced mode opens behind a warning
whose yes takes a click only after 20 seconds in front of the player.

- Sliders go by fixed steps (SliderRanges), held to the standard ranges there:
  fpslimit up to 240, sleeperdistance up to 1000 m.
- On the first start everyone is moved to the standard mode once: what is
  outside it goes back to its default, the sliders' values to their ranges,
  and a copy of eu07.ini is kept as eu07.ini.before-standard.
- "Restore defaults" puts every setting back, the language, the simulator,
  the UART port and the control keys kept.
- Monitors and renderers are found anew (Monitors, Renderers), Displays and
  SettingReach gone.
- mousescale writes its second number as the old starter did, 0.5 or -0.5
  for an inverted vertical axis; an axis that would not move gets the default.
- Depot, in the standard mode: no AI or drivable-only filters, empty consists
  not listed, the crew shown but not changed.
- Randomizing the textures of a whole scenery no longer rebuilds the view per
  consist, and finds its candidates by mini, so the window keeps answering.
- A long operator in the vehicle list is cut short instead of over the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:02:29 +01:00
maj00r
de943cf461 perf(blackbox): the map draws its rails by cells in view, at a detail its zoom needs
The tracks are cut into 500 m cells, so only those in view are drawn, and kept
at a few levels of detail, so that from afar a track is drawn with fewer points
than the pixels it covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:02:20 +01:00
maj00r
e63aa71bf8 fix(scenery): a vehicle without its .fiz is a fault, an include ending the file is read
A vehicle whose .fiz is not in its folder under dynamic is left out by the
simulator, so its trainset runs short: the scenery check now names the
missing file. An include that is the last thing in the file, with no end,
is inlined as the simulator reads it, and still reported as not closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:02:20 +01:00
maj00r
ecf3067d85 feat(consists): the consist lists show the vehicles' minis, alike ones under one caption
The scenery's consists and the warehouse's are listed as a strip of minis at
their own 30 px, vehicles alike next to each other taken together under one
caption ("412W ×20"). A consist wider than the list scrolls sideways in its
row, with a lane for the bar under the captions. A warehouse consist's strip
follows an edit as soon as it is saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:47:39 +01:00
maj00r
4b3ee43e4a build: the starter, the black box and the tests move to .NET 10
.NET 9 was a short-term release and its support has ended; .NET 10 is the
long-term one. Avalonia 12 already ships a build for net10.0, the other
packages run on it as they are. CI sets up the 10.0 SDK, and Rider's publish
configurations point at the new output folder.
2026-11-18 13:04:13 +01:00
maj00r
7e249a7a9a fix(settings): a first start has nothing to save before the simulator starts
With no eu07.ini of the player's own, starting the simulator asked to save
changes nobody made. The UART tune box and the Vulkan device box went by
TextChanged, which Avalonia raises later from the dispatcher: the text the
page put there while loading came back as an edit once the window was shown.

Both now go by their Text property, which changes at once and is passed over
while the page loads; typing in them still counts.
2026-11-17 22:14:45 +01:00
maj00r
97a2c2c75c fix(sceneries): an .sbt in the way of terrain files that are there can go
Any terrain directive kept the scenery's .sbt, as if it brought the terrain
from elsewhere. The directive names either .sbt files, which nothing makes
again, or terrain files (.txtf) with their binary copies (.btf). A scenery
with the terrain files has no use for its own .sbt: the simulator never
writes one for it, and an old one keeps the terrain files from being used.

- An .sbt named by the directive still keeps the scenery's own.
- A .txtf, or its .btf, on disk lets the scenery's .sbt go; with neither,
  the .sbt stays and the missing .txtf is given as the reason.
2026-11-17 22:14:45 +01:00
maj00r
943b855f20 feat(warehouse): the old starter's magazyn.ini joins the warehouse at every start
The old starter read starter\magazyn.ini each time it opened and wrote it on
every change; this one kept its warehouse apart and took the file in only from
the list's menu, so a consist saved there never showed here.

- At the start, ahead of the scenery list, the consists of magazyn.ini not
  taken in before join the warehouse. Each one taken is remembered in
  userpresets.json by its name and vehicles, so one removed here stays removed
  while the old starter keeps it as it was.
- A consist changed there replaces the one here when that one is as an earlier
  start brought it; one of the same name made here stays, and the old one comes
  in beside it as "name (magazyn.ini)".
- A warehouse file that cannot be read is left alone by the import.
- The file is read as UTF-8 or code page 1250, whichever it is, by hand too.
2026-11-17 14:55:04 +01:00
maj00r
797e2e70a7 feat(sceneries): a release clears the .sbt files once, and a scenery's menu deletes its own
The simulator makes a scenery's .sbt on its first load and never checks it
against the text again, so an older simulator's file, or one made before a
scenery update, keeps showing the old terrain.

- CleanupGeneration, raised by a release, clears the .sbt files once per
  installation on the first start, ahead of the scenery list. A file goes only
  while its scenery's terrain files (*_ter.scm) are all there and no terrain
  directive brings terrain from elsewhere; an .sbt standing in for missing
  terrain stays, and the log says what is missing. Which cleanup each
  installation had is kept in sbt-cleanup.txt in the user's folder.
- "Delete SBT" in the scenery list's menu does the same for one scenery,
  asking first and refusing where nothing could make the file again.
- The .sbt is among the files a scenery is watched by, so one made or removed
  reaches the list without a reload.
2026-11-17 02:15:45 +01:00
c07ed2fb4d Merge pull request #54 from MaSzyna-EU07/feat/tapes-from-blackbox
feat(tapes): tapes from the black box, live view that keeps up, train tapes setting
v1.6.302
2026-11-16 16:00:52 +00:00
cfea240243 Merge pull request #53 from MaSzyna-EU07/fix/scenery-file-events
fix: scenery files are looked at when they change, not every two seconds
v1.6.280
2026-11-16 16:00:36 +00:00
maj00r
f0fa2d1768 test(tapes): the tapes window, the choice asked before a start, the wheels and the doors from the other cab
- HaslerTapeWindow: with nothing recorded it offers to record and turns on the
  black box and the trains' tapes; a tape of the last launch is summed up with
  its scenario and train, and is no longer followed once the window closes.
- HaslerTapes.Load: a log begun anew over the end that was read is read whole
  once its time goes back; an unreadable tape is none and told in the log; a
  file read only forward is read whole each time. Empty log lines are passed over.
- MessageBox.Choose: the answer clicked, or none on the way back or on closing.
- CabPanel: wheels turning apart from the train are said beside its speed.
- EventList: going to the other cab tells nothing of the doors, still the switches.
- WarehouseEditTests and ConsistOrientationTests put in app-wide services of
  their own: they now wait their turn with the controls that read them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:58:31 +01:00
maj00r
2a85ca384a refactor(scenery): the looks at the scenery files timed by a class of their own, under test
When the main window looks at the scenery files - once the reports of a
save stop, back at the window, now and then anyway, seldom where the
system reports changes and often where it does not - is FolderLooks now,
on TimeProvider timers, so the tests drive the clock. The window keeps
only the look itself. A report coming as the window closes leaves the
disposed timers be.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:55:22 +01:00
maj00r
fa8ae760e1 fix(tests): the black box text tests wait their turn with the other Avalonia ones
EventTextsTests and SecurityBrakingTests from #55 ran beside the Avalonia
controls collection; their AppBuilder setup raced it and 28 UI tests failed
with "Setup was already called" on every runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:42:56 +01:00
maj00r
100bbea83e fix(tests): the black box text tests wait their turn with the other Avalonia ones
EventTextsTests and SecurityBrakingTests from #55 ran beside the Avalonia
controls collection; their AppBuilder setup raced it and 28 UI tests failed
with "Setup was already called" on every runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:42:56 +01:00
maj00r
195f358e55 refactor(tapes): the line of a tape drawn by a class of its own, so Sonar sees a figure ended after a gap
Sonar (S2583, the reliability rating of #54) took the end of a figure after a gap in Trace for code
never run: begun was changed by the local function Flush, and its analysis doesn't follow a local
changed that way. Nothing was wrong in what was drawn.

The columns of the line are kept by ColumnLine, in its fields, and drawn through the three calls it is
given, the figure begun, a line to the next point and its end; Trace hands it those of the
StreamGeometry. What is drawn is the same. Tests: a column entered where it started and left where it
ended through its lowest and highest, a break ending the figure and the next point beginning another,
a break with nothing drawn ending nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:06:58 +01:00
maj00r
be7b9c5679 Merge main into feat/tapes-from-blackbox
Conflicts:
- CabPanel.cs: main (#50) tells the screen reader what the panel draws, this branch keeps the km/h
  label for the speed of the wheels beside it and shows the doors as the cab sees them. Both kept, and
  the speed of the wheels, new on this branch, is told to the screen reader too, as all the rest.
- Records.cs: main (#55) adds the buzzers and the protection braking, this branch AsTheCabSees. Both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:02:47 +01:00
maj00r
c370d1509e Merge main into fix/scenery-file-events
Conflict in MainWindow.axaml.cs, the Activated handler: main (#52) refreshes the list of simulators when
the settings are shown, this branch looks at the scenery files through _sceneryLook. Both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:02:45 +01:00
3c9b578e6b Merge pull request #55 from MaSzyna-EU07/feat/command-descriptions
Black box: commands described, the protection's buzzer apart from its braking
2026-11-16 09:16:55 +00:00
952618be13 Merge pull request #52 from MaSzyna-EU07/fix/exe-list-refresh
fix: a simulator copied in while the starter runs is on the list
v1.6.268
2026-11-16 09:16:17 +00:00
156af3fdd1 Merge pull request #51 from MaSzyna-EU07/fix/noavx2-exe
fix: without AVX2 the starter starts the simulator built without it
v1.6.266
2026-11-16 09:16:05 +00:00
49b76aa66c Merge pull request #49 from MaSzyna-EU07/fix/reshade-beside-starter
fix: graphics wrappers beside the starter no longer reach its window
2026-11-16 09:15:52 +00:00
9b1523ef78 Merge pull request #50 from MaSzyna-EU07/fix/screen-reader-names
fix: a screen reader user can find, hear and work every part of the starter
v1.6.260
2026-11-16 09:15:39 +00:00
1d5b0ea1f4 Merge pull request #46 from MaSzyna-EU07/fix/linux-file-case
fix: find game data whatever the case of its names on Linux
v1.6.246
2026-11-16 09:14:44 +00:00
maj00r
8baf2149ea fix(blackbox): a buzzer named by the lamps of its buzzing samples only 2026-11-16 02:21:23 +01:00
maj00r
aebfaf34ac fix(blackbox): a buzzer cut by the power or the protection switched off is not acknowledged, and is named by every lamp it had
The keys tab's English names the train brake's positions and the dashboard light as the black box does.
2026-11-16 02:20:34 +01:00
maj00r
5bc5da3fbf feat(blackbox): the train protection's buzzer told apart from its braking
The buzzer has a colour of its own on the timeline and in the cab, no longer the braking's red, and an event of its
own: acknowledged after how long, or not acknowledged when the braking follows. The alerter's buzzer needs its lamp,
since a protection with one acknowledgement tells the cab signalling's buzzer as the alerter's too. Braking with no
lamp, the protection with no power, is not shown as the driver's on the timeline and in the cab either.
2026-11-16 02:17:57 +01:00
maj00r
e4d092ab3e fix(blackbox): the command texts set right, and in the old starter's languages as the keys tab has them
Spelling and wording fixed (świateł, piasecznica, dezaktywacja, podgrzewacz wody, the dashboard light, the
locomotive brake), and the train brake's service and full service positions told by what they set, not as the key
file swaps them. In Czech, Hungarian and Russian the commands are named in the old starter's key descriptions.
2026-11-16 02:17:57 +01:00
maj00r
632e1003ee fix(blackbox): the protection braking with no power not counted as the driver's
TSecuritySystem brakes whenever it has no power, a cab not yet started or a power cut, with no lamp
lit. Only braking with the alerter or the cab signalling lamp is the driver's not acknowledging.
2026-11-16 02:04:22 +01:00
maj00r
34ee131d61 feat(blackbox): the commands in the events and on the timeline told by what they do
Every command of a vehicle the simulator can record (input/command.cpp) has a Polish and an English
text: those with a key take the key file's and the starter's own, the rest are written out. A command
with no text keeps its name.
2026-11-16 02:04:22 +01:00
maj00r
faa06fb9d8 fix(settings): a profile or an ini exported takes the page's edits in a copy, so discarding them still works
Saving a profile or exporting eu07.ini captured the page's edits into the settings held, so
discarding them before a start showed them again and the start's save wrote them. The export
writes a copy with the edits in; the settings held stay as saved.
2026-11-16 01:24:17 +01:00
maj00r
829a3e7a3d fix(start): discarding unsaved settings lets go of the page's edits only, a failed key save starts nothing
- the page shows the settings as held again, not read from the file as Restore does, so what
  other pages set and not yet saved (the depot's filters, the window maximized) stays
- the start goes on only once nothing is left to be saved, the keys' file included
2026-11-16 01:20:36 +01:00
maj00r
5b43e29f9e fix(start): unsaved settings let go rather than started without, a failed save starts nothing
- the second answer discards the edits (as "Restore" does): kept, the starter would write
  them when it closes, with auto-close while the simulator reads the file
- a save that fails is said and the simulator is not started
- settings read again from a file changed outside leave the page with no edit of its own
- a closed tape window lets go of the file it read last, shown or not
2026-11-16 00:16:13 +01:00
maj00r
b63ba8fe2e feat(start): starting with unsaved settings asks first
Edits on the settings page (or of the keys) not saved yet: the start asks whether to save them
and start, start without them, or not start. Closing the question starts nothing. "Start
without saving settings" from the menu asks nothing, as it says what it does.
2026-11-16 00:09:36 +01:00
maj00r
76693c1494 fix(settings): an imported ini moved to the trains' tapes too, a closed tape window forgets only its own tape
- ImportFrom moves an ini of before the trains' tapes as a profile is
- HaslerTapes.Forget takes the file: a window closing lets go of its own tape, not of the one
  another window follows
2026-11-16 00:09:36 +01:00