maj00r
16c90eb674
feat(editor): Straight and Curve are one Plan tool (G, also C) right after Lay track, a straight opens with its grips, a curve or a line with its vertices; digits no longer type a length while extending from a free end; the scenery wizard chooses realistic or fictional, a realistic one gets //$g and //$o and opens with the orthophoto in the top view, a fictional one only the top view with the grid; the orthophoto settings are kept in the scenery as //$o (on, year, opacity, radius, height, drape, lift, hires, scene, origin) and survive the new formats; self-test command mapstate
2026-10-12 02:21:29 +02:00
maj00r
c9f381a9c9
feat(editor): the parallel track is a tool of its own (N) in the toolbar, its green preview only shows there, Shift+click on a straight in L opens it with that track; the norms are two buttons at the top of the Lay panel and of the Curve tool, shared by both, free hides the recommendations of the curve and its norm warnings, the duplicate transitions checkbox is gone; the Lay panel starts with the radius, the speed and the shape; the Tracks toolbar shows the tools that lay track, the ones that correct a line are under More (remembered); First steps ends with driving the track laid; self-test command tracktab
2026-10-12 01:52:28 +02:00
maj00r
7fea51ad06
feat(editor): norms of laying, free by default: free lays plain arcs with no transition curves and no cant and keeps quiet about the norms, PKP PLK gives the transitions and the cant for the design speed with the warnings, chosen at the top of the Lay panel; digits in Tracks only type values, never change the edit mode; in Lay a track under the cursor says the click starts on the ground beside it, Shift+click chooses it for a parallel track; Alt while laying turns the direction in steps of 15 degrees, with the azimuth by the cursor; K splits only within 20 px of the selected track, where a marker shows it; the environment, overhead line, transition curve, view and include labels translated, one name for laying track in Polish
2026-10-12 01:35:39 +02:00
maj00r
f28640dd44
feat(editor): laying track for a beginner: Ctrl+Z and Backspace during a chain of laid pieces go back to the end of the piece before instead of carrying on from a removed track (Ctrl+Y ends the chain); every warning of the laid shape and of a join is shown by the cursor for 4 s after the click, also when the radius chosen on the wheel didn't reach the cursor and the arc goes through it, the preview of a shape with a warning is orange as it is laid anyway; the switch type stays chosen after a switch is placed; the status says each click lays a piece; a "First steps" window (Help menu, opens with the editor until unticked) with eight steps ticked off as they are done; an empty scenery opens in Tracks with the camera over its origin and a grid where there is no ground under the cursor; F1 lists the laying gestures (Ctrl/Shift+wheel, drag from a free end, typed length); self-test command laychain; Polish translation
2026-10-12 01:21:50 +02:00
maj00r
704511fe5e
feat(editor): the plain straight a switch branch leads into gets its end moved to where the branch lands instead of a short straight being added: shortened when it reaches past, lengthened when it ends short; straights drawn with handles count (the trimmed end loses them), so a switch slid up to a track that ends close to the crossing now places
2026-10-12 00:36:13 +02:00
maj00r
b27d1772a7
feat(editor): a switch being placed slides along its straight first, so its branch lies on the line of the track it leads into (a straight between, or an arc of the switch radius right after it with the arc ending at the track's end); only when the slide leaves the straight it stays put and reverse curves fill in; the straight between reverse curves takes the speed of the switch's branch (R<300 40, <500 50, <760 60, <1200 80, <2500 100 km/h) instead of the track's
2026-10-12 00:25:01 +02:00
maj00r
d4d2a02018
feat(editor): the switch no longer slides to meet the track, only the straight and arc fill in: arc of the switch radius between two straights, and where the angles match but the tracks are apart, or the arc doesn't fit, reverse curves with no transitions and the largest radius that fits; the straight between them (6 m to V 60, 0.15 V to 100, 0.25 V above) only when 1/R1 + 1/R2 > 1/106.5 m (PLK ST-T1 9.3, table 9.4); new pieces take the style of a plain track, not of a switch
2026-10-12 00:09:49 +02:00
maj00r
0a73550c8d
feat(editor): the branch of a switch leads into the free end of a track: when the angles match the switch slides so its branch lies on the track's line, otherwise an arc of the switch radius right after the switch turns into it (with a straight between for a parallel track); works while placing a switch (drag toward the end) and when dragging from the branch end of a placed one, the track is shortened when it reaches past the branch; self-test switchlink / branchlink
2026-10-11 23:53:18 +02:00
maj00r
f1a3bde00f
refactor(editor): one declaration per statement (cpp:S1659) and no chained assignments (cpp:S1121) in the editor files of the branch; single statements under if/else/for that became two got braces
2026-10-11 22:28:35 +02:00
maj00r
d2111afe19
refactor(editor): alignment::join builds its candidates (straight, single arc, fitted curve, Bezier fallback) in separate functions, alignment_store::load reads each //$h line kind in its own function
2026-10-11 22:23:21 +02:00
maj00r
4030797b21
refactor(editor): the layouts laid from a free end (arc then straight, straight then arc, arc, straight) and the transition curve out of a curved neighbour in editor_track; joining and laying through points share the eased ends, the room check and the assembly of the pieces instead of two copies
2026-10-11 22:09:53 +02:00
maj00r
c5ac698702
refactor(editor): split the track mode into its gizmo, kept records, switch drive, switch slide and track bed files; path geometry shared in editorGeometry instead of four copies of the reversed path, track shape rules (stretching, rolls at joints, middle, switch axis, drive spot) in editor_track, fitting the track to the ground in ground_follow with the terrain query passed in, the record layer and the switch classification in the stores; long gizmo, record watch and switch slide functions broken up, out-parameters replaced by optional results
2026-10-11 22:03:59 +02:00
maj00r
71bdf8e284
fix(editor): a switch drive stands at the height given in its //$e description, switch: {height: ...} above the start point of the switch (rail foot): placed with a new switch, swapped for another drive or side, or following its switch; drive_headers.py writes height 0.15 for ele and ele1 and 0.05 for mech and mech1, whose models reach that far below the origin, so they stand on the sleepers; the drives with a counterweight (mech_*, mech2, 0.57 m down) keep 0, as all 1965 drives of the digitized lines do
2026-10-11 21:33:28 +02:00
maj00r
dae97f7169
feat(editor): every switch laid gets its drive at once, also the one made by pulling a free end into a straight (named z1, z2... like the others): the drive marked default: true in its //$e description (mech_komin) until another is picked, on the diverging side or the other; the drive goes into the same undo step as the switch; a switch with a drive puts it on the other side with one button, as one undo step; drive_headers.py marks mech_komin as the default; self-test commands drives and driveflip; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
12f7fc879f
feat(editor): a switch on a straight slides along it: drag it with the mouse in the Switch or Path mode (snapping to the joints, km shown) or type the distance in its window; the straight paths on both sides get shorter or longer, the ones it runs over are cut, the next switch or the end of the straight stops it; Replace the geometry with the template does the same with the ends of a longer or shorter type instead of leaving the neighbour overlapping it; a straight neighbour following an end that neither moved off its line nor turned keeps its zero control vectors; self-test commands switchslide, switchreplace, pathsnear; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
3b503ede0c
fix(editor): the route design keeps its whole fragment after Apply: the last path of the line is the one holding the last piece, not the original end path holding the first piece of its group, so a second Apply (e.g. after changing the share of a compound curve) no longer re-lays only the front part and leaves the old tail lying next to the new paths; the same for the curve laid with the straight tool
2026-10-11 21:33:28 +02:00
maj00r
11aa67378d
feat(editor): the drawn tracks kept in the scenery as //$h lines as they are drawn: laying, pulling out of a free end, joining two ends and the parallel track record the whole line they belong to, its straights, arcs and transition curves, with the radii from the chord and the turn of the arcs and the transitions from the turn they make, in the same undo step; the curves read in the route window and the Curve tab are what the paths are, no transitions or cant made up for them; a curve ends at the point of reverse; a parallel arc is concentric with its source; the paths laid in pieces of up to 90 degrees match the kept design within their own approximation; 'Keep the line as it lies' for lines drawn before; self-test commands digitize and parallel; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
4ea2f4f13f
feat(editor): the kept alignments and switches after a drag of the gizmo or of a point: a line all of whose paths are moved or turned as a whole takes its kept design along; paths pulled out of a kept design, or given another cant, are told about on the status line with the way back; a switch moved or turned as a whole keeps its type and its record follows it, with its km; a switch bent out of the shape of its type loses it and is told about (//$r records keep the shape of the switch); all of it in the same undo step as the drag; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
ddb637a3f5
feat(editor): undo and redo take back the kept alignments and switches together with the paths: each step of the history keeps the //$h and //$r records from before it; a deleted switch or slip forgets its record in the same step, so undoing the deletion brings it back; edits of the switch number, rail and km and forgetting a kept design stay outside the history; self-test commands deleting paths
2026-10-11 21:33:28 +02:00
maj00r
b466755a0f
feat(editor): single slip (Rkp 1:9 R190/R300) joining the pair of tracks on the side of the click, and crossing (Skrz 1:9, 1:12) of two straights, placed as the double slip is, at a crossing of two straights, and kept in the scenery as //$r records with their parts; the list of the slip switches and crossings; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
0bfb8a4e7c
feat(editor): switches kept in the scenery as //$r lines: type (Rz, arc Rlj/Rld, slip Rkpd), rail, R, 1:n, side, a, b, R of the main track, the parts of a slip, km and number, catalogue or measured; recorded as they are placed on a straight, in a curve (one-sided when diverging to the side the curve turns to), as a double slip, and when their geometry is replaced or flipped; the switch panel shows the kept type and the R of the diverging track bent with the main one, with the number, rail and km to edit (km from the kept horizontal alignment); the speed check of a diverging track takes its R from the kept type; records follow renamed switches and go with removed ones on save; editor records stay out of the terrain files (.txtf), and those written there by hand go with them into .btf; the side of the diverging track shown as seen; self-test commands for placing switches, the kept switches and the .btf conversion; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
572daeb274
feat(editor): the horizontal alignment designed in the route design kept in the scenery as //$h lines: its vertices and the elements they make (straight, transition, arc, with the radius at the start and the end and the cant), so the paths laid by it are known again without guessing from their curvature; a curve read from the paths takes the radius, the transitions, the cant and the compound arcs of the kept design when its paths lie on it within 2 cm, the other way round too; the whole line design taken back when the fragment has its ends; a curve redesigned alone taken into the line it belongs to; km of the start kept with the design and carried on to the vertical profile of the same paths; paths which no longer follow the kept design shown in the route window, with the kept design to take or to forget; self-test commands for the route design and the kept alignments; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
c722e4e419
fix(editor): the gizmo keeps the diverging path of a switch on the surface of its main path
...
The diverging path p3-p4 takes its heights, grades at the ends and cant from the main path p1-p2 (the cone of
its cant) after every gizmo change: grade and cant rings, moving an end and editing a control vector. The tracks
joined to it follow its ends and grades. The grade ring measures along the main path and the gizmo stands in its
middle; the start vector of the diverging path slides along the main one and turns with it.
2026-10-11 21:33:27 +02:00
maj00r
a756beb34b
feat(editor): track gizmo rings along the track: direction, grade and cant
...
The rotate gizmo stands along the track. The cross ring changes the grade about the middle or the selected
end, the joined tracks take the grade at the joints; the ring along the track changes the cant of the track
or of the selected end, the joined tracks take it at the joints and ramp it. On a control vector the cross
ring tilts it up or down. Ctrl steps by 5 degrees, 1 per mille, 5 mm.
2026-10-11 21:33:27 +02:00
maj00r
89678ead3e
feat(editor): track gizmo turns, lengthens and edits the control vectors, joined tracks keep the tangent
...
W turns the track (about its middle or the selected end) and a selection of tracks, the joined tracks follow.
E lengthens the track at its free end: a straight stays straight, an arc keeps its radius, cant and grade.
The gizmo on a control point moves, turns or lengthens the vector; the control point of the track joined
there turns with it, at a switch the vector only slides along the switch. Straight neighbours dragged along
keep their tangents and become straight again when nothing bent them.
2026-10-11 21:33:27 +02:00
maj00r
16c1ac4c7b
feat(editor): two free ends joined without loops or forced curves, the shape from a free end on the wheel
...
- the join of two free ends (a drag from one onto the other, or a click of the lay tool on it) tries in turn: a straight when the joints check can't see the kinks (half its angle), one circular arc through both ends (a piece cut out of a curve comes back as it was, its cant kept), a curve with straights where the tangents meet, a reverse curve, and only then a free Bezier curve; a curve turning more than it needs to, sharper than 10 m or longer than three chords is never taken
- the transition curves eased out of a curved neighbour only when there's room for them between the ends, never crossing each other into a loop
- cant and transition curves recommended for the radius the curve really gets, at the speed of the joined track or of the tool and never above what the radius allows; the circular arc keeps at least max(20 m, 0.4 V) between the transitions, the cant lowered to what the shortened transitions can ramp, transitions under 1 m left out
- shapes from a free end: arc then straight, straight then arc, arc through the cursor, straight; Ctrl+wheel steps the radius, Shift+wheel the shape (at a free end: the other joins), the plain wheel still zooms; a click of the lay tool from a free end lays the shape and goes on from its end
- self-test commands join, layto and joints; Polish translation
2026-10-11 21:33:27 +02:00
21445507cc
Editor orthophoto: own geometry bank per scene tile, per-frame vertex budget
2026-10-10 18:24:26 +02:00
7b9eaf1ccb
Editor terrain: area fill with blurred or sharp edge, texture rotation
2026-10-10 17:35:52 +02:00
63302c1ace
Editor terrain: soft stitching to tracks, chunk resolution conversion, water materials
2026-10-10 16:08:12 +02:00
243ce636a7
Editor terrain: level brush with height picker, faster orthophoto fit
2026-10-10 01:27:48 +02:00
8cd0bab27b
Editor terrain: texture browser, undo, conversion from terrain files
...
- Terrain work mode shows a browser of the textures folder in place of the
node bank; textures/materials can be dragged onto the palette entries
(replacing the material), the material field and the water material field
- Ctrl+Z/Ctrl+Y for heightmap terrain changes: a brush stroke or an
operation is one step of the editor history
- Ground conversion reads only the files of the terrain directives
(.txtf with origin/rotate, or .btf without text), paints the chunks with
the materials of the triangles, drops only the shapes of those files
- Fix: ground grids converted out-of-range floats to int, so whole-scene
queries returned the triangles of a single cell (shifted chunks)
- Fix: terrain layers copied from textures already uploaded without their
data stayed grey
- Fix: ImGui ID conflict between terrain tool radios and section headers
- Fix: layers of terrain .txtf files named with the scenery/ prefix and
could not be saved
- Editor selftest commands for the terrain
2026-10-09 23:39:26 +02:00
5716bc1669
Fix windows compilation
2026-10-09 21:16:34 +02:00
35bda3778c
Heightmap terrain: .tch chunk packs, streaming with LOD, terrain painting, water and modifiers - terrain/<name>/terrain.yaml + <px>_<pz>.tch packs of 16x16 chunks (250 m, 0.5/1/2/5 m spacing), slices with crc-32 and optional zstd (vendored zstd 1.5.6 in ref/zstd) - heightmap_terrain [name] endheightmap_terrain directive replaces editorterrain - streamer: worker threads, camera + look-ahead loading, geomipmap LOD with skirts, pooled geometry - mat_terrain shader: up to 8 painted layer materials per chunk via texture arrays (opengl33); other renderers fall back to the dominant material - water bodies (outline + level), terrain modifiers (vertical profile shaping kept non-destructive) - F11 Terrain work mode rebuilt: chunks, sculpt, smooth, paint, point spacing, water tools
2026-10-09 21:02:25 +02:00
9935257783
Add nosonar tags
2026-10-09 18:40:31 +02:00
1c28809dd7
Sonar fixes
2026-10-09 14:42:55 +02:00
ff25e71e90
Merge branch 'feat/modern-editor' into feat/mini-generation
2026-10-09 13:13:33 +02:00
3e3317d26f
feat(editor): the toolbar as buttons with icons and names, the chosen tool standing out as the chosen field of work does, the names left out when the row is too narrow for them; the fields of work with icons of their own (surroundings, tracks, roads, terrain) and both rows captioned at their left end (work modes, tools); the tools of the toolbar and of the left edge of the 3d view from one list; Polish translation
2026-10-09 12:49:45 +02:00
645a54a739
feat(editor): icons over the 3d view: the tools of the field of work along its left edge (the edit modes of the surroundings, the track tools, the road tools with the lanes, the terrain tools with the orthophoto), the modes of the gizmo at its top, the axes of the world as the camera sees them in its top right corner, a click on one looking along it, with the top view under them; the icons drawn by editor/icons/editor_icons.py into a png which CMake writes out as an array built into the executable; the gizmo modes and the top view left out of the toolbar; Polish translation
2026-10-09 11:54:47 +02:00
791d5d052c
feat(editor): fields of work in a row of their own over the toolbar (surroundings, tracks, roads, terrain), twice as high, with bigger bold text, and the tools of the one chosen in the toolbar under it: the edit modes of the node bank, the track tools in groups with the vehicle and the structure gauge, the road tools with what the place tool puts, the terrain tools (sculpt, smooth, chunks, orthophoto); the tool options window keeps the settings of the tool; the node bank shows a big preview of the entry pointed at for a moment, with its model and skin; the green colours by default again; Polish translation
2026-10-09 00:42:17 +02:00
f184ce7a6a
feat(editor): colours of the editor: amber accents on grey panels as in the design of the layout, the rest of the simulator stays green (colours of the ui chosen by the ui of the mode drawn; Editor Settings > General, kept in eu07_editor.ini), docking preview in the accent colour in both; keys 1-5 choose the edit modes in the order of the toolbar, shown in its tooltips; Mode windows merged into Windows: the windows of the editor, model sets among them, window layout reset and unpinning of the docks; Polish translation
2026-10-09 00:15:14 +02:00
9b0e88db7a
feat(editor): node bank shows the entries as cards with the previews of their models (Previews, size of the cards 48-256 px, kept in eu07_editor.ini), in the groups and with the search as the list; images found by the names the preview generator gives them, worked out by the same code now (editor/editorPreviews: path of the model and skin, numbers of entries with the same ones in the order of nodebank.txt), read and scaled down in a thread of their own, uploaded a few in a frame, at most 512 kept, read anew on Reload node bank; images of the user interface made by the gl renderers (Create_Image/Release_Image of the imgui renderer, srgb in the modern one); Polish translation
2026-10-08 23:55:56 +02:00
476f3bf1b7
feat(ui): panels can be docked together and dragged out of the simulator window into windows of their own (imgui multi-viewports, ui.viewports yes by default, off where the renderer or the platform can't do it, e.g. wayland); imgui coordinates kept relative to the main window by the glfw backend, so the overlays, picking and gizmo of the editor work unchanged; overlays of the 3d view drawn on the main viewport; keys pressed in the separate windows passed on to the simulator, so the shortcuts of the editor work there too
2026-10-08 21:04:58 +02:00
344034ec70
feat(ui): imgui 1.91.9b-docking in place of 1.73: local changes of the backends carried over (glad as the gl loader, srgb and gamma of the ui, gles glsl string), BufferingBar/Spinner kept, imgui_tables in cmake; cursor position, cursor enter and focus of the main window passed to the glfw backend, which works with events now; code adapted to the api: ImGuiListClipper::Begin, BeginListBox, ImTextureID as an integer, ImageButton with an id, ImGuiKey without GetKeyIndex, logarithmic sliders in place of the removed power argument; ImGuizmo with the math operators defined before imgui.h and SetNextFrameWantCaptureMouse
2026-10-08 20:38:13 +02:00
maj00r
c11480ce2e
fix flipped ortophot + clear cache
2026-10-08 20:20:12 +02:00
maj00r
b02fe0ac2b
feat(editor): Signals mode of the Tracks window (H): semaphores, block, warning, shunting, stop, substitute signals and repeaters placed by the track from the templates of the scenery, described by //$e signal: (kind, mount, lamps, lean, the event the train reads them by) which tools/editor/signal_headers.py writes into them; a click by a track puts the signal on that side 2.25 m from the axis at the rail heads, facing the trains which have it on their right, a drag along turns it to the trains going the way of the drag; its (p1)_sem_info goes to event1 or event2 of the path, warning signals and repeaters, which the train doesn't read, get none; a head leaning away from the track swapped for its counterpart; the plate named like the signal; signals dragged along the track with their event, removed with it, renamed in the node properties with it, each a single step of the undo history; Polish translation
2026-10-08 03:12:16 +02:00
maj00r
898b4fcaf7
feat(editor): switch drive placed with a switch leans with the grade and the cant of the track at the points, raised as the simulation raises a canted track
2026-10-08 01:53:34 +02:00
maj00r
a5ade3258f
fix(editor): a curve with a switch in it read as one curve through the main track of the switch, the switch placed into a curve on the part around the click; the diverging path of a switch placed into a canted curve lies on the conical surface of the cant along its whole length, not only at its ends; platforms by a switch keep the cant of the track for their height, the gauge of the other path only sets them back
2026-10-08 01:39:35 +02:00
maj00r
ee3833fdba
feat(editor): platform edge put 1.725, 1.675 or 1.650 m from the axis of the track as chosen, kept in the editor settings; models along a track set back by the gauge of the other path of each switch whose points their line passes, also when they stand by the plain track ahead of the switch or by its straight path, the widening led in from the tracks beyond the diverging path; the line beyond the ends of a sweep goes on along the straightest path
2026-10-08 01:12:30 +02:00
maj00r
ca208b3ed1
fix(editor): a long arc of a larger radius kept as a part of a compound curve, only short arcs of growing radius taken for the transition curve of an old scenery
2026-10-08 00:51:29 +02:00
maj00r
24923dd472
feat(editor): track editor driven by what the cursor is over: the outline and a label show what a click or a drag does, snapping to free ends on the screen, handles and ends dragged directly, no rotation gizmo; laying from a free end the same in every mode, straight with Shift, the curve of a switch going on past its diverging end; height 0 where there's no terrain; placed switch leaves the switch mode, double slips listed apart, a drive of the switch placed with it by the //$e switch description of its template; compound curves of any number of radii; dragged end of a straight fits the curve beside it; name of a path, followed by the memory cells and the includes taking it; turntable placed from a template described as one, tracks led out of it and the tracks around fitted to it, its positions written to the include; infrastructure bound to the path whose events read its memory cell; terrain made where the route has none and shaped to the formation under the ballast; models along the track over the selected path and on along the joined ones while dragged, rarely used settings folded; vehicles and trainsets placed on any path, switches included, facing the way the arrow shows; joined paths spread into the selection; New scenery in the File menu starts the editor again with the wizard; ortho zoom towards the cursor; scripted self tests; Polish translation
2026-10-06 22:19:54 +02:00