18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 09:27:10 +01:00

Merge MaSzyna-EU07/maszyna master into feat/vat-people

master as of 9fecba82: the test mode (--test, null renderer), the AI braking
and passenger stops, the ESt3 brake, the SOD lamp, the 401Da oil pump lamp,
smoke of vehicles taken off the tracks, text displays with national
characters, the scenario picker drag and drop, the log written to the end of
the closing, unit and scenario tests, and the small fixes.

How the conflicts went:
- the OpenGL 3.3 and legacy renderers stay removed; what master changed in
  them is carried over where this branch has a counterpart: the opaque
  characters of text displays in scene_walk::Render_text(). The instancing
  range of master is covered by the instance records of this branch, the
  sizes of the sun and the moon are its own.
- test mode: the null backend picked in select_gfx_backend(), the window
  hidden, no crash gui; settings of the removed renderers left out.
- materials: the matte and tinted copies of this branch (the tint in the
  slot of the weathering), made again on a change of the season or the
  weather (update_variants), before the track blends.
- tracks: this branch's Segment, Track and TrackUneven, with master's
  replaced_shake(), uneven_underway(), rail_joints_moved(),
  switch_followers() and the editor's add_followers(); tributary and unknown
  track types stay as this branch loads them.
- the log service stops by StopLogService(), the exit paths of EU07.cpp too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
This commit is contained in:
lcddisplay
2026-11-08 21:17:00 +01:00
230 changed files with 15522 additions and 821 deletions
+19 -1
View File
@@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/.
#include "simulation/simulation.h"
#include "simulation/simulationtime.h"
#include "simulation/simulationenvironment.h"
#include "simulation/simulationtest.h"
#include "application/application.h"
#include "application/scenarioloaderuilayer.h"
#include "rendering/renderer.h"
@@ -21,6 +22,8 @@ http://mozilla.org/MPL/2.0/.
#include "utilities/translation.h"
#include "audio/audiorenderer.h"
#include <format>
scenarioloader_mode::scenarioloader_mode() {
m_userinterface = std::make_shared<scenarioloader_ui>();
}
@@ -52,9 +55,14 @@ bool scenarioloader_mode::update() {
try {
state = simulation::State.deserialize_begin(Global.SceneryFile);
}
// the file it can't read, as the parser and the scenery opening it report it
catch (std::exception const &e) {
ErrorLog("Bad init: scenario \"" + Global.SceneryFile + "\" couldn't be opened (" + e.what() + ")");
ErrorLog(std::format("Bad init: scenario \"{}\" couldn't be opened ({})", Global.SceneryFile, e.what()));
state.reset();
if (Global.test.enabled) {
simulation::test().finish(simulation::test_result::error, "scenario couldn't be opened");
return true;
}
Global.SceneryFile.clear();
Application.pop_mode();
Application.push_mode(eu07_application::mode::launcher);
@@ -67,8 +75,18 @@ bool scenarioloader_mode::update() {
return true;
}
catch (invalid_scenery_exception &e) {
// back to the launcher as when the scenario can't be opened, not on to the driver mode with the scenery half loaded
ErrorLog( "Bad init: scenario loading failed" );
state.reset();
if( Global.test.enabled ) {
// there's nothing to test; the exit code says the run went wrong
simulation::test().finish( simulation::test_result::error, "scenario loading failed" );
return true;
}
Global.SceneryFile.clear();
Application.pop_mode();
Application.push_mode(eu07_application::mode::launcher);
return true;
}
// the loading state holds the scenario file open, which on some systems keeps the file from being replaced
// when the scenery is saved in the editor. it'd also get in the way of another load