Commit Graph

55 Commits

Author SHA1 Message Date
maj00r
b9f455e33d Show vehicle and texture info when a browser entry is picked
The General and About texture tabs only ever described the selected consist car,
so clicking a vehicle in the list told the user nothing about it.
2026-09-04 22:29:04 +02:00
maj00r
df21ec104f Cut the comments from the refactored code
Three survive: why AppServices is hand-wired, the cp1250 registration trap, and
the IsDieselEngine note carried over from Physics.cs.
2026-09-04 22:24:54 +02:00
maj00r
b33d7697a0 Fix cp1250 decoding, log unsupported loads
The repositories resolved GetEncoding(1250) in their constructors, before
anything registered CodePagesEncodingProvider - reads fell back to Latin-1 and
Polish characters came out as mojibake.
2026-09-04 22:06:59 +02:00
maj00r
27f0e97b43 Draw a stand-in for a missing thumbnail, pass the language code to eu07.ini
The file was getting "pl" or "en" whatever the user picked, so a simulator with
its own language file started in English.
2026-09-04 21:53:29 +02:00
maj00r
8e87eb8638 Show bare keys in settings, fix the depot detail tabs
Drops the vehicle counter from the General tab, and the texture tab stops
gluing "label: value" into single lines and uses the same rows as General.
2026-09-04 21:41:38 +02:00
maj00r
4aec689059 Take the scenario presentation logic out of the code-behind
Scenery tree, fog scale, season dates and timetable lookup become their own
classes.
2026-09-04 21:26:28 +02:00
maj00r
2cbc92ad92 Wire up 7 setting descriptions that existed in the translations but were never shown 2026-09-04 21:22:19 +02:00
maj00r
e969137824 Show the eu07.ini key on every settings row 2026-09-04 21:21:14 +02:00
maj00r
3c502f630d Split Settings into model, serializer, paths and store
698 lines did all of it at once. The mutable CaptureFromUi callback becomes an
ISettingsCapture the settings view implements.
2026-09-04 21:13:06 +02:00
maj00r
8e5fe01104 Take the remaining I/O out of the domain and drop AppState.Instance
Scenery translations and load weights get repositories; AppState moves to the
application layer.
2026-09-04 21:06:23 +02:00
maj00r
0444070e12 Move rolling stock and physics into the domain
VehicleDatabase becomes VehicleCatalog, Physics becomes VehiclePhysics, and the
textures.txt and .fiz parsers move to Infrastructure. GameLibrary replaces the
GameData singleton.
2026-09-04 21:03:08 +02:00
maj00r
789f0dd1c9 Make Scenery a domain aggregate with no I/O
Parsing and loading move to Infrastructure/Sceneries. Weather becomes a value
object owning the "does this differ from the file" rule.
2026-09-04 20:53:50 +02:00
maj00r
aef086e9f0 WIP: settings sections, shortcuts window, depot tweaks 2026-09-04 20:40:47 +02:00
maj00r
bcf266a167 4 px above the settings tab strip 2026-08-31 00:46:15 +02:00
maj00r
43a361ff89 split depot into domain and view classes 2026-08-31 00:44:48 +02:00
maj00r
04b0805703 log swallowed exceptions and missing translation keys 2026-08-31 00:44:42 +02:00
maj00r
b5fabf79f5 compile bindings for texture base window 2026-08-30 23:03:38 +02:00
maj00r
85de34c70c repository url fix 2026-08-30 22:34:01 +02:00
maj00r
563a937eb9 wider migration from old starter 2026-08-30 22:29:45 +02:00
maj00r
c7853f6588 Leave shaders/tonemapping.glsl alone and validate the sim executable
Shaders: drop ApplyHdrShader and FindBundled. The Pascal starter only copied
starter/Reinhard.glsl over shaders/tonemapping.glsl when the user picked an
operator in the HDR combo (uSettings.pas ChangeHDR, its only caller being
cbHDRChange), never on an ordinary save. We ran it from SaveTo, so every save
replaced the file the game ships. That file has been tracked in the game repo
since 2020 and now defaults to AgX, so overwriting it with a 2021-vintage
Reinhard was a two-generation downgrade that also lost the NaN/Inf sanitize.
Also comments out gfx.postfx.tonemapping on save; the engine has no such key.

Executable: ResolveExecutable now validates its pick (file exists, has an
execute bit outside Windows, and the MZ/ELF header matches the running OS) and
returns the first candidate that passes instead of the first that matches by
name. .exe is no longer a Linux candidate - a Steam install with the native
binary still zipped would otherwise resolve to the Windows PE. On failure the
problem reaches the caller, and MainWindow shows it instead of swallowing the
exception, so a launch that does nothing is no longer silent. A manual pick
whose file is temporarily missing is kept in the combo rather than falling back
to auto and being overwritten on the next save.

