18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 00:35:59 +01:00
Commit Graph

3548 Commits

Author SHA1 Message Date
maj00r
685258d787 Merge pull request #274 from MaSzyna-EU07/feat/elf-master-controller-emergency-brake
Elf: emergency brake position in the master controller (eu07/maszyna#413)
2026-11-09 18:59:12 +01:00
jerrrrycho
12299bb1fa Merge remote-tracking branch 'origin/master' into feat/elf-master-controller-emergency-brake 2026-11-09 16:33:31 +01:00
1760c90934 Merge pull request #271 from MaSzyna-EU07/feat/diesel-throttle-position-marker
Throttle position marker for diesel locomotives (#74)
2026-11-09 15:23:17 +00:00
jerrrrycho
6f1055e09d fix: a duplicated cab control keeps its scale table
MirrorCopy() of a duplicate: yes control (#285) now copies the scaletable: of the
duplicate's definition too, so the copy is animated on the same non-uniform scale.
build-feat-diesel-throttle-position-marker
2026-11-09 16:13:43 +01:00
jerrrrycho
478727850d Merge remote-tracking branch 'origin/master' into feat/diesel-throttle-position-marker
# Conflicts:
#	vehicle/Gauge.h
#	vehicle/Train.cpp
2026-11-09 16:07:48 +01:00
jerrrrycho
cf3080c1f3 Merge remote-tracking branch 'origin/master' into feat/elf-master-controller-emergency-brake
# Conflicts:
#	McZapkie/Mover.cpp
2026-11-09 15:30:38 +01:00
d5e524ee60 Merge pull request #231 from dos1/aiui
driveruipanels: Allow to toggle AI driver from the driving aid
2026-11-09 13:00:26 +00:00
f908ae307b Merge pull request #265 from pwarszawski/feat/ai-braking-gradients
AI on up gradients: hold a train coming to a stand, start on the train brake
2026-11-09 12:59:34 +00:00
d6b9a94079 Merge pull request #267 from MaSzyna-EU07/fix/light-programmer-coupled-side-headlights
Light programmer: switch off the lights at the coupled end, not the opposite one (eu07/maszyna#395)
2026-11-09 12:58:57 +00:00
7c103b5d2d Merge pull request #268 from MaSzyna-EU07/fix/ws-hold-coil-lever-bistable
Bistable hold coil lever of the line breaker (eu07/maszyna#364)
2026-11-09 12:57:49 +00:00
f61a4ab2e7 Merge pull request #269 from MaSzyna-EU07/fix/diesel-smoke-after-ignition
Diesel exhaust smoke only once the engine fires (eu07/maszyna#523)
2026-11-09 12:57:02 +00:00
7edf23b8ff Merge pull request #270 from MaSzyna-EU07/fix/fpslimit-frame-pacing
fpslimit: pace frames in integer clock ticks, show the real frame rate (eu07/maszyna#416)
2026-11-09 12:56:40 +00:00
fa00fff594 Merge pull request #273 from MaSzyna-EU07/feat/6dg-power-demand-5pct-steps
6Dg: power demand in 5% steps (eu07/maszyna#412)
2026-11-09 12:55:39 +00:00
ff88868d32 Merge pull request #275 from MaSzyna-EU07/fix/sm42-shunt-mode-toggle
SM42: shunt mode at the first move of the switch, CA off in the shunt mode
2026-11-09 12:54:21 +00:00
889aa2d5db Merge pull request #278 from MaSzyna-EU07/feat/shunt-lock-resistive
Field shunting locked at zero and on resistive positions (eu07/maszyna#402)
2026-11-09 12:53:57 +00:00
4a9ab1447e Merge pull request #279 from MaSzyna-EU07/fix/multiple-unit-electric-diesel
No multiple-unit control between electric and diesel locomotives (eu07/maszyna#520)
2026-11-09 12:53:30 +00:00
0c95dbfa5a Merge pull request #280 from MaSzyna-EU07/feat/radio-fuse
Radio fuse: a cut-off in the radio's power supply (eu07/maszyna#438)
2026-11-09 12:53:14 +00:00
ebc9eb8740 Merge pull request #281 from MaSzyna-EU07/feat/shunt-pantograph-config
AI: suggested pantograph setup for shunting in the .fiz (eu07/maszyna#461)
2026-11-09 12:52:58 +00:00
3710b2e5d6 Merge pull request #284 from MaSzyna-EU07/feat/light-programmer-cab-light
Light programmer: cab light flag per position (eu07/maszyna#529)
2026-11-09 12:51:37 +00:00
fedbf458b5 Merge pull request #285 from MaSzyna-EU07/feat/duplicate-cab-control-submodels
Cab controls with more than one submodel (eu07/maszyna#527)
2026-11-09 12:50:54 +00:00
28337b5f28 Merge pull request #286 from MaSzyna-EU07/fix/dimmer-position-bounds
fix(lights): keep the headlight dimmer position within the DimmerList
2026-11-09 12:50:35 +00:00
c1089a6b16 Merge pull request #292 from MaSzyna-EU07/fix/en57-ep2-brake-charging
EN57 brakes: charging when hauled with the brake hose alone, Knorr EP brake only with control power
2026-11-09 12:48:13 +00:00
cb1dd60630 Merge pull request #293 from MaSzyna-EU07/fix/door-inner-faces-lowpoly-lighting
Door wings: let the low poly interior have its own, moving inside of the doors (eu07/maszyna#512)
2026-11-09 12:47:58 +00:00
8ec5d91307 Merge pull request #294 from MaSzyna-EU07/feat/second-loco-engine-start
Separate engine start switches for the vehicles in multiple
2026-11-09 12:47:44 +00:00
af44ed72af Merge pull request #298 from MaSzyna-EU07/feat/editor-tutorial-gifs
feat(editor): the clips of the tutorial lessons
2026-11-09 12:47:22 +00:00
71733a343a Merge pull request #299 from MaSzyna-EU07/fix/ui-tooltips-stay-in-window
fix(ui): tooltips and popups stay in the main window, and a long tooltip wraps
2026-11-09 12:46:56 +00:00
edea0dc0f5 Merge pull request #301 from pwarszawski/fix/python-screens-pillow
Python screens: ship Pillow with the Windows build, and the screen module for Pillow 10+
2026-11-09 12:46:42 +00:00
65468a2eae Merge pull request #302 from miloszunio/fix/gizmo-yaw-rotation-master
fix(editor): model yaw rotation with the gizmo jumps past 90 degrees
2026-11-09 12:46:24 +00:00
c0524552f1 Merge pull request #303 from MaSzyna-EU07/fix/legacy-renderer-instance-scale
fix(render): scale of model instances in the legacy and simple renderers
2026-11-09 11:39:41 +00:00
963d65192a fix(render): scale of model instances in the legacy and simple renderers build-fix-legacy-renderer-instance-scale 2026-11-09 11:23:46 +01:00
Claude
58e4bbff49 fix(editor): a model turned with the gizmo about the vertical axis no longer jumps back and forth
The angles of the whole gizmo matrix were decomposed every frame and the model was turned by their difference from its own.
The decomposition gives the angle about the vertical axis only within -90..90 degrees: past 90 it comes out as 180 - angle
with the other two axes turned by 180, so a drag one way turned the model back and flipped it. The turn is now taken from
the delta matrix of this frame (small, so its angles decompose with no ambiguity) and wrapped to -180..180.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-09 07:56:51 +01:00
jerrrrycho
38202f4e57 Merge remote-tracking branch 'origin/master' into feat/second-loco-engine-start
# Conflicts:
#	CMakeLists.txt
build-feat-second-loco-engine-start
2026-11-08 21:51:59 +01:00
jerrrrycho
c0f1749e87 Merge remote-tracking branch 'origin/master' into fix/door-inner-faces-lowpoly-lighting
# Conflicts:
#	vehicle/DynObj.cpp
build-fix-door-inner-faces-lowpoly-lighting
2026-11-08 21:47:32 +01:00
jerrrrycho
01ec499f54 Merge remote-tracking branch 'origin/master' into feat/diesel-throttle-position-marker
# Conflicts:
#	vehicle/Train.cpp
2026-11-08 21:37:31 +01:00
jerrrrycho
d50a724bc8 Merge remote-tracking branch 'origin/master' into fix/ws-hold-coil-lever-bistable
# Conflicts:
#	vehicle/Train.cpp
build-fix-ws-hold-coil-lever-bistable
2026-11-08 21:28:09 +01:00
jerrrrycho
db65dfa5f0 test: file-local helpers instead of lambdas in the brake handle tests (Sonar S2259)
The analyser loses track of references captured by lambdas; the St113 EP and MHZ buttons tests call plain helpers, as ep_brake() and ready_knorr_ep() do, which it doesn't report.
build-fix-en57-ep2-brake-charging
2026-11-08 21:15:12 +01:00
pwarszawski
eb75089ba2 Python screens: ship Pillow with the Windows build, and the screen module for Pillow 10+
- The Windows build job installs Pillow into the Python 3.14 whose Lib, with
  site-packages, CMake copies next to the executable as python64\Lib, as the
  Linux job already does; the README says the same for a local build.
- Both build jobs copy staticFiles/python/local (the Python 3 version of the
  module every cab screen subclasses) into python/local of the build.
- The module puts back what Pillow 10 removed and the screen scripts use:
  ImageFont.getsize() and ImageDraw.textsize() on top of getbbox() /
  textbbox(), and Image.ANTIALIAS as LANCZOS. With an older Pillow nothing
  changes.

Part of #300.
2026-11-08 21:12:35 +01:00
maj00r
6824e8ae22 Merge pull request #287 from MaSzyna-EU07/fix/msaa-alpha-tested-tracks
fix(render): antialias alpha tested edges with multisampling (eu07/maszyna#449)
2026-11-08 21:03:47 +01:00
maj00r
9fecba82f0 Merge pull request #291 from MaSzyna-EU07/fix/sod-lamp-whole-consist
SOD lamp: doors of the whole consist, three states (eu07/maszyna#288)
2026-11-08 20:56:20 +01:00
maj00r
17676863bc Merge pull request #266 from MaSzyna-EU07/feat/exe-test-mode
Test mode: `--test` runs a scenery unattended and exits with the result (#541)
2026-11-08 20:41:57 +01:00
pwarszawski
1cb365a2a8 Merge master into feat/ai-braking-gradients (after #297) 2026-11-08 20:40:54 +01:00
maj00r
102baa6c81 Merge pull request #297 from pwarszawski/fix/ai-passenger-stop-approach
AI: making for a passenger stop, leave room only for the brake's own fill time
2026-11-08 20:38:35 +01:00
jerrrrycho
04b55c866a fix(render): alpha to coverage only where it is on, full coverage on flat alpha
Review of the alpha to coverage change for alpha tested surfaces:

- An alpha which is flat over the pixel (fwidth 0) and equal to the opacity
  threshold got a coverage of 0.5, so e.g. opacity 1 on an opaque or DXT1
  texture turned half see-through with multisampling. Without an alpha edge
  in the pixel the plain test decides now: step(opacity, alpha).
- The shaders took the coverage path whenever they were built with
  multisampling, also where alpha to coverage is off (the reflections pass)
  or does nothing (the single-sampled model previews), and grew the cut-outs
  there by about half a pixel. model_ubo gets an alpha_to_coverage flag, set
  together with the GL state, and the shaders keep the plain alpha test
  without it. The previews no longer turn alpha to coverage on. The flag
  takes 4 of the 12 padding bytes after shadow_tone, so the std140 layout and
  the size of the block stay the same.
- The shader validator never set iMultisampling, so it never compiled the
  alpha to coverage branches. Its "features on" configuration uses the
  default of 2 now, on desktop GL and GLES.
build-fix-msaa-alpha-tested-tracks
2026-11-08 20:03:32 +01:00
maj00r
d0ca44cd67 fix(ui): a popup begun outside any window stays in the main window too
A popup begun outside any window, as the context menus of the editor, the dialogs for a new scenery and for opening one and the
pause dialog of the driver are, takes no viewport from a parent. It was put into the main window only where it merged there:
with the main window minimized, or behind a panel taken out into a window of its own, it got a window of the system of its own,
with an OpenGL context of its own, the way the editor froze. With io.ConfigViewportsNoAutoDetach the tooltips and popups stay in
the main window there too.

The comment of io.ConfigViewportsNoAutoDetach tells how they're placed: as with the viewports off, not shrunk.
io.ConfigTooltipsWrapWidth moves to the miscellaneous options, it works with the viewports off as well, and its comment tells
that SetItemTooltip() wraps too and BeginTooltip() doesn't.
build-fix-ui-tooltips-stay-in-window
2026-11-08 19:58:48 +01:00
jerrrrycho
8fb596f218 fix(simulation): any exception ends a test run with error, other runs as on master
main() tells a test run (--test) apart before anything runs. Only a test run
catches every exception and installs a std::terminate handler, both ending the
run with the error code and a test: line; any other run keeps master's
exception handling, so on Linux an uncaught runtime_error aborts at the throw
site again.

A test run doesn't start the Discord RPC thread: it published the test
scenery as the player's presence and held the closing up to 5 s.

run.py drops a case scenery's .sbt cache after a run cut short (wall_timeout,
error, a crash, killed by run.py), which could have been writing it.

The -edit branch of the test command line parser had no effect (a token that
isn't an option is ignored either way) and is gone; its test checks what can
be seen instead.
2026-11-08 19:46:16 +01:00
jerrrrycho
bbd7d9c5bf fix: a stopped diesel engine no longer stops the others every frame (eu07/maszyna#80)
dizel_Momentum() relayed MainSwitch 0 to the consist every frame while the engine stood still, whatever stopped it. In a train with mixed JointEngineStart flags an engine stopped from mainb_off stopped the engines behind it once it spun down, and the stopped engine of the cab's vehicle knocked out the one started from mainb_on. The stop is now relayed only when the engine stalls while running, as on master an engine stalling in a joint start still stops the others.
2026-11-08 19:38:16 +01:00
jerrrrycho
7ba478aea9 test: reach the mover by reference in the brake handle lambdas (Sonar S2259)
The lambdas of the St113 EP brake and the MHZ buttons tests called the mover through test::vehicle::operator->(), which the analyser takes as possibly null; they capture a reference from mover() instead.
2026-11-08 19:30:46 +01:00
maj00r
be40008808 fix(ui): tooltips and popups stay in the main window, and a long tooltip wraps
With the panels in separate windows on (the default), a tooltip or a popup that didn't fit in the main window got a window of
the system of its own, with an OpenGL context of its own. The editor froze so on 2026-11-08: its main thread stuck for good in
the NVIDIA driver while making the context of an invisible window 1925 x 29 px, a tooltip in one line wider than the screen.
The Polish texts of the editor have tooltips of up to 360 characters in a line; the one of the curve mode of laying track is
2088 px wide.

- io.ConfigViewportsNoAutoDetach (a MaSzyna addition, set with the separate windows) keeps the tooltips and popups shown over
  the main window inside it too, placed and shrunk as they are without the separate windows: they get no viewport of their
  own. A panel dragged out of the main window by hand still gets its window, and the tooltips and popups over it may go past
  its edge as before.
- io.ConfigTooltipsWrapWidth (a MaSzyna addition): SetTooltip() wraps its text at this width. The ui sets 40 em, 520 px at the
  font of 13 px.

Checked in the editor on a hidden desktop: the tooltip of the curve mode, full screen 1920 x 1080, and the one of the redo
button at the edge of a window 1280 x 720 each made a window of their own before, and none now. Both are drawn in the main
window, the long one in five lines.
2026-11-08 19:26:19 +01:00
maj00r
b1f2d0e3a1 feat(editor): the clips of the tutorial lessons, which the tutorial plays from lang/editor_tutorial
The lessons of looking around, laying, the curves, correcting a curve, joining, the switches, selecting and editing with
the gizmo each name a clip, lang/editor_tutorial/<name>.gif. The editor tutorial that #289 brings plays them, but doesn't
carry them: they were recorded on feat/switch-blades and stayed there. Taken from it as they are, 6.1 MB; the packages copy
lang/ whole, so they go out with the game. Without them a lesson just shows no clip.
build-feat-editor-tutorial-gifs
2026-11-08 18:30:22 +01:00
jerrrrycho
57db0087ff fix: the SOD lamp of the whole consist is opt-in per vehicle (DoorClosureSignal)
The three-state door closure lamp is switched on by DoorClosureSignal=Yes in the
Doors: section of the .fiz of the vehicle whose cab shows the lamp (the occupied
vehicle), off by default: without it the lamp keeps showing the lock of the
vehicle's own doors. The eu07.ini switch doorclosuresignal is gone, the data
decides. Sets whose cars lack DoorNeedPermit would blink at every standstill, so
only the sets with permits get the key.
2026-11-08 18:30:22 +01:00