17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 00:50:29 +01:00
Commit Graph

188 Commits

Author SHA1 Message Date
maj00r
d069743265 Switches: enforced branch tangency, internal basket, Polish turnout templates
A switch (rozjazd) is a relation on a through niweleta, not a niweleta - the
through track is never split. It marks the theoretical point on the through
centreline; two tangent lines cross there (the through heading and that heading
turned by the crossing mark 1:n), and the internal diverging curve is fitted to
round the corner between them, reusing the same GapFitter the gap fits go
through. So the curve is free: a plain arc, or a łuk koszowy right inside the
switch. The theoretical tangent lengths and the curve length follow from it and
are read off, not set.

The branch niweleta's leaving straight is now locked to the frog: it starts at
the frog and runs along the frog heading every solve, only its length is the
user's. That enforces tangency no matter what is drawn, and because the first
straight is pinned tangent, any fit in the branch's first gap - including a
basket - meets the switch tangentially by construction.

solve_layout solves the niwelety and the switches together in two passes: solve,
read each frog, pin the branches, solve again. Switches serialize as an ejuncs /
ejunc section; older files without it still load.

Typical Polish turnouts (rozjazdy zwyczajne) are offered as templates that set
the crossing mark and radius together; the length each spans is computed from
them (arc = R*atan(1/n)) and shown, so how long the switch is is known.
2026-08-27 19:36:55 +02:00
maj00r
8d007291e2 Put Geoportal imagery behind the plan and clear the scenery on a new map
The location picker now shows the real topographic map instead of a
hand-drawn outline, fetched as one WMS image for whatever box is on screen;
the schematic border is gone and only the city list remains, to jump the
view somewhere recognisable. Under the plan itself a georeferenced map gets
the orthophoto, tiled through the layout library's own EPSG:2180 grid and
cache.

What a native build was missing is here: the download (WinHTTP, on worker
threads), the decode and the texture. Finished transfers are handed back on
the thread that drains them, so both the library's cache and the graphics
API stay on one thread. The imagery service turns down browser user agents
and fails the odd request even for a plain one, so requests go out as curl
and are retried a few times.

Starting a new map now drops the loaded scenery and comes back on empty
ground, instead of leaving the previous scenery's contents under a plan that
has nothing to do with them. The reload is deferred to the top of the frame:
taking the editor off the mode stack while it is drawing its own panels
would pull the ground out from under them.
2026-08-27 19:36:55 +02:00
maj00r
bf82c35734 Georeference a new map against a point in Poland
"New map" now asks what is being started. A fictional scenery keeps its own
frame, where coordinates mean nothing outside it. A real one pins the
scenery's zero to a point picked off a map of Poland, so the plan is drawn
in EPSG:2180 - the frame the layout library already works in, and the one
Geoportal serves imagery in.

The projection is the standard transverse Mercator series for PUWG 1992 on
GRS80. Checked against known values: the central meridian comes out at
easting 500000 exactly, Warszawa at 637382/486757, Krakow at 567614/244588,
Gdansk at 477038/720937.

The map behind the picker is a schematic border outline plus the larger
cities, projected from geographic coordinates on first use. It is coarse on
purpose - it is there to point at a region, not to measure against - and the
dialog says so. No network is involved.
2026-08-27 19:36:55 +02:00
maj00r
4bef28cf94 Add a track layout drawing board to the editor
A "Plan" panel, opened from Track layout in the editor's menu bar, draws a
niweleta the way the web frontend did: click to lay chained straights, drag
a corner to move it, and pick a fit for each gap between them. The geometry
is entirely maj0sted's - the panel gathers the input, hands the document to
solve_project and paints the rails that come back, coloured by whether they
came from a straight, an arc or a clothoid. Scenery nodes are untouched.

A fit the library cannot produce is simply absent from its answer, so the
gap is labelled as not fitting rather than left looking as though its
parameters took effect. Save/load go through the library's own document
format, so a project written here opens in the same state.

Also translates the comments added with -editor into English, matching the
files they sit in.
2026-08-27 19:36:55 +02:00
maj00r
a083269867 Vendor the maj0sted track layout library and link it into the editor
Drop-in copy of C:\Users\maj00r\Projects\maj0sted-master minus its web/
directory - the WASM frontend is not being ported, the editor drives the
same C++ API natively. What is left is plain C++20 with no dependencies:
domain model (niweleta, plan and profile geometry, fitting, parallelism),
project serialization, rail sampling and the editor document.