Claude-Session: https://claude.ai/code/session_01HamVNWE9mwmz1vs2iEpNQq
2026-08-29 16:42:36 +02:00
maj00r
3b7a8135ea Strip all comments from the C# sources
Removes every // and /// comment from the 28 .cs files, -1331 lines.

Done with a lexer rather than a regex: the sources carry plenty of // inside
string literals (@"//\$decor\b", the //$o trainset directives, sb.Append("// "),
"https://wiki.eu07.pl/") and those must survive. It tracks regular, verbatim and
interpolated strings, interpolation holes and char literals. Every file was
checked by comparing the sequence of string-literal characters before and after
the strip; all 28 match. BOMs preserved, blank-line runs collapsed to one.

Claude-Session: https://claude.ai/code/session_01HamVNWE9mwmz1vs2iEpNQq
2026-08-29 16:42:11 +02:00
maj00r
e3caa9d38f Fix the language picker and tidy the graphics tab
Both language combos decided a change was the user's by checking
IsKeyboardFocusWithin on the picked item. Selecting with the mouse leaves the
focus on the combo, not on the item, so on Windows the check failed and the
language never changed. The handlers now compare the picked code with the one
already loaded instead of guessing who caused the event: filling the combo in
selects what is loaded and stops there, a real pick differs and applies.

The settings tab listed a hard-coded Polski / English pair and wrote the
language back as "Polski" or "English", so picking Czech, Hungarian or
Russian in the top bar was overwritten on save. It is filled from lang/ now,
and writes back the selected entry.

LocalizationService gains a LanguageChanged event: the main window rebuilds
the captions that code builds once (train stats, panel headers, combo items)
from there, so a pick in either place refreshes them. Its PropertyChanged
also names the indexer "Item[]", which is what bindings listen for.

Graphics tab: the track-curve quality slider moves over from Physics, the
view angle shows a degree sign instead of the Polish "stopni", and the HDR
tone-mapping picker is gone - only Reinhard.glsl ever shipped, so
ApplyHdrShader copies that one and the starter.hdr setting is dropped.
2026-08-25 22:17:11 +02:00
maj00r
f9960e5113 updated translations [wip] 2026-08-25 21:22:39 +02:00
maj00r
9e2166065b Rework the depot browser layout and confirm a crewless start
The vehicle database panel loses its header bar and packs the search box and
the archival filter into one line, the class combo takes a full-width line of
its own with a miniature (big in the drop-down, one line when closed) and the
bulk / texture-base actions move into the Add button's drop-down. The mini
preview sits beside the texture data and stays hidden until an entry is
picked, so the list keeps the space.

Picking a class or a vehicle now fills both combos in, and a class alone is a
valid filter (it used to leave the list empty without a category). The combos
and the list are rebuilt on the next dispatcher pass, since clearing Items
from inside the SelectionChanged that asked for it throws.

Vehicle removal becomes a per-card tool next to flip / crew, the scenery and
vehicle names move into their panel headers, and the texture randomizer
dialog sizes to its content instead of clipping its last button.

Start no longer hides behind Ctrl: a consist with no crew and no passenger
says so on the button and asks for confirmation before launching.
2026-08-25 20:58:57 +02:00
maj00r
a93af4bd44 Load sceneries in parallel and skip the splash on a fast start
Scenery parsing runs on Parallel.ForEach and the reload button does it off
the UI thread. The splash window only appears when loading passes 300ms, so
a warm start goes straight to the main window. The log button moves into the
navigation row, dropping the separate caption strip; timetable and info use
the shared MonoFont family instead of a hard-coded Consolas.
2026-08-25 20:58:15 +02:00
maj00r
13137321c1 Gate Start on crew, pick starting vehicle, loading screen and help menu
#16 and #12 Start is enabled only with crew/passenger (hold Ctrl to force); the chosen starting vehicle is carried through launch; loading-screen logo; help menu; runtime language picker.
2026-08-22 23:15:35 +02:00
maj00r
825c6f57ec Sort the warehouse and import magazyn.ini
Preset sort by name or track; import the Pascal starter/magazyn.ini warehouse.
2026-08-22 23:15:35 +02:00
maj00r
785b8c7afa Rebuild the depot consist editor
#9 category minis in the class list; #10 coupler after the last car; #11 drag and drop from the browser and consist reorder; #12 fix forced headdriver (occupancy); #13 hide archival vehicles; #14 randomise order; #15 randomise orientation; #16 pick starting vehicle; #18 collapse multi-unit sets; texture randomiser and stock database.
2026-08-22 23:15:35 +02:00
maj00r
12b06a2689 Show consist stats, keep empty trainsets and restore last scenery in Scenarios
#20 length/mass/vehicle/track status bar; #17 empty trainsets stay listed; #19 remember last scenery; #16 default starting vehicle; scenery i18n labels, attachments/includes/info tab, weather restore and reload.
2026-08-22 23:15:35 +02:00
maj00r
ce806130f7 Add hide-archival, last-scenery, HDR tone map and external-change settings
#13 HideArchivalVehicles; #19 LastScenery; HDR tonemap + framebuffer fidelity; reload eu07.ini when it changes on disk; dump missing-vehicle log on exit.
2026-08-22 23:15:34 +02:00
Mateusz Włodarczyk
1118771486 Sync setting defaults with eu07 engine, drop dead options
Cross-checked against ../maszyna: several StarterNG defaults didn't
match the simulator's actual defaults (Globals.h), and three exposed
options never mapped to a real eu07.ini key.

