18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 10:05:23 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
maj00r 602b0bdcf7 refactor(scene): the region keeps its sections in a map by row and column, not in a grid of 500 x 500
Step 3a of docs/world-format-eu07.md (#516, section 13): the dense std::array of 250 000 section pointers
gives way to a std::map keyed by section_key (row and column, counted as before with the middle of the region
at 250, 250), holding only the sections that hold something. The map runs row by row, the order of the index
of the classic square, so the .sbt and .btf files keep their indices and come out byte for byte the same.

basic_region gains find_section(key or row and column) and all_sections(); get_section(index) stays for the
classic index. The renderer's walk, its prefetch and memory count, the local lights, the map, the terrain
files, the editor and its self-test use them instead of indexing the grid; the loops over all 250 000 slots
(the map every frame, the editor's terrain drop) go over the sections there are.

Nothing changes in what the game does: the region still ends at +-250 km, a point beyond it still goes to the
section at the edge, and the centre of a new section is computed from the row and column before that clamp,
as it was. Lifting the limit is a later step, behind a switch.

Checked in the game (td.scn, Glinojeck.scn, --test 120 s, seed 1): the physics logs are the same bit for bit
as before the change, with the .sbt written and with it read back, and the .sbt files written are byte for
byte the same as those of the build before.
2026-12-02 23:20:42 +01:00
Hirek b82784be92 refactor(vehicle): AnimModel.h, Sweep.h and Camera.h no longer include DynObj.h
The scenery models (AnimModel.h), the sweeps (Sweep.h) and the camera
(Camera.h, which Globals.h includes) pulled in the whole vehicle header, for
one structure (material_data) and a pointer type.

- model/materialdata.h/.cpp: material_data and TextureTest(), moved from
  DynObj.h/.cpp as they were
- Camera.h names TDynamicObject through utilities/Classes.h
- Classes.h includes interfaces/ITexture.h for null_handle, the value of the
  handles it defines; AnimModel.h includes utilities/Names.h for basic_table
  itself. Both came through DynObj.h before.
- the files that use the vehicles include vehicle/DynObj.h themselves

164 of the 730 objects of the build depend on DynObj.h now, 304 before.

No change in behaviour: 1142/1142 tests, golden traces exact against staging
62f7a29b.
2026-11-27 19:46:26 +01:00
Hirek bd589f272d feat(vulkan): vulkan 1.4 core with the user interface and the launcher, shaders split into ogl46/vk14 with SPIR-V binaries loaded first 2026-10-24 05:47:11 +02:00
Hirek f47172f34d Migration cleanup and renderer documentation 2026-10-15 19:05:35 +02:00
Hirek 4f72fd650c Remove glLineWidth probe and wide line calls that never take effect on core contexts 2026-10-15 10:35:08 +02:00
Hirek 61bfc6eb1a Move modern OpenGL renderer to rendering/opengl46 and rename classes 2026-10-15 01:12:05 +02:00
Hirek 0e10ce4d0b Remove OpenGL ES / ANGLE render path 2026-10-15 00:53:28 +02:00
Hirek 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
combolek d863ec18c3 uilayer: Implement ui.bg.opacity setting (#139)
uilayer: Implement up ui.bg.opacity setting
2026-07-12 00:41:25 +02:00
docentYT e95e00a2e2 Use texture id casting recommended by ImGui wiki 2026-05-12 18:04:50 +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
Wls50 561b84a329 move vertex user data to a separate array
update vao creation to support optional vertex data
update mesh serialization to account for new user data location
change t3d spec: userdata:{float|uint|int} to userdata:bool
2024-07-06 16:04:35 +02:00
milek7 5bafa31f9d Merge commit 'd8170c932b448ba6888e702746b5ae22632062d8' into sim 2022-01-05 22:21:05 +01:00
milek7 90a6b7c3b5 handle different window/framebuffer sizes 2021-01-24 22:00:30 +01:00
milek7 136e550ccc map set camera preset on middle click 2020-10-21 20:40:48 +02:00
milek7 1c40578d26 ubo padding fixes 2020-10-21 17:59:27 +02:00
milek7 6af6f5156d workaround for ebo binding issues, do not enable ai vehicles automatically on map 2020-10-21 00:45:19 +02:00
milek7 df87b37b5b make trackswitch window semitransparent 2020-10-20 18:56:55 +02:00
milek7 efb6e3f709 cross event detection also without :, bring highlight on map to front 2020-10-20 17:03:15 +02:00
milek7 78305e3b28 cross switch detection for map manual control 2020-10-20 02:17:21 +02:00
milek7 29f8f91ad8 Merge remote-tracking branch 'tmj/master' into sim 2020-10-18 23:35:14 +02:00
milek7 f6ce47f212 map ai command send feature, debug window event queue feature, fix timeoverride, ai restores light settings after clearing setsignal 2019-10-12 00:55:07 +02:00
milek7 0fe0894d59 map zoom tweaks 2019-10-06 14:41:37 +02:00
milek7 bb1c0d6895 map window improvements 2019-10-05 15:14:13 +02:00
milek7 5d193b40ff semaphore with stop signal marked on minimap, number of icons increased to 5 2019-09-19 23:13:45 +02:00
milek7 8f7e06c25c snapshot 2019-07-09 22:09:37 +02:00
milek7 a0c44fbaa3 snapshot 2019-07-02 15:33:49 +02:00
milek7 e22f020a59 wake up AI when sending alarm command 2019-04-10 11:08:32 +02:00
milek7 7261fe9fbd ai alert mode 2019-04-10 10:45:22 +02:00
milek7 691f0f28b2 changed map colors 2019-04-02 13:10:36 +02:00
milek7 33adffb614 map visualization features 2019-04-02 01:21:49 +02:00
milek7 aa8d66e5da recording 2019-03-25 01:12:19 +01:00
milek7 e6e5d6645b shader fix, vehicle move feature 2019-03-17 23:55:40 +01:00
milek7 a0738d109b geometry shader changes 2019-03-17 23:20:12 +01:00
milek7 4383b0c7e0 geometry shaders, map poi icons 2019-03-17 20:30:25 +01:00
milek7 e3c88b9834 network-aware obstacles, other changes 2019-03-16 17:13:46 +01:00
milek7 8b642205eb alerter fixes, removing obstacles, python config changes 2019-03-16 12:43:34 +01:00
milek7 3556a2d0e6 vehicle params window, aware system rewrite, sifa 2019-03-16 02:17:41 +01:00
milek7 f1c8c8f1cd obstacle inserting 2019-03-15 15:46:49 +01:00
milek7 7ca562211a improve nearest track-point search 2019-03-15 01:18:23 +01:00
milek7 3693c1660e renderer changes, time and environment window 2019-03-09 21:14:01 +01:00
milek7 748e7b1dda imgui include fix 2019-03-06 17:42:52 +01:00
milek7 1f0d8c4dc8 semaphores controllable on minimap 2019-03-06 00:58:12 +01:00
milek7 064b360a53 map work 2019-02-25 00:41:11 +01:00
milek7 939aa73384 switch state visualisation, semaphore tracking for map purposes 2019-02-22 22:21:23 +01:00
milek7 48afd2f62f map rendering improvements 2019-02-19 01:34:55 +01:00
milek7 5b32b4e926 higher quality map 2019-02-19 01:19:11 +01:00
milek7 89cf20a251 map improvements 2019-02-18 17:46:31 +01:00
milek7 52ff1ecb98 display train names on map 2019-02-18 00:07:09 +01:00