src/web/ribbon.cpp was missing from the library source list; added, since
without it the ribbon symbols never make it into the archive.
2026-08-27 19:36:55 +02:00
Sebastian Krzyszkowiak
84b3de6088 cmake: Allow to disable date & git hash suffix in executable name 2026-06-29 23:32:38 +02:00
b0bb2c9c42 Fix autodetect python directory 2026-06-27 15:15:11 +02:00
16c94f8e19 Merge remote-tracking branch 'origin/feature/python314' into Editor-Python3.14 2026-06-18 18:22:38 +02:00
75461eaf86 World Streaming Part 1 2026-06-18 18:18:02 +02:00
449609d817 Snap to ground || New terrain system || Terrain sculping || Mesh simplification 2026-06-17 08:56:42 +02:00
5a39ed5193 ImGuizmo System OpenGL 2026-06-17 01:19:59 +02:00
3bed2212d7 Editor settings for New/Legacy camera controll 2026-06-16 23:53:01 +02:00
f07c8fdcd2 Enable /map identifier in cmakelists.txt 2026-05-26 22:08:18 +02:00
maj00r
996cc68822 Fix Windows post-build zlib path (Python DLLs folder)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 18:25:01 +02:00
maj00r
4258af45dd cmake_path removed 2026-05-11 18:21:12 +02:00
maj00r
3786ecd98f Python 3.14 build and CI updates
Squashes the last five commits: migrate to Python 3.14 (CMake, AppVeyor, Azure, README), vcpkg/setup-ci fixes, CMake adjustments, remove bundled ref/python 2.7, and related scripting/static file updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 18:21:12 +02:00
02cffbe4ad Enable AVX2 support 2026-05-06 20:02:00 +02:00
docentYT
d5d1825e38 Remove dumb3d 2026-04-27 23:03:47 +02:00
copilot-swe-agent[bot]
7e49aa8740 Rewrite #includes to use explicit subdirectory paths
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:16:48 +00:00
copilot-swe-agent[bot]
0531086bb9 Reorganize source files into logical subdirectories
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:01:57 +00:00
11e79f52ae Conversion to cpp 20 2026-01-18 21:21:15 +01:00
c6c042aa52 Fix screenshot manager on OpenGL renderers 2025-09-17 17:34:53 +02:00
f43d4b5201 Add trivia randomisation 2025-09-16 00:25:00 +02:00
Ryba04
33ad7b718f Merge branch 'master' into master 2025-09-13 19:46:26 +02:00
jakubg1
5e2175302b Loading screen overhaul POC
The loading screen has been significantly changed:
- The background image is now properly picked randomly instead of taking the `textures/logo.bmp` file, prepended by an external program such as Rainsted/Starter.
- The progress bar has been moved from a floating window to a thin green line at the bottom of the loading screen.
- The log window is now hidden by default. It can be turned on by setting `loadinglog` to `true` in `eu07.ini`.
- There is an animated wheel icon on the loading screen, and a trivia text is displayed.

New translation key:
- `"Did you know"`

TODO:
- Load trivia from a separate file.
2025-09-10 01:53:22 +02:00
3810fff0dc Revert "Add TGUI library"
This reverts commit c6564351e8.
2025-09-09 16:46:12 +02:00
c6564351e8 Add TGUI library 2025-09-08 18:32:38 +02:00
ac2c5ab4cf Add auto dmp file genration 2025-06-02 22:41:39 +02:00
70b68a155b Fix rc porecompilation 2025-05-05 20:20:29 +02:00
cc82af3375 Add versioning info to binary 2025-05-05 19:58:17 +02:00
09920609ff Add generating PDBs and MAPs for executables 2025-04-17 10:56:42 +02:00
a39d972126 Some renaming 2025-04-15 01:32:56 +02:00
12d6a1578d Add vcpkg as submodule and ref it in cmake 2025-04-15 00:23:36 +02:00
WLs50
1feb4c4bd0 fix merging issue regarding discord-rpc 2025-04-05 14:49:42 +02:00
WLs50
0280b40ca5 Merge remote-tracking branch 'manul-public/master' into manul-staging 2025-04-05 14:24:53 +02:00
WLs50
ffe5ece058 wrap discord rpc as optional feature 2025-03-17 07:19:07 +01:00
WLs50
d793866937 Merge branch 'manul-staging' of https://github.com/wls50/maszyna-internal into manul-staging 2025-03-16 22:14:42 +01:00
WLs50
8f98292cbe implement moon 2025-03-16 22:12:37 +01:00
27f4920869 Add discord-rpc library 2025-03-16 16:22:54 +01:00
WLs50
07583a9f07 fix order of parameters after cmake -E copy -t 2025-03-16 14:51:38 +01:00
WLs50
d9b64c42fb fix unresolved symbols when static linking glfw 2025-03-10 20:32:27 +01:00
WLs50
33ffcaf66b always use included glfw for build 2025-03-09 21:22:35 +01:00
WLs50
a5f6397eca merge manul 2025-03-09 15:36:11 +01:00
33b85baf77 Add discord-rpc library 2025-02-24 22:02:01 +01:00
milek7
ba5dfda64d WITH_PYTHON build option 2022-07-07 02:29:36 +02:00
milek7
129bc9059c make imgui version runtime selectable 2022-04-13 22:15:43 +02:00
milek7
10fdb24c79 change MSVC build flags 2022-04-09 22:20:01 +02:00
milek7
ce6d530aa8 changes for standalone e3d export 2022-03-06 18:18:07 +01:00
milek7
5bafa31f9d Merge commit 'd8170c932b448ba6888e702746b5ae22632062d8' into sim 2022-01-05 22:21:05 +01:00
Milek7
f1723ac66b remove flags for old luajit 2021-09-12 17:03:37 +02:00