- Correct defaults to match the engine: VSync=false, LiveTraction=true,
  VirtualShunting(ai.trainman)=true, DynamicLights=7 fallback,
  CabShadowsRange=0, GfxResourceSweep=true, FeedbackMode=1,
  ShadowMapResolution=2048, ReflectionsFidelity=0, Volume=50.
- Remove Post-processing (gfx.postfx.tonemapping), onboard-screen
  refresh rate (pyscreenrendererpriority), and volume-during-pause
  (sound.volume.paused) — none of these keys exist in the simulator.
- Only apply parsed UART feature tokens when eu07.ini actually has an
  uartfeature line; otherwise fall back to the engine's own defaults
  instead of all-false.
2026-07-05 19:19:06 +02:00
Mateusz Włodarczyk
c4147a2f66 Add settings profiles and expand exposed eu07.ini options
Adds save/apply named settings profiles (SettingsProfileStore), a
battery-default export option that rewrites trainset velocity on
launch, and an option to omit decorative trainsets from the exported
scenery. Also surfaces many previously-unmapped eu07.ini keys in the
Settings UI (UART/feedback port, FPS limit, shadow angle, fullscreen
windowed, ANGLE Vulkan, friction/brake sensitivity, and an Advanced
section for texture/GLES/threading tunables).
2026-07-05 18:04:07 +02:00
Mateusz Włodarczyk
211863c921 Add dynamic lights setting and fix macOS config paths
- Add DynamicLights (0–7) setting mapped to the eu07.ini dynamiclights key,
  exposed as a slider in the Graphics section of Settings.
- Fix config file paths on macOS for eu07.ini, eu07_input-keyboard.ini,
  and userpresets.json to use ~/Library/Application Support/MaSzyna/
  instead of falling through to the Linux XDG path.
2026-06-30 21:30:52 +02:00
Sebastian Krzyszkowiak
92cfb82969 Fix field of view option name and description
Cabin shadow sources range is already handled by CabShadowsRange.
This duplicated value was setting FOV instead.
2026-06-26 21:40:31 +02:00
34758bb21d Keybinds editor 2026-06-24 19:24:06 +02:00
5908200bc4 Fix loads, some UI improvements 2026-06-24 10:08:17 +02:00
60f61a122d Physics and linux compilation support 2026-06-24 00:33:24 +02:00
d932761786 Layout improvements, depot behavior improvements 2026-06-23 23:24:46 +02:00
1bfac8b222 Auto expand scenery tree and autoselect first vehicle 2026-06-23 18:47:18 +02:00
b977d224e9 Complete UI rebuild 2026-06-23 18:20:09 +02:00
a7bb897fc6 Split car categories 2026-06-17 22:30:22 +02:00
b2f693113d Starter improvements
- scenery Description
- scenery mini
- extracted translations outside
- autoselect first consist on scenery selection
- autoexpand on group click
2026-06-17 22:00:01 +02:00
1cc0cd306a fixes for trainset generation 2026-06-16 22:19:42 +02:00
fee1106cd4 Some optimisations 2026-06-16 21:21:54 +02:00
a358651a98 Add settings parsing 2026-06-16 01:20:17 +02:00
0e82841a56 consist editor improvements 2026-06-13 00:54:37 +02:00
6dc9b77a24 Initial depot view 2026-06-11 23:01:49 +02:00
ba9c16e4c4 Added system language detection 2026-02-12 11:07:36 +01:00
dec9ab6874 Add main view translations 2026-02-12 00:50:20 +01:00
1f61b150d3 Add trainset parser 2026-02-12 00:42:51 +01